From 94dbbd247ca7a81262909223ce32ed46a2667bf8 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Thu, 12 Apr 2018 20:37:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4seeting=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E9=80=80=E5=87=BA=20=E5=8A=A0=E8=BD=BD=20userinfo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/setting/setting.html | 26 ++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) 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