From e5f0fcb8e803767a2483d21cb1e8b38cb90e7de5 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期三, 13 十一月 2024 16:48:24 +0800
Subject: [PATCH] 文件状态

---
 packageBookService/pages/bookServices/detail/components/tree/index.js |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js
index a6e144b..d503e4e 100644
--- a/packageBookService/pages/bookServices/detail/components/tree/index.js
+++ b/packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -211,12 +211,13 @@
         let file = item.fileMap[item.file] ? item.fileMap[item.file] : item.fileMap[item.freeFile]
         if (file && file.protectType !== "Public") {
           return wx.showToast({
-            icon: "error",
+            icon: "none",
             title: "璧勬簮涓嶅彲鐢紝璇疯仈绯荤鐞嗗憳",
           });
         }
       }
       if (this.properties.tab == "jsek_cloudLearning") {
+
         // 1.鎵惧嚭鎵�鏈夌埗绾х洰褰曞拰鏈韩(鏈夐攢鍞柟寮�) 鍜� 浜戝涔犳湰韬�(鏈夐攢鍞柟寮�) 鏀惧埌涓�涓暟缁�  涓虹┖鍒欐殏鏈紑鏀鹃攢鍞�
         let learn = []
         if (this.properties.isCloundHaveSaleMethod) {
@@ -240,6 +241,16 @@
           icon: 'error',
           title: '璇峰厛璐拱璇ヨ祫婧�',
         })
+        if (item.protectedFile || item.freeFile) {
+          let file = item.fileMap[item.protectedFile] ? item.fileMap[item.protectedFile] : item.fileMap[item.freeFile]
+          if (file && file.protectType !== "Public") {
+            return wx.showToast({
+              icon: 'none',
+              title: "璧勬簮涓嶅彲鐢紝璇疯仈绯荤鐞嗗憳",
+            });
+          }
+        }
+
       }
       let url;
       if (item.selectType == "video" || item.learnSelectType == "video") {
@@ -498,7 +509,7 @@
       });
       if (shoppingCartGetId.includes(saleMethodId)) {
         wx.showToast({
-          icon: "error",
+          icon: "success",
           title: "宸叉坊鍔�",
         });
         this.setData({

--
Gitblit v1.9.1