Commit 14bfed81 by fengzhaoyu

MOD: 去掉loading

parent 93a3dbac
...@@ -7,7 +7,7 @@ const $http = (url, data, type, loadingType) => { ...@@ -7,7 +7,7 @@ const $http = (url, data, type, loadingType) => {
// content: '加载中...' // content: '加载中...'
// }); // });
// } // }
dd.showLoading({content: '加载中...'}); // dd.showLoading({content: '加载中...'});
let hasToken = dd.getStorageSync({ key: 'token' }).data; // token let hasToken = dd.getStorageSync({ key: 'token' }).data; // token
let expires_in = hasToken.expires_in || ''; // 过期时效 let expires_in = hasToken.expires_in || ''; // 过期时效
let loginTime = hasToken.loginTime || ''; // 用户登陆时间 let loginTime = hasToken.loginTime || ''; // 用户登陆时间
......
...@@ -54,7 +54,6 @@ Page({ ...@@ -54,7 +54,6 @@ Page({
let expires_in = dd.getStorageSync({ key: 'token' }).data.expires_in; let expires_in = dd.getStorageSync({ key: 'token' }).data.expires_in;
let refresh_token = dd.getStorageSync({ key: 'token' }).data.refresh_token; let refresh_token = dd.getStorageSync({ key: 'token' }).data.refresh_token;
let mingUserId = dd.getStorageSync({ key: 'mingUserId' }).data let mingUserId = dd.getStorageSync({ key: 'mingUserId' }).data
console.log(dd.getStorageSync({ key: 'token' }).data.refresh_token,1111111111)
if(!!hasToken && (new Date().getTime() - hasToken.loginTime < (hasToken.expires_in - 300) * 1000)) { if(!!hasToken && (new Date().getTime() - hasToken.loginTime < (hasToken.expires_in - 300) * 1000)) {
// if(!!hasToken && ((new Date()).getTime() - hasToken.loginTime < 30* 1000)) { // if(!!hasToken && ((new Date()).getTime() - hasToken.loginTime < 30* 1000)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment