Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_new_shixunsrepository
cxt 5 years ago
commit aceb662122

@ -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