feat: 完成前端切换功能
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import axios from 'axios'
|
||||
import { ElNotification, ElMessageBox, ElMessage, ElLoading } from 'element-plus'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { getToken,getTenantId } from '@/utils/auth'
|
||||
import errorCode from '@/utils/errorCode'
|
||||
import { tansParams, blobValidate } from '@/utils/ruoyi'
|
||||
import cache from '@/plugins/cache'
|
||||
@@ -67,7 +67,12 @@ service.interceptors.request.use(config => {
|
||||
if (getToken() && !isToken) {
|
||||
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
|
||||
console.log(getTenantId(),"uuu");
|
||||
if(getTenantId()!==undefined&&getTenantId()!==null&&getTenantId()!=='null')
|
||||
{
|
||||
console.log('爆炸');
|
||||
config.headers['__tenant'] = getTenantId()
|
||||
}
|
||||
|
||||
// get请求映射params参数
|
||||
if (config.method === 'get' && config.params) {
|
||||
|
||||
Reference in New Issue
Block a user