This commit is contained in:
haomingming
2023-05-09 15:04:05 +08:00
parent 7b9b80be8d
commit 807698b89f
53 changed files with 896 additions and 222 deletions
+2 -2
View File
@@ -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();