登陆时处理localStorage及删除加载时的垃圾代码
This commit is contained in:
parent
687fbf7551
commit
c8511d3e8a
16
js/index.js
16
js/index.js
@ -46,24 +46,24 @@ mui.back = function() {
|
|||||||
//获取cid用于推送
|
//获取cid用于推送
|
||||||
mui.plusReady(function() {
|
mui.plusReady(function() {
|
||||||
// var cid = plus.push.getClientInfo().clientid;
|
// var cid = plus.push.getClientInfo().clientid;
|
||||||
var timer = 0;
|
// var timer = 0;
|
||||||
timer = setInterval(function() {
|
// timer = setInterval(function() {
|
||||||
getData();
|
// getData();
|
||||||
}, 3000)
|
// }, 3000)
|
||||||
getData();
|
getData();
|
||||||
|
|
||||||
function getData() {
|
function getData() {
|
||||||
|
|
||||||
if (!localStorage.getItem('isFirstDownlodad')) {
|
if (!localStorage.getItem('isFirstDownlodad')) {
|
||||||
localStorage.setItem('isFirstDownlodad', true);
|
localStorage.setItem('isFirstDownlodad', true);
|
||||||
}
|
}
|
||||||
clearInterval(timer);
|
// clearInterval(timer);
|
||||||
localStorage.setItem('cssUrl', "../css/");
|
localStorage.setItem('cssUrl', "../css/");
|
||||||
localStorage.setItem('jsUrl', "../js/");
|
localStorage.setItem('jsUrl', "../js/");
|
||||||
$('nav').css('display', 'block');
|
$('nav').css('display', 'block');
|
||||||
$('#bg').css('display', 'none');
|
$('#bg').css('display', 'none');
|
||||||
var ipxSizeTop = 0;
|
var ipxSizeTop = 0;
|
||||||
var ipxSizeBottom = 0;
|
var ipxSizeBottom = 0;
|
||||||
localStorage.setItem('ipxSizeTop', ipxSizeTop);
|
localStorage.setItem('ipxSizeTop', ipxSizeTop);
|
||||||
localStorage.setItem('ipxSizeBottom', ipxSizeBottom);
|
localStorage.setItem('ipxSizeBottom', ipxSizeBottom);
|
||||||
// TODO: 这个就是检测新版本的方法 -> init@start.js 先注释了,避免打不开
|
// TODO: 这个就是检测新版本的方法 -> init@start.js 先注释了,避免打不开
|
||||||
|
@ -10,6 +10,8 @@ mui.init({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
mui.plusReady(function() {
|
mui.plusReady(function() {
|
||||||
|
localStorage.removeItem("userId")
|
||||||
|
localStorage.removeItem("userName")
|
||||||
$('.loginbg').height(window.screen.height);
|
$('.loginbg').height(window.screen.height);
|
||||||
$('.btn').attr('id','Tcaptcha');
|
$('.btn').attr('id','Tcaptcha');
|
||||||
$('.btn').attr('data-appid','2089606583');
|
$('.btn').attr('data-appid','2089606583');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user