From b83ba3cc4687f21d744e9866e10e30e91229e8a4 Mon Sep 17 00:00:00 2001 From: queenwuli <942534046@qq.com> Date: Thu, 28 Jan 2021 16:23:30 +0800 Subject: [PATCH] gx --- hive-app/pages/login/index.vue | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hive-app/pages/login/index.vue b/hive-app/pages/login/index.vue index 6772133..ee882ce 100644 --- a/hive-app/pages/login/index.vue +++ b/hive-app/pages/login/index.vue @@ -51,6 +51,15 @@ this.isLogin(); } }, + onBackPress(options){ + if (this.lastBackPressed && this.lastBackPressed + 2000 >= Date.now()) { + plus.runtime.quit(); + }else{ + this.lastBackPressed = Date.now(); + this.Toast.info('再按一次退出应用'); + return true; + } + }, methods:{ isLogin(){ let token = this.$httpUtils.getToken(); -- Gitblit v1.9.1