From 14ed505ae64153919fcfedbcdfc03e508a1ffa50 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期四, 02 一月 2025 15:12:08 +0800
Subject: [PATCH] 题库扫码未购买优化

---
 packageBookService/pages/bookServices/examination/examination.js |    7 +++++--
 packagePersonal/pages/myOrder/index.js                           |    1 -
 packageBookService/pages/bookServices/detail/index.js            |   15 ++++++++++-----
 3 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js
index 978eb97..6faf542 100644
--- a/packageBookService/pages/bookServices/detail/index.js
+++ b/packageBookService/pages/bookServices/detail/index.js
@@ -271,8 +271,6 @@
       this.setData({
         tabValue: options.tabValue,
       });
-
-
     }
   },
 
@@ -394,7 +392,6 @@
   },
   // 鑾峰彇鍥句功璇︽儏
   getBookInfo(id) {
-    console.log(id, "id")
     this.setData({
       "mockData'.id": 0,
       "mockData.price": 0,
@@ -473,6 +470,16 @@
           await this.getBookClass(classData);
         }
       }
+      // 鎵爜浠庨搴撹烦杞洖鍥句功璇︽儏
+      const localData = wx.getStorageSync('tabValue')
+      if (localData) {
+        this.setData({
+          tabValue: localData
+        })
+        wx.removeStorage({
+          key: 'tabValue',
+        })
+      }
       if (this.data.tabValue == 'questionBank' || this.data.tabValue == 'jsek_cloudLearning' || this.data.tabValue == 'jsek_teachingResources') {
         const checkData = this.data.cmsDatas.find(
           (item) => item.refCode == this.data.tabValue
@@ -516,7 +523,6 @@
         "bookDetail.paperPrice": this.numFormat(
           this.data.bookDetail.paperPrice
         ),
-
       });
     });
   },
@@ -1903,7 +1909,6 @@
   // 浜戝涔犲叏閮ㄨ喘涔�
   async buyCloudLearnClass() {
     const cloundMenu = this.data.resourceCodeList.find((item) => item.refCode == 'jsek_cloudLearning')
-    debugger
     let query = {
       remarks: '浜戝涔�',
       requests: [{
diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js
index cadd43f..282145d 100644
--- a/packageBookService/pages/bookServices/examination/examination.js
+++ b/packageBookService/pages/bookServices/examination/examination.js
@@ -654,11 +654,14 @@
       cancelColor: "#949494",
       editable: false, //鏄惁鏄剧ず杈撳叆妗�
       showCancel: false,
-      complete: (res) => {
+      complete: () => {
         this.setData({
           submitStatus: true
         })
-        wx.navigateBack()
+        wx.setStorageSync('tabValue', 'questionBank')
+        wx.navigateTo({
+          url: `/packageBookService/pages/bookServices/detail/index?id=${res.datas.id}&name=${res.datas.name}`,
+        })
       }
     })
     this.setData({
diff --git a/packagePersonal/pages/myOrder/index.js b/packagePersonal/pages/myOrder/index.js
index f2414aa..20cb563 100644
--- a/packagePersonal/pages/myOrder/index.js
+++ b/packagePersonal/pages/myOrder/index.js
@@ -356,7 +356,6 @@
       } else if (book.orderSaleMethod.type == 'createProductSaleMethod' && book.orderSaleMethod.cmsItemList == 0) {
         title = '鍥句功鏈嶅姟-缁勫嵎'
       } else {
-        debugger
         if (book.orderSaleMethod.cmsItemList.length && book.orderSaleMethod.cmsItemList[0].type == "questionBankFolder") {
           title = '鍥句功鏈嶅姟-浜戞祴璇�'
         } else {

--
Gitblit v1.9.1