|
@@ -28,9 +28,15 @@ service.interceptors.request.use(config => {
|
|
|
// 是否需要防止数据重复提交
|
|
|
const isRepeatSubmit = (config.headers || {}).repeatSubmit === false
|
|
|
if (getToken() && !isToken) {
|
|
|
- //组装token,使用原token+"/yyyymmddhhmiss" sm2加密后传入后台
|
|
|
- const str=getToken()+"///"+new Date().getTime();
|
|
|
- config.headers['Authorization'] = 'Bearer ' + encode(str); // 让每个请求携带自定义token 请根据实际情况自行修改
|
|
|
+ if(config.url.indexOf("/biz/info/upload")!=-1){
|
|
|
+ //如果是上传文件接口,则不使用时间验证
|
|
|
+ config.headers['Authorization'] = 'Bearer ' + getToken();
|
|
|
+ }else{
|
|
|
+ //组装token,使用原token+"/yyyymmddhhmiss" sm2加密后传入后台
|
|
|
+ const str=getToken()+"///"+new Date().getTime();
|
|
|
+ // 让每个请求携带自定义token 请根据实际情况自行修改
|
|
|
+ config.headers['Authorization'] = 'Bearer ' + encode(str);
|
|
|
+ }
|
|
|
}
|
|
|
// get请求映射params参数
|
|
|
if (config.method === 'get' && config.params) {
|