网站打包成APP后,按物理返回键直接退出APP请问怎么做
hbuilder吧
全部回复
仅看楼主
level 2
925731256 楼主
网站打包成APP后,按物理返回键直接退出APP请问怎么做
2017年02月09日 09点02分 1
level 9
重写back逻辑
2017年02月13日 10点02分 2
level 1
楼主问题解决了吗
2017年06月05日 06点06分 3
level 1
我会
2017年06月30日 11点06分 4
怎么解决啊,加我微信benhuanyue,有偿提问
2017年07月10日 13点07分
@benhuanyue 加你了
2017年07月10日 22点07分
你的微信
2017年08月11日 05点08分
@_钱小鱼 gc0368
2017年08月12日 01点08分
level 1
请问怎么解决的,我现在也是这个问题。谢谢
2018年07月05日 02点07分 7
level 1
<script>document.addEventListener('plusready', function() { var webview = plus.webview.currentWebview(); plus.key.addEventListener('backbutton', function() { webview.canBack(function(e) { if(e.canBack) { webview.back(); } else { //webview.close(); //hide,quit //plus.runtime.quit(); mui.plusReady(function() { //首页返回键处理 //处理逻辑:1秒内,连续两次按返回键,则退出应用; var first = null; plus.key.addEventListener('backbutton', function() { //首次按键,提示‘再按一次退出应用’ if (!first) { first = new Date().getTime(); mui.toast('再按一次退出应用'); setTimeout(function() { first = null; }, 1000); } else { if (new Date().getTime() - first < 1500) { plus.runtime.quit(); } } }, false); }); } }) }); });</script>
2019年05月14日 01点05分 8
打包网址为app 怎么在改动少的情况下,监听这个返回键,似乎这些代码加在哪个页面,只对这一个页面生效
2019年07月11日 02点07分
1