| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | this.getDataList(false) |
| | | }, |
| | | |
| | |
| | | loading: false |
| | | }) |
| | | } else { |
| | | wx.showToast({ |
| | | icon: 'error', |
| | | title: '暂无数据', |
| | | }) |
| | | this.setData({ |
| | | skeletonLoding: false, |
| | | loading: false |
| | |
| | | }) |
| | | }, |
| | | onSearchOrder(e) { |
| | | console.log(e.detail.value); |
| | | this.setData({ |
| | | searchText: e.detail.value, |
| | | }) |
| | |
| | | } = e.currentTarget.dataset; |
| | | let parentData = null; |
| | | let bookId = book.orderSaleMethod.product.id; |
| | | |
| | | parentData = await app.MG.store.getProductBySaleMethod({ |
| | | 'saleMethodId': book.orderSaleMethod.id |
| | | }) |
| | | if (parentData.parentProduct.length > 0) { |
| | | bookId = parentData.parentProduct[parentData.parentProduct.length - 1].id; |
| | | const type = book.orderSaleMethod.product.cmsTypeRefCode |
| | | let url = '' |
| | | if (type == 'jsek_mediaBook') { |
| | | // 图书、云学习 |
| | | parentData = await app.MG.store.getProductBySaleMethod({ |
| | | 'saleMethodId': book.orderSaleMethod.id |
| | | }) |
| | | if (parentData.parentProduct.length > 0) { |
| | | bookId = parentData.parentProduct[parentData.parentProduct.length - 1].id; |
| | | } |
| | | url = `/packageBookService/pages/bookServices/detail/index?id=${bookId}&name=${book.name}` |
| | | } else if (type == 'jsek_digitalCourses') { |
| | | // 课程 |
| | | url = '/pages/digitalCourses/digitalCoursesDetails/index?id=' + book.orderSaleMethod.product.id + '&path=' + '' |
| | | } else if (type == 'jsek_digitalTextbooks') { |
| | | // 数字教材 |
| | | url = '/pages/digitalTextbooks/digitalTextbooksDetails/index?id=' + book.orderSaleMethod.product.id |
| | | } |
| | | wx.navigateTo({ |
| | | url: `/packageBookService/pages/bookServices/detail/index?id=${bookId}&name=${book.name}`, |
| | | url |
| | | }); |
| | | }, |
| | | |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | onShareAppMessage() {}, |
| | | // 处理订单类型显示 |
| | | handleOrderType(book) { |
| | | console.log(book); |
| | | const type = book.orderSaleMethod.product.cmsTypeRefCode |
| | | let title = '' |
| | | if (type == 'jsek_mediaBook') { |
| | | if (book.orderSaleMethod.type == 'defaultSaleMethod') { |
| | | title = '图书服务-电子书' |
| | | } else if (book.orderSaleMethod.type == 'createProductSaleMethod' && book.orderSaleMethod.cmsItemList == 0) { |
| | | title = '图书服务-组卷' |
| | | } else { |
| | | if (book.orderSaleMethod.cmsItemList.length && book.orderSaleMethod.cmsItemList[0].type == "questionBankFolder") { |
| | | title = '图书服务-云测试' |
| | | } else { |
| | | title = '图书服务-云学习' |
| | | } |
| | | } |
| | | } else if (type == 'jsek_digitalCourses') { |
| | | title = '数字教材' |
| | | } else { |
| | | title = '数字课程' |
| | | } |
| | | return title |
| | | } |
| | | }) |