diff --git a/src/pages/index/index.ux b/src/pages/index/index.ux index 67de9af..63f3763 100644 --- a/src/pages/index/index.ux +++ b/src/pages/index/index.ux @@ -716,6 +716,17 @@ export default { vibrator.vibrate({ mode: 'short' }) + }, + + onBackPress() { + console.log('触发:onBackPress') + // 如果详情页打开,则关闭详情页返回列表 + if (this.showDetailPage) { + this.hideDetail() + return true // 自己处理,不执行系统默认返回 + } + // 否则执行系统默认返回行为(退出应用) + return false } }