调整seeting 用户退出 加载 userinfo
This commit is contained in:
@@ -106,8 +106,12 @@ mui.init({
|
||||
function logout() {
|
||||
localStorage.removeItem("user_token");
|
||||
localStorage.removeItem("user_token_add_time");
|
||||
back();
|
||||
//退出登录之前loading下个人中心
|
||||
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
timer.start();
|
||||
}
|
||||
|
||||
function download(imgUrl) {
|
||||
var suffix = '/qun.png';
|
||||
var downLoader = plus.downloader.createDownload(imgUrl, {
|
||||
@@ -138,6 +142,26 @@ mui.plusReady(function() {
|
||||
});
|
||||
});
|
||||
|
||||
//退出登录等待两秒
|
||||
timer = {
|
||||
countdown:2,
|
||||
start:function(){
|
||||
countdown = 2
|
||||
timer.down()
|
||||
},
|
||||
down:function(){
|
||||
countdown --
|
||||
if(countdown <= 0){
|
||||
back();
|
||||
return;
|
||||
}else{
|
||||
setTimeout(timer.down, 1000)
|
||||
}
|
||||
},
|
||||
cancel:function(){
|
||||
countdown = 0
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user