This commit is contained in:
shijing 2025-10-13 13:42:55 +08:00
commit d6b3f22317
3 changed files with 19 additions and 2 deletions

View File

@ -12,10 +12,8 @@
// #endif
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
methods:{
wxmpLogin: function(needLoad=true) {

View File

@ -17,4 +17,20 @@
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
<script>
document.addEventListener('plusready', function() {
plus.key.addEventListener('backbutton', function() {
// 如果 H5 内部有历史记录,可以返回
if (window.history.length > 1) {
window.history.back();
}
// else {
// // 没有可返回的页面 -> 退出 App或按需修改
// plus.runtime.quit();
// // 如果你不想立即退出,可改成:
// // plus.webview.currentWebview().close();
// }
}, false);
});
</script>
</html>

View File

@ -90,6 +90,9 @@
// #ifdef APP-PLUS
that.appLogin()
// #endif
// #ifdef H5
that.appLogin()
// #endif
// #ifdef MP-WEIXIN
that.wxmpLogin()
// #endif