| | |
| | | bookId: options.bookId, |
| | | }); |
| | | this.getResourceClass(); |
| | | console.log(options); |
| | | this.getResourceData({ |
| | | productLinkPath: options.productLinkPath, |
| | | refCode: options.refCode, |
| | |
| | | loading: false, |
| | | openLearnids: result, |
| | | }); |
| | | console.log("教学资源", list); |
| | | } |
| | | } else { |
| | | // 无数据 |
| | |
| | | let item = []; |
| | | let selectAllId = []; |
| | | const child = this.selectComponent("#tree"); |
| | | |
| | | console.log( |
| | | child.data.superiorPurchaseSaleMethodId, |
| | | "superiorPurchaseSaleMethodId" |
| | | ); |
| | | console.log(child.data.sonPurchaseSaleMethodId, "child.data"); |
| | | // console.log(child.data.selectAll, 'selectAll'); |
| | | item = child.data.superiorPurchaseSaleMethodId; |
| | | const sonItem = child.data.sonPurchaseSaleMethodId; |
| | | let selectAll = child.data.selectAll; |
| | | if (selectAll) { |
| | | // console.log(selectAll); |
| | | selectAll.forEach((item) => { |
| | | if (item.saleMethod != 0) { |
| | | // console.log(item, 'item'); |
| | | selectAllId.push(item.saleMethod[0].Id); |
| | | } |
| | | }); |
| | | console.log(selectAllId); |
| | | app.MG.store |
| | | .initOrder({ |
| | | requests: selectAllId.map((id) => ({ |
| | |
| | | .then((res) => { |
| | | if (res) { |
| | | wx.navigateTo({ |
| | | url: |
| | | "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber, |
| | | url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber, |
| | | }); |
| | | selectAllId = []; |
| | | child.setData({ |
| | |
| | | }); |
| | | } |
| | | if (item) { |
| | | console.log(item, "sadsdasd"); |
| | | // 拿到id |
| | | item.forEach((items) => { |
| | | if (items.saleMethod != 0) { |
| | | saleMethodIds.push(items.saleMethod[0].Id); |
| | | } |
| | | }); |
| | | console.log(saleMethodIds, "saleMethodIds"); |
| | | |
| | | app.MG.store |
| | | .initOrder({ |
| | | requests: saleMethodIds.map((id) => ({ |
| | |
| | | .then((res) => { |
| | | if (res) { |
| | | wx.navigateTo({ |
| | | url: |
| | | "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber, |
| | | url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber, |
| | | }); |
| | | |
| | | child.setData({ |
| | |
| | | .then((res) => { |
| | | if (res) { |
| | | wx.navigateTo({ |
| | | url: |
| | | "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber, |
| | | url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber, |
| | | }); |
| | | this.setData({ |
| | | paymentPage: true, |
| | |
| | | }); |
| | | } |
| | | }, |
| | | }); |
| | | }); |