登陆时处理localStorage及删除加载时的垃圾代码

This commit is contained in:
2019-09-08 15:38:27 +08:00
parent 687fbf7551
commit c8511d3e8a
2 changed files with 10 additions and 8 deletions

View File

@ -46,10 +46,10 @@ 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() {
@ -57,7 +57,7 @@ mui.plusReady(function() {
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');

View File

@ -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');