From 338ad19ee45b5380a0d8433cbbce2a727a576dfa Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期五, 19 四月 2024 17:34:36 +0800 Subject: [PATCH] bug2 --- packageBookService/pages/bookServices/detail/index.js | 34 +++++++++++++++++++++++++++------- 1 files changed, 27 insertions(+), 7 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js index 7cadc31..ff204b8 100644 --- a/packageBookService/pages/bookServices/detail/index.js +++ b/packageBookService/pages/bookServices/detail/index.js @@ -149,7 +149,8 @@ width: '100%' }, ], - showIndex: '' + showIndex: '', + successOrderNumber: '' }, resetTree: function (e) { @@ -378,6 +379,7 @@ }, }; app.MG.store.getProductDetail(query).then(async (res) => { + console.log(res.datas, 'res.datas'); this.setData({ bookDetail: res.datas, buyIdList: res.datas.purchasedSaleMethodIdList, @@ -520,6 +522,7 @@ this.setData({ noFile: true, }); + // debugger if (this.data.bookDetail.pdf) { this.setData({ "fileInfo.bookName": this.data.bookDetail.name, @@ -528,6 +531,7 @@ "fileInfo.freePage": this.data.bookDetail.probationPage, }); } else if (this.data.bookDetail.protectedEpub) { + this.setData({ "fileInfo.bookName": this.data.bookDetail.name, "fileInfo.fileType": "epub", @@ -1107,12 +1111,13 @@ }, // 鐢宠鏁欏璧勬簮 applyResource() { - if (this.data.applyResourceState) { - return wx.showToast({ - icon: "error", - title: "璇峰嬁閲嶅鐐瑰嚮", - }); - } + + // if (this.data.applyResourceState) { + // return wx.showToast({ + // icon: "error", + // title: "璇峰嬁閲嶅鐐瑰嚮", + // }); + // } this.setData({ applyResourceState: true, }); @@ -1470,12 +1475,21 @@ }; // 纭璁㈠崟 const confirmOrderRes = await app.MG.store.confirmOrder(parameter); + console.log(confirmOrderRes.orderNumber, 'confirmOrderRes.orderNumber'); + + + if (confirmOrderRes.orderNumber) { child.changeReceive(false); wx.showToast({ title: "棰嗗彇鎴愬姛", }); this.getBookInfo(this.data.bookId); + this.setData({ + successOrderNumber: confirmOrderRes.orderNumber + }) + + } } catch (error) { console.log(error); @@ -1758,6 +1772,10 @@ } wx.setStorageSync("bookPathList", JSON.stringify(bookPathList)); + this.setData({ + learn: [], + teach: [] + }) this.onLoad({ id: e.detail.id, name: e.detail.name, @@ -1784,6 +1802,8 @@ }); return false; } + + // debugger wx.navigateTo({ url: "/packageBookService/pages/components/webView/index?md5=" + this.data.fileInfo.md5 + -- Gitblit v1.9.1