From acfae14a97e67278c0723114356b308ef161b1dd Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期三, 18 十二月 2024 15:05:11 +0800
Subject: [PATCH] 题库加入购物车

---
 pages/scanResult/index.js |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/pages/scanResult/index.js b/pages/scanResult/index.js
index e9acf13..21cd7d6 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,

--
Gitblit v1.9.1