mirror of
https://gitee.com/yudaocode/yudao-mall-uniapp.git
synced 2025-12-30 09:42:25 +00:00
【代码优化】实现动态 terminal 终端类型的计算
This commit is contained in:
@@ -9,7 +9,7 @@ import $store from '@/sheep/store';
|
||||
import $platform from '@/sheep/platform';
|
||||
import { showAuthModal } from '@/sheep/hooks/useModal';
|
||||
import AuthUtil from '@/sheep/api/member/auth';
|
||||
import { getTerminalEnumByUniPlatform } from '@/sheep/util/const';
|
||||
import { getTerminal } from '@/sheep/util/const';
|
||||
|
||||
const options = {
|
||||
// 显示操作成功消息 默认不显示
|
||||
@@ -94,9 +94,7 @@ http.interceptors.request.use(
|
||||
if (token) {
|
||||
config.header['Authorization'] = token;
|
||||
}
|
||||
|
||||
const terminalType = uni.getSystemInfoSync().uniPlatform
|
||||
config.header['terminal'] = getTerminalEnumByUniPlatform(terminalType);
|
||||
config.header['terminal'] = getTerminal();
|
||||
|
||||
config.header['Accept'] = '*/*';
|
||||
config.header['tenant-id'] = tenantId;
|
||||
|
||||
Reference in New Issue
Block a user