| | |
| | | searchList: [] |
| | | }; |
| | | app.MG.store.getShoppingCartProductList(query).then(res => { |
| | | console.log(res, 'res'); |
| | | res.datas.forEach(item => { |
| | | item.imgUrl = getPublicImage(item.productMonWithLinkDto.product.icon, '', '160'); |
| | | console.log(item); |
| | |
| | | }); |
| | | }, |
| | | goPaymentPage() { |
| | | |
| | | |
| | | const selectedItems = this.data.shoppingCartData.filter(item => item.checked); |
| | | // console.log(selectedItems, 789); |
| | | const selectedIds = selectedItems.map(item => item.id); |
| | | console.log('选中的商品 id:', selectedIds); |
| | | if (selectedIds.length) { |
| | | app.MG.store.shoppingCartCreateOrder({ linkIds: selectedIds }).then(res => { |
| | | console.log(res.orderNumber, 456); |
| | | console.log(res, 456); |
| | | const url = '/pages/cart/paymentPage/index?orderNumber=' + res.orderNumber |
| | | wx.navigateTo({ |
| | | url |
| | | }); |
| | | |
| | | |
| | | }) |
| | | } else { |
| | | |