From b212136f20cc7f98c3616c97936978b1d1065b36 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期三, 03 四月 2024 19:32:06 +0800 Subject: [PATCH] 购买 --- packageBookService/pages/bookServices/detail/components/tree/index.js | 33 +++++++++++++++++++++------------ 1 files changed, 21 insertions(+), 12 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js index 8010c50..f87d087 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.js +++ b/packageBookService/pages/bookServices/detail/components/tree/index.js @@ -1,5 +1,7 @@ const util = require("./components/util"); // 寮曞叆灏佽杩囩殑鍔犺浇鎻愮ず -import { loginInfo } from "../../../../../../assets/js/login"; +import { + loginInfo +} from "../../../../../../assets/js/login"; const app = getApp(); Component({ // checked: false, @@ -87,8 +89,7 @@ handleList(tree) { for (let index = 0; index < tree.length; index++) { const item = tree[index]; - if (item.sysType == "CmsItem" && !item.checked) { - } + if (item.sysType == "CmsItem" && !item.checked) {} if (item.children && item.children.length > 0) { this.handleList(item.children); } @@ -216,6 +217,7 @@ // 鎷垮埌鎵�鏈夐」 getAllChildren(id) { let result = []; + function findChildren(item) { if (item.id === id) { if (item.children && item.children.length > 0) { @@ -425,6 +427,8 @@ }); if (shoppingCartGetId.includes(saleMethodId)) { console.log(111); + // this.data.updateShoppingCartHidden(); + // this.data.updateCloudLearning(); wx.showToast({ icon: "error", @@ -435,13 +439,11 @@ }); } else { let query = { - requests: [ - { - saleMethodId: saleMethodId, - storeEventId: null, - // agentCode: '鐢靛瓙涔�' - }, - ], + requests: [{ + saleMethodId: saleMethodId, + storeEventId: null, + // agentCode: '鐢靛瓙涔�' + }, ], }; const addRes = await app.MG.store.addShoppingCart(query); console.log(addRes, "addRes"); @@ -451,7 +453,14 @@ }); } }, + sadd() { + this.triggerEvent('updateShoppingCartHidden'); + this.triggerEvent('updateCloudLearning'); + console.log(789); + }, + }, - catchtap() {}, -}); + + catchtap() {} +}) \ No newline at end of file -- Gitblit v1.9.1