| | |
| | | if (Number(this.data.payPrice) < Number(this.data.price)) { |
| | | this.handleChange() |
| | | } |
| | | console.log(res, "res") |
| | | res.saleMethodLinks.forEach(item => { |
| | | const type = item.orderSaleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product'; |
| | | item.type = type; // 将type设置为item对象的属性,而不是使用setData |
| | | item.paymentIcon = getPublicImage(item.orderSaleMethod.product.icon) |
| | | item.price = item.orderSaleMethod.price.toFixed(2) |
| | | if (item.orderSaleMethod.product.cmsTypeRefCode == 'jsek_digitalTextbooks') { |
| | | item.typeTxt = '数字教材' |
| | | item.productType = "数字教材" |
| | |
| | | } else { |
| | | item.typeTxt = '电子书' |
| | | item.productType = "图书服务-电子书" |
| | | |
| | | if (item.orderSaleMethod.type == 'createProductItemSaleMethod') { |
| | | item.typeTxt = '云学习' |
| | | item.productType = "图书服务-云学习" |
| | | } |
| | | if (item.orderSaleMethod.cmsItemList.length && item.orderSaleMethod.cmsItemList[0].type == "questionBankFolder") { |
| | | item.typeTxt = '题库' |
| | | item.productType = "图书服务-云测试" |
| | | } |
| | | } |
| | | }) |
| | |
| | | orderNum: this.data.orderGoods |
| | | } |
| | | app.MG.store.confirmOrder(query).then(res => { |
| | | Toast({ |
| | | context: this, |
| | | selector: '#t-toast', |
| | | message: '领取成功', |
| | | theme: 'success', |
| | | direction: 'column', |
| | | wx.showToast({ |
| | | title: '领取成功', |
| | | icon: 'success', |
| | | complete: res => { |
| | | setTimeout(() => { |
| | | wx.navigateBack() |
| | | }, 1000); |
| | | } |
| | | }); |
| | | wx.navigateBack() |
| | | |
| | | }) |
| | | } |
| | | }) |