mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-14 11:05:06 +08:00
* 【新增】后端 yudao.tenant.enable
配置项,前端 VUE_APP_TENANT_ENABLE
配置项,用于开关租户功能
* 【优化】调整默认所有表开启多租户的特性,可通过 `yudao.tenant.ignore-tables` 配置项进行忽略,替代原本默认不开启的策略 * 【新增】通过 `yudao.tenant.ignore-urls` 配置忽略多租户的请求,例如说 ,例如说短信回调、支付回调等 Open API
This commit is contained in:
@ -4,6 +4,7 @@ import store from '@/store'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import errorCode from '@/utils/errorCode'
|
||||
import Cookies from "js-cookie";
|
||||
import {getTenantEnable} from "@/utils/ruoyi";
|
||||
|
||||
// 是否显示重新登录
|
||||
let isReloginShow;
|
||||
@ -24,9 +25,11 @@ service.interceptors.request.use(config => {
|
||||
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
// 设置租户
|
||||
const tenantId = Cookies.get('tenantId');
|
||||
if (tenantId) {
|
||||
config.headers['tenant-id'] = tenantId;
|
||||
if (getTenantEnable()) {
|
||||
const tenantId = Cookies.get('tenantId');
|
||||
if (tenantId) {
|
||||
config.headers['tenant-id'] = tenantId;
|
||||
}
|
||||
}
|
||||
// get请求映射params参数
|
||||
if (config.method === 'get' && config.params) {
|
||||
|
Reference in New Issue
Block a user