dev_new_shixunsrepository
杨树明 5 years ago
parent dc2e27b6fb
commit a87ce19c89

@ -97,7 +97,7 @@ export function initAxiosInterceptors(props) {
axios.interceptors.request.use(
config => {
config.headers['Content-Type']= 'no-cache'
// config.headers['Content-Type']= 'no-cache'
// if (token) { // 每次发送请求之前判断是否存在token如果存在则统一在http请求的header都加上token不用每次请求都手动添加了
// config.headers.Authorization = token;
// }
@ -138,7 +138,7 @@ export function initAxiosInterceptors(props) {
let newopens=md5(opens+timestamp)
config.url = url;
if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?&randomcode=${timestamp}&client_key=${newopens}`;
config.url = `${config.url}?randomcode=${timestamp}&client_key=${newopens}`;
} else {
config.url = `${config.url}&randomcode=${timestamp}&client_key=${newopens}`;
}

Loading…
Cancel
Save