diff --git a/fangija-zsyf/views/setting/setting.html b/fangija-zsyf/views/setting/setting.html index d520c2d..53b4c9d 100644 --- a/fangija-zsyf/views/setting/setting.html +++ b/fangija-zsyf/views/setting/setting.html @@ -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 + } +} \ No newline at end of file