|
@@ -10,7 +10,7 @@ import { baseUrl, tenantId, apiPath } from './config'
|
|
|
import { showAuthModal } from '@/hooks/useModal'
|
|
|
import { rewardEventTrackClick } from '@/api/integral'
|
|
|
import { getSuffixAfterPrefix } from '@/utils/prefixUrl'
|
|
|
-// import { encryptionFun } from '@/utils/openEncryption'
|
|
|
+import { encryptionFun } from '@/utils/openEncryption'
|
|
|
|
|
|
import qs from 'qs'
|
|
|
|
|
@@ -116,7 +116,7 @@ http.interceptors.request.use(
|
|
|
}
|
|
|
|
|
|
// 开启参数加密
|
|
|
- // if (config.custom?.openEncryption) encryptionFun(config)
|
|
|
+ if (config.custom?.openEncryption) encryptionFun(config)
|
|
|
|
|
|
// 增加 token 令牌、terminal 终端、tenant 租户的请求头
|
|
|
const token = getAccessToken();
|
|
@@ -162,6 +162,7 @@ http.interceptors.request.use(
|
|
|
*/
|
|
|
http.interceptors.response.use(
|
|
|
(response) => {
|
|
|
+ // console.log(1, 'response', response)
|
|
|
// 约定:如果是 /auth/ 下的 URL 地址,并且返回了 accessToken 说明是登录相关的接口,则自动设置登陆令牌
|
|
|
if (response.config.url.indexOf('/system/auth/') >= 0 && response.data?.data?.accessToken) {
|
|
|
const useUserStore = userStore()
|