|
@@ -64,6 +64,12 @@ service.interceptors.request.use(
|
|
|
return (isToken = false)
|
|
|
}
|
|
|
})
|
|
|
+ // const ENT_ACCESS_TOKEN = getToken() === localStorage.getItem('ENT_ACCESS_TOKEN')
|
|
|
+ // const PER_ACCESS_TOKEN = getToken() === localStorage.getItem('PER_ACCESS_TOKEN')
|
|
|
+ // if (ENT_ACCESS_TOKEN) console.log('-----------------------------使用了企业token请求', config.url)
|
|
|
+ // if (PER_ACCESS_TOKEN) console.log('-----------------------------使用了个人token请求', config.url)
|
|
|
+ // // debugger
|
|
|
+
|
|
|
if (getToken() && !isToken) {
|
|
|
(config).headers.Authorization = 'Bearer ' + getToken() // 让每个请求携带自定义token
|
|
|
}
|
|
@@ -256,11 +262,10 @@ const handleAuthorized = () => {
|
|
|
|
|
|
// 触发获取积分
|
|
|
const getIntegral = (url, store) => {
|
|
|
- const loginType = localStorage.getItem('loginType')
|
|
|
rewardEventTrackClick(url).then(() => {
|
|
|
setTimeout(() => {
|
|
|
- if (loginType && loginType === 'enterprise') store.getEnterpriseUserAccountInfo()
|
|
|
- else store.getUserAccountInfo()
|
|
|
+ // store.getEnterpriseUserAccountInfo() 目前企业没有积分,访问商城应该以个人的身份访问商城
|
|
|
+ store.getUserAccountInfo()
|
|
|
}, 2000)
|
|
|
})
|
|
|
}
|