From d780880b7a73360c8fc9fead1b429dd8ba3758e3 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期五, 27 九月 2024 14:51:59 +0800
Subject: [PATCH] ts

---
 packageBookService/pages/bookServices/detail/index.js |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js
index 61d49e7..2d430ee 100644
--- a/packageBookService/pages/bookServices/detail/index.js
+++ b/packageBookService/pages/bookServices/detail/index.js
@@ -208,7 +208,8 @@
     fileList: [],
     isShowUp: true,
     protocolShow: false,
-    protocolTxt: ''
+    protocolTxt: '',
+    learnMenu: null
   },
 
   resetTree: function (e) {
@@ -527,6 +528,9 @@
       this.setData({
         resourceCodeList: res.datas.cmsDatas[0].datas,
         learnTaskData: res.datas.cmsDatas[0].datas.filter((item) => item.refCode == 'jsek_learningTasks')[0]
+      })
+      if (res.datas.cmsDatas[0].datas.length) this.setData({
+        learnMenu: res.datas.cmsDatas[0].datas.find(item => item.refCode == 'jsek_cloudLearning')
       })
     })
   },
@@ -1040,9 +1044,9 @@
           new Date(item.saleMethod.find((citem) => citem.SaleType == 'Normal').BeginDate).getTime() <= new Date().getTime()
         ) || (flags && cloundSaleMethod.Price == 0)
         // 鍒ゆ柇浜戝涔犲叏閮ㄨ喘涔版寜閽槸鍚︽樉绀�
-        let isShowBuyCloundMenu = flags && cloundSaleMethod.Price >= 0
+        let isShowBuyCloundMenu = flags && cloundSaleMethod.Price >= 0 && !this.data.buyIdList.includes(cloundSaleMethod.Id)
         // 鍒ゆ柇璧勬簮璐拱鎸夐挳鏄惁鏄剧ず
-        let isShowBuyCloundBtn = res.datas.cmsDatas[0].datas.some(citem => citem.saleMethod.length != 0) || type.saleMethod.length
+        let isShowBuyCloundBtn = !flags && res.datas.cmsDatas[0].datas.some(citem => citem.saleMethod.length != 0)
         // 鍒ゆ柇璐墿杞︽寜閽拰閿佹寜閽槸鍚︽樉绀�
         this.handleTreeData(list).forEach(item => {
           item.isbuy = this.resourceIsBuy(item);
@@ -2806,7 +2810,7 @@
     app.MG.ugc.newTopicMessage(query).then((res) => {
       wx.showToast({
         icon: "success",
-        title: "璇蜂笂浼犺祫婧愭枃浠�",
+        title: "涓婁紶鎴愬姛",
       });
       this.closeDialog()
     })
@@ -2821,5 +2825,10 @@
     this.setData({
       cloundMenuIsBuy: flag
     })
-  }
+  },
+  /**
+   * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
+   */
+  onShareAppMessage() {},
+  onShareTimeline() {}
 })
\ No newline at end of file

--
Gitblit v1.9.1