From 892efc9976feb68ce1a3a4d759317e2585d67ebe Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期六, 07 九月 2024 18:16:18 +0800 Subject: [PATCH] bug修改 --- packagePersonal/pages/myOrder/index.js | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packagePersonal/pages/myOrder/index.js b/packagePersonal/pages/myOrder/index.js index a0dd2bd..075570e 100644 --- a/packagePersonal/pages/myOrder/index.js +++ b/packagePersonal/pages/myOrder/index.js @@ -49,7 +49,6 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - console.log(options); this.getDataList(false) }, @@ -80,7 +79,6 @@ getDataList(isReachBottom) { var searchArr = []; - console.log(this.data.searchText, "earch") if (this.data.searchText != undefined && this.data.searchText != "") { searchArr.push({ compareType: "Contains", @@ -156,8 +154,11 @@ loading: false }) } else { + wx.showToast({ + icon: 'error', + title: '鏆傛棤鏁版嵁', + }) this.setData({ - list: [], skeletonLoding: false, loading: false }) @@ -168,25 +169,26 @@ }) }, onSearchOrder(e) { + console.log(e.detail.value); this.setData({ searchText: e.detail.value, }) this.getDataList(false); }, async goBookDetails(e) { + console.log(e.currentTarget.dataset); const { book, remarks } = e.currentTarget.dataset; let parentData = null; let bookId = book.orderSaleMethod.product.id; - if (remarks == null) { - parentData = await app.MG.store.getProductBySaleMethod({ - 'saleMethodId': book.orderSaleMethod.id - }) + + parentData = await app.MG.store.getProductBySaleMethod({ + 'saleMethodId': book.orderSaleMethod.id + }) + if (parentData.parentProduct.length > 0) { bookId = parentData.parentProduct[parentData.parentProduct.length - 1].id; - } else if (remarks != null && JSON.stringify(remarks).slice(1, -1) == 'object' && JSON.parse(remarks).pId) { - bookId = JSON.parse(remarks).pId } wx.navigateTo({ url: `/packageBookService/pages/bookServices/detail/index?id=${bookId}&name=${book.name}`, -- Gitblit v1.9.1