From f058f6f1b35f413000ea81d7df92b4bd021c6b6f Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期二, 08 七月 2025 16:24:00 +0800 Subject: [PATCH] 销售方式跳转、扫码、Isbn弹框、出版日期 --- pages/scanResult/index.js | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 deletions(-) diff --git a/pages/scanResult/index.js b/pages/scanResult/index.js index e9acf13..ae8c1a6 100644 --- a/pages/scanResult/index.js +++ b/pages/scanResult/index.js @@ -30,17 +30,18 @@ result, textValue: result.type == "PromoteCode" ? '棰嗗彇' : '婵�娲�' }) + wx.setNavigationBarTitle({ + title: result.type == "PromoteCode" ? '棰嗗彇浼樻儬鍗�' : '婵�娲诲晢鍝�', + }) // this.getRules(); this.getProductByCode(); } else { - debugger this.setData({ isOther: true }) } } catch (error) { console.log(error); - debugger this.setData({ isOther: true }) @@ -97,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; @@ -143,7 +145,9 @@ showCancel: false, success(res) { if (res.confirm) { - wx.navigateBack() + wx.switchTab({ + url: '/pages/home/home', + }) } } }) @@ -165,7 +169,6 @@ const list = JSON.parse(res.config); console.log('code', res, list); if (this.data.result) { - const type = res.saleMethodList[0].type this.setData({ goodsData: res, @@ -241,7 +244,6 @@ item.icon ? item.icon = item.icon : item.icon = "/static/images/default-book-img.png", item.itemType = this.data.goodsData.saleMethodList[0].type == 'createProductFolderSaleMethod' ? '鐩綍' : this.data.goodsData.saleMethodList[0].type == 'createProductItemSaleMethod' ? '璧勬簮' : '鐢靛瓙涔�' }) - console.log(1, res.datas[0]); that.setData({ productInfo: res.datas }) -- Gitblit v1.9.1