【add】-全局配置文件的增加

This commit is contained in:
fengchenchen
2022-12-06 17:59:13 +08:00
parent 56c3fd728e
commit 50a659476a
10 changed files with 98 additions and 14 deletions
+10 -4
View File
@@ -90,10 +90,16 @@ const err = (error) => {
service.interceptors.request.use(config => {
if (config.url.indexOf('/zxd') === 0) {
config.headers['verifyToken'] = '1SRifTFQz86Wnqz'
}
const token = Vue.ls.get(ACCESS_TOKEN)
if (token) {
config.headers['X-Access-Token'] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
} else if(config.url.indexOf('/WPApi') === 0) {
config.headers['X-Access-Token'] = 'GUG2weX1Pg5lOzKxhcrQKSjqsT6YBaZV'
} else if(config.url.indexOf('/ISO') === 0) {
config.headers['X-Access-Token'] = 'GUG2weX1Pg5lOzKxhcrQKSjqsT6YBaZV'
} else {
// 来款的请求
const token = Vue.ls.get(ACCESS_TOKEN)
if (token) {
config.headers['X-Access-Token'] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
}
}
//update-begin-author:taoyan date:2020707 for:多租户
let tenantid = Vue.ls.get(TENANT_ID)