|
@@ -10,11 +10,11 @@ const isEnterprise = () => {
|
|
export const getIsEnterprise = () => { isEnterprise() }
|
|
export const getIsEnterprise = () => { isEnterprise() }
|
|
|
|
|
|
// 获取token
|
|
// 获取token
|
|
-export const getToken = (num) => { // 1:ENT, 2:PER
|
|
|
|
|
|
+export const getToken = (ENT) => {
|
|
const arr = ['ENT_ACCESS_TOKEN', 'PER_ACCESS_TOKEN']
|
|
const arr = ['ENT_ACCESS_TOKEN', 'PER_ACCESS_TOKEN']
|
|
- let type = isEnterprise() ? arr[0] : arr[1]
|
|
|
|
|
|
+ let type = (ENT || isEnterprise()) ? arr[0] : arr[1]
|
|
|
|
+ console.log('getToken', type)
|
|
//
|
|
//
|
|
- if (num) type = arr[num-1]
|
|
|
|
return localStorage.getItem(type)
|
|
return localStorage.getItem(type)
|
|
}
|
|
}
|
|
|
|
|