|
|
@ -63,8 +63,6 @@ $http.requestStart = options => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 请求前加入当前终端
|
|
|
|
|
|
//options.header['platform'] = store.getters.platform
|
|
|
|
|
|
//
|
|
|
//
|
|
|
options.header['Accept'] = "application/json;charset=UTF-8" |
|
|
options.header['Accept'] = "application/json;charset=UTF-8" |
|
|
|
|
|
|
|
|
@ -118,7 +116,7 @@ $http.dataFactory = async res => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// console.log("rsp",res)
|
|
|
console.log("rsp",res) |
|
|
let httpData = res.response.data |
|
|
let httpData = res.response.data |
|
|
if (typeof httpData == "string") { |
|
|
if (typeof httpData == "string") { |
|
|
try { |
|
|
try { |
|
|
@ -161,6 +159,7 @@ $http.dataFactory = async res => { |
|
|
|
|
|
|
|
|
// 判断是否需要登录
|
|
|
// 判断是否需要登录
|
|
|
if (httpData.status == 401 || httpData.statusCode == 401) { |
|
|
if (httpData.status == 401 || httpData.statusCode == 401) { |
|
|
|
|
|
|
|
|
// 401也有可能是后端登录态到期, 所以要清空本地的登录状态
|
|
|
// 401也有可能是后端登录态到期, 所以要清空本地的登录状态
|
|
|
store.dispatch('Logout') |
|
|
store.dispatch('Logout') |
|
|
|
|
|
|
|
|
|