From 1a5e46e6955225675d21fe04962e82b37e7890ed Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期二, 15 十月 2024 16:02:26 +0800
Subject: [PATCH] ziyuan

---
 pages/digitalCourses/digitalCoursesDetails/components/testTree/index.js |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/pages/digitalCourses/digitalCoursesDetails/components/testTree/index.js b/pages/digitalCourses/digitalCoursesDetails/components/testTree/index.js
index c2bd620..dbc1439 100644
--- a/pages/digitalCourses/digitalCoursesDetails/components/testTree/index.js
+++ b/pages/digitalCourses/digitalCoursesDetails/components/testTree/index.js
@@ -17,12 +17,21 @@
       type: Array,
       value: [],
     },
+    isBuy: {
+      type: Boolean,
+      value: false,
+    },
   },
-  data: {},
+  data: {
+    isBuy: false,
+  },
   ready() {},
 
   onLoad() {
     console.log(this.properties.openIds, "1111")
+    this.setData({
+      isBuy: this.properties.isBuy
+    });
   },
 
   methods: {
@@ -38,6 +47,7 @@
       console.log(e, 666)
       const value = e.currentTarget.dataset.item;
       const parent = e.currentTarget.dataset.parent;
+      const isTry = e.currentTarget.dataset.istry;
       const token = wx.getStorageSync("jsek-token");
       if (!token) {
         return wx.getUserProfile({
@@ -47,6 +57,12 @@
           },
         });
       }
+      if (!isTry && !this.data.isBuy) {
+        return wx.showToast({
+          icon: 'error',
+          title: '璇峰厛璐拱璇ヨ绋�',
+        })
+      }
       // 鑾峰彇绔犺妭涓嬫槸鍚︽湁棰樼洰
       let idPathList = [];
       let query = {

--
Gitblit v1.9.1