From ce3a08b28c16f5cce2185167f8a9030ee16898ed Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期六, 07 九月 2024 14:44:55 +0800 Subject: [PATCH] xiugai --- pages/digitalCourses/digitalCoursesDetails/components/tree/index.js | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pages/digitalCourses/digitalCoursesDetails/components/tree/index.js b/pages/digitalCourses/digitalCoursesDetails/components/tree/index.js index 17d9074..eb23e7c 100644 --- a/pages/digitalCourses/digitalCoursesDetails/components/tree/index.js +++ b/pages/digitalCourses/digitalCoursesDetails/components/tree/index.js @@ -17,6 +17,10 @@ type: Array, value: [], }, + isBuy: { + type: Boolean, + value: false, + }, }, data: { sonPurchaseSaleMethodId: "", @@ -28,13 +32,15 @@ shoppingCart: true, stop: false, cart: true, - canExecute: true + canExecute: true, + isBuy: false, }, ready() {}, onLoad() { this.setData({ sonPurchaseSaleMethodId: [], + isBuy: this.properties.isBuy }); }, methods: { @@ -57,17 +63,23 @@ // 璺宠浆闊宠棰戞挱鏀惧櫒 goPlayer(e) { // 妫�鏌ョ櫥褰曠姸鎬� - console.log(123) const token = wx.getStorageSync(app.config.tokenKey); if (token) { + const item = e.currentTarget.dataset.item; const parent = e.currentTarget.dataset.parent; - console.log('item', item); + const isTry = e.currentTarget.dataset.istry; const parentProductLinkPath = parent ? parent.productLinkPath : wx.getStorageSync("teachResourcesPath"); const parentName = parent ? parent.name : "鏁欏璧勬簮"; let url; + if (!isTry && !this.data.isBuy) { + return wx.showToast({ + icon: 'error', + title: '璇峰厛璐拱璇ヨ绋�', + }) + } if (item.selectType == 'zip') { if (this.properties.applyState == 'Normal') { return wx.showToast({ -- Gitblit v1.9.1