扶桑大红花花花
扶桑大红花花花
  • 发布:2019-07-22 15:16
  • 更新:2019-07-29 17:18
  • 阅读:665

删帖删帖删帖

分类:MUI
2019-07-22 15:16 负责人:无 分享
已邀请:
g***@sina.com

g***@sina.com

var firsts = null;  
mui.back = function back() {  
    //首次按键,提示‘再按一次退出应用’  
    if (!firsts) {  
        firsts = new Date().getTime();  
        plus.nativeUI.toast('再按一次退出应用');  
        setTimeout(function() {  
            firsts = null;  
        }, 2000);  
    } else {  
        if (new Date().getTime() - firsts < 1000) {  
            plus.runtime.quit();  
        }  
    }  
}

可以参考下demo:https://github.com/gs-wenbing/mui-mall

  • 扶桑大红花花花 (作者)

    谢谢,但是我一开始用的就是这种方法,还是按一次就退出,换成提示框也拦不住。

    2019-07-30 13:56

该问题目前已经被锁定, 无法添加新回复