From c0ff00c32bca4077b140d0d69b2863851ae31273 Mon Sep 17 00:00:00 2001
From: zhongshujie <2862698242@qq.com>
Date: 星期二, 08 七月 2025 16:29:17 +0800
Subject: [PATCH] 优化

---
 packageBookService/pages/psychologyAnswer/psychologyAnswer.js                        |   12 +++++++-----
 packageBookService/pages/bookServices/detail/components/testResource/testResource.js |   14 ++++++++------
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/components/testResource/testResource.js b/packageBookService/pages/bookServices/detail/components/testResource/testResource.js
index 97ead59..f508d9c 100644
--- a/packageBookService/pages/bookServices/detail/components/testResource/testResource.js
+++ b/packageBookService/pages/bookServices/detail/components/testResource/testResource.js
@@ -82,10 +82,10 @@
           },
         });
       }
-      // if (!this.data.isBuyBank) return wx.showToast({
-      //   icon: 'error',
-      //   title: '璇峰厛璐拱棰樺簱',
-      // })
+      if (!this.data.isBuyBank) return wx.showToast({
+        icon: 'error',
+        title: '璇峰厛璐拱棰樺簱',
+      })
       wx.showLoading({
         title: "鍔犺浇涓�",
       });
@@ -131,10 +131,12 @@
       if (value.refCode == "psychology") {
         const listName = value.name
         const listId = value.id
+        const bookId = this.data.bookInfo.id
+        const bookName = this.data.bookInfo.name
+        const formPath = this.data.tab
         wx.navigateTo({
           url: `/packageBookService/pages/psychologyAnswer/psychologyAnswer?listName=${
-            listName
-        }&listId=${listId}`
+            listName}&listId=${listId}&bookId=${bookId}&bookName=${bookName}&formPath=${formPath}`
         })
       } else {
         wx.navigateTo({
diff --git a/packageBookService/pages/psychologyAnswer/psychologyAnswer.js b/packageBookService/pages/psychologyAnswer/psychologyAnswer.js
index f7322cf..f4bbd95 100644
--- a/packageBookService/pages/psychologyAnswer/psychologyAnswer.js
+++ b/packageBookService/pages/psychologyAnswer/psychologyAnswer.js
@@ -40,10 +40,12 @@
   onLoad(options) {
     // 鍦ㄦ杩涜鏄惁璐拱鐨勬煡璇�
     const questionId = options.listId;
+    const bookId = options.bookId
+    const bookName = options.bookName
+    const formPath = options.formPath
     const query = {
       "cmsItemId": Number(questionId)
     };
-
     app.MG.file.checkCmsItem(query)
       .then((res) => {
         const isBuys = res;
@@ -54,14 +56,14 @@
           wx.showModal({
             icon: 'error',
             title: '娓╅Θ鎻愮ず',
-            content: '璇疯喘涔伴搴擄紝鍗冲皢杩斿洖棣栭〉',
+            content: '璇疯喘涔伴搴擄紝鍗冲皢杩斿洖璐拱椤�',
             confirmText: '纭畾',
             showCancel: false, // 鍏抽棴鍙栨秷鎸夐挳
             success: function (res) {
               if (res.confirm) {
-                wx.switchTab({
-                  url: '/pages/home/home', // 鏇挎崲涓轰綘鐨勯椤佃矾寰�
-                });
+                wx.navigateTo({
+                  url: '/packageBookService/pages/bookServices/detail/index?id=' + bookId + '&name=' + bookName + '&tabValue=' + formPath,
+                })
               }
             }
           });

--
Gitblit v1.9.1