优化
This commit is contained in:
@@ -31,7 +31,7 @@ class HTTP {
|
||||
'Authorization': "Bearer " + wx.getStorageSync('AUTH_TOKEN_'+usertype)
|
||||
},
|
||||
success: (res) => {
|
||||
console.log("header Authorization: ", res.header.Authorization);
|
||||
// console.log("header Authorization: ", res.header.Authorization);
|
||||
var Authorization_token = res.header.Authorization;
|
||||
if(Authorization_token){
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, Authorization_token);//当token快过期时,服务器会返回新token,本地刷新
|
||||
@@ -58,7 +58,7 @@ class HTTP {
|
||||
this._show_error(showLoading, err.data.message)
|
||||
},
|
||||
complete: (res) => {
|
||||
console.log("res from cmplete: ",res)
|
||||
// console.log("res from cmplete: ",res)
|
||||
const code = res.data.code;
|
||||
if (code == 200) {
|
||||
if(showLoading) wx.hideLoading();
|
||||
|
||||
Reference in New Issue
Block a user