mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-06-12 10:00:57 +08:00
Merge branch 'master' of http://git.homecommunity.cn/supervip/WechatOwnerService
This commit is contained in:
commit
5ccde634c7
@ -15,6 +15,8 @@ import {
|
|||||||
|
|
||||||
import url from '../../../constant/url.js'
|
import url from '../../../constant/url.js'
|
||||||
|
|
||||||
|
import {addMinutes} from "../utils/DateUtil.js"
|
||||||
|
|
||||||
export function pageOnLoad(options) {
|
export function pageOnLoad(options) {
|
||||||
let _key = options.key;
|
let _key = options.key;
|
||||||
if (isNotNull(_key)) {
|
if (isNotNull(_key)) {
|
||||||
@ -28,11 +30,31 @@ export function pageOnLoad(options) {
|
|||||||
getPageWAppId(options);
|
getPageWAppId(options);
|
||||||
|
|
||||||
if (isNull(_key)) {
|
if (isNull(_key)) {
|
||||||
doPageCheckSession(window.location.href,window.location.href,function(){});
|
onLoadHasAuth();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function onLoadHasAuth(){
|
||||||
|
let _url = window.location.href;
|
||||||
|
// if(_url.indexOf('hasLoaded')>-1){
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// _url = _url.indexOf("?")> -1 ?(_url+"&hasLoaded=ON"):(_url+"?hasLoaded=ON")
|
||||||
|
|
||||||
|
let _hasLoadedObj = uni.getStorageSync("_hasLoadedObj");
|
||||||
|
|
||||||
|
let nowDate = new Date();
|
||||||
|
if (_hasLoadedObj && _hasLoadedObj.expireTime > nowDate.getTime()) {
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
uni.setStorageSync("_hasLoadedObj",{
|
||||||
|
expireTime:addMinutes(new Date(),15).getTime()
|
||||||
|
});
|
||||||
|
doPageCheckSession(_url,'',function(){});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* H5 自登陆处理
|
* H5 自登陆处理
|
||||||
* @param {Object} _key 自登陆key
|
* @param {Object} _key 自登陆key
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user