From 7adfe5210fad2b4ab1b1be41e2d58eb3dd9b2b1a Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期二, 02 四月 2024 09:38:22 +0800 Subject: [PATCH] 代码合并 --- packageBookService/pages/bookServices/detail/components/tree/index.js | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js index 9162c3a..89245ce 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.js +++ b/packageBookService/pages/bookServices/detail/components/tree/index.js @@ -50,7 +50,8 @@ activeValues: [1, 2], webpageSrc: '', cloudShoppingCart: [], - selectAll: [] + selectAll: [], + shoppingCart: true }, ready() { this.setData({ @@ -141,10 +142,15 @@ } }) } else { - if (this.properties.isShowCheck) return true const item = e.currentTarget.dataset.item const parent = e.currentTarget.dataset.parent let url + if (this.properties.isShowCheck && this.resourceIsBuy(item)) { + return wx.showToast({ + icon: 'error', + title: "璇峰厛璐拱璧勬簮" + }) + } if (item.selectType == 'video' || item.learnSelectType == 'video') { url = '/packageDomain/pages/resourceDetails/myVideo/index' } else if (item.selectType == 'audio' || item.learnSelectType == 'audio') { @@ -352,7 +358,6 @@ }) } }) - }, // 瀛愰」鍕鹃�� checkResource(e) { @@ -407,7 +412,9 @@ icon: 'error', title: '宸叉坊鍔�', }) - + this.setData({ + shoppingCart: false + }) } else { let query = { requests: [{ @@ -422,7 +429,6 @@ icon: 'success', title: '娣诲姞鎴愬姛', }) - } }, @@ -433,5 +439,5 @@ // this.setData({ // checkAllValues: event.detail, // }); - } + }, }) \ No newline at end of file -- Gitblit v1.9.1