hookehuyr

fix(axios): 为desk_calendar接口强制指定用户ID和Token

特殊处理desk_calendar接口请求,使用固定的用户ID和Token以确保接口正常访问
......@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-28 10:17:40
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-12-04 14:06:16
* @LastEditTime: 2025-12-25 09:56:58
* @FilePath: /mlaj/src/utils/axios.js
* @Description:
*/
......@@ -52,6 +52,13 @@ axios.interceptors.request.use(
config.headers['User-Id'] = user_info.user_id;
config.headers['User-Token'] = user_info.HTTP_USER_TOKEN;
}
// NOTE: 特殊处理 a=desk_calendar 接口, 强制使用指定的 User-Id 和 User-Token
if ((config.params && config.params.a === 'desk_calendar') || (config.url && config.url.includes('a=desk_calendar'))) {
config.headers['User-Id'] = '1033954';
config.headers['User-Token'] = 'WN2BD9XQ7CRSVQ92FMB62V9C9OHHRBL38L2NS4GJ#1033954#50';
}
// const url_params = parseQueryString(location.href);
// GET请求默认打上时间戳,避免从缓存中拿数据。
const timestamp = config.method === 'get' ? (new Date()).valueOf() : '';
......