mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 23:56:43 +08:00
dev测试token问题
This commit is contained in:
@@ -136,7 +136,7 @@ const service = axios.create({
|
||||
|
||||
// request拦截器
|
||||
service.interceptors.request.use(
|
||||
async config => {
|
||||
config => {
|
||||
let relativePath = config.url && config.url.split(configApp.API_VERSION)[1]
|
||||
if (whiteList.includes(relativePath)) {
|
||||
Toast.loading({
|
||||
@@ -165,13 +165,11 @@ service.interceptors.request.use(
|
||||
if (!token) {
|
||||
// 设备类型
|
||||
const target = BusinessCommon.device()
|
||||
console.log('设备类型信息:',target)
|
||||
// 安卓or苹果(非浏览器)
|
||||
if (target.isAndroid || target.isIphone) {
|
||||
// eslint-disable-next-line no-undef
|
||||
const res = await window.WebViewJavascriptBridge.webCallAppInJs('getToken')
|
||||
console.log('原生返回信息===>', JSON.parse(res))
|
||||
CacheUtils.setLocItem('token', JSON.parse(res).token)
|
||||
// eslint-disable-next-line no-undef
|
||||
const res = EWebBridge.webCallAppInJs('getToken')
|
||||
CacheUtils.setLocItem('token', JSON.parse(res).token)
|
||||
}
|
||||
}
|
||||
console.log('最终token====>>', CacheUtils.getLocItem('token'))
|
||||
|
||||
Reference in New Issue
Block a user