From b77e8e776af4d81e748e9e21d51b64a11085a195 Mon Sep 17 00:00:00 2001 From: zhongshujie <2862698242@qq.com> Date: 星期四, 19 十二月 2024 10:49:11 +0800 Subject: [PATCH] 未提交退出提示 --- pages/scanResult/index.js | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pages/scanResult/index.js b/pages/scanResult/index.js index d9f65b5..21cd7d6 100644 --- a/pages/scanResult/index.js +++ b/pages/scanResult/index.js @@ -30,6 +30,9 @@ result, textValue: result.type == "PromoteCode" ? '棰嗗彇' : '婵�娲�' }) + wx.setNavigationBarTitle({ + title: result.type == "PromoteCode" ? '棰嗗彇浼樻儬鍗�' : '婵�娲诲晢鍝�', + }) // this.getRules(); this.getProductByCode(); } else { @@ -95,13 +98,14 @@ wx.showModal({ title: '娓╅Θ鎻愮ず', content: res, - showCancel: false + showCancel: false, + success(res) { + if (res.confirm) + wx.switchTab({ + url: '/pages/home/home', + }) + } }) - setTimeout(() => { - wx.navigateTo({ - url: '/pages/codeRecord/index', - }) - }, 2500); }); } else { let that = this; @@ -141,7 +145,9 @@ showCancel: false, success(res) { if (res.confirm) { - wx.navigateBack() + wx.switchTab({ + url: '/pages/home/home', + }) } } }) -- Gitblit v1.9.1