3.18 患者端
This commit is contained in:
+1
-2
@@ -15,6 +15,7 @@ function request(url, method, data, loding = false) {
|
||||
// })
|
||||
}
|
||||
let token = wx.getStorageSync('AUTH_TOKEN');
|
||||
console.log(token);
|
||||
if (!token) {
|
||||
let freelist = ["/login/wechat_mobile_login", '/login/mobile_login','/code/phone','/patient/index',"/popup","/sign/im"];//接口白名单
|
||||
let currentUrl=getCurrentPageUrl();
|
||||
@@ -44,8 +45,6 @@ function request(url, method, data, loding = false) {
|
||||
data: data,
|
||||
header: header,
|
||||
success: function (res) {
|
||||
console.log('-----------------------------');
|
||||
console.log(res);
|
||||
var Authorization_token = res.header.Authorization;
|
||||
if (Authorization_token) {
|
||||
wx.setStorageSync('AUTH_TOKEN', Authorization_token); //当token快过期时,服务器会返回新token,本地刷新
|
||||
|
||||
Reference in New Issue
Block a user