| | |
| | | learnSelectType: item.learnSelectType, |
| | | }) |
| | | } else { |
| | | wx.showToast({ |
| | | icon: 'none', |
| | | title: '请先返回资源所在图书详情购买视频资源', |
| | | // wx.showToast({ |
| | | // icon: 'none', |
| | | // title: '请先返回资源所在图书详情购买视频资源', |
| | | // }) |
| | | wx.showModal({ |
| | | title: '温馨提示', |
| | | content: '请先返回资源所在图书详情购买视频资源', |
| | | confirmText: '确定', |
| | | showCancel: false, // 关闭取消按钮 |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | wx.navigateTo({ |
| | | url: `/packageBookService/pages/bookServices/detail/index?id=${this.data.bookDetail.id}&name=${this.data.bookDetail.name}&tabValue=jsek_cloudLearning`, |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | wx.navigateTo({ |
| | | url: `/packageBookService/pages/bookServices/detail/index?id=${this.data.bookDetail.id}&name=${this.data.bookDetail.name}&tabValue=jsek_cloudLearning`, |
| | | }); |
| | | |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.pubulicPlayFun(); |
| | | } else { |
| | | wx.showModal({ |
| | | title: '温馨提示', |
| | | content: '请先返回资源所在图书详情购买视频资源', |
| | | showCancel: false, |
| | | complete: (res) => { |
| | | confirmText: '确定', |
| | | showCancel: false, // 关闭取消按钮 |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | wx.navigateTo({ |
| | | url: `/packageBookService/pages/bookServices/detail/index?id=${this.data.bookDetail.id}&name=${this.data.bookDetail.name}&tabValue=${this.data.formPath}`, |
| | |
| | | </view> |
| | | </view> |
| | | <view class="listBox"> |
| | | <view wx:if="{{specialSubjectList.length > 0}}"> |
| | | <view class="listBox" wx:if="{{specialSubjectList.length > 0}}"> |
| | | <view wx:for="{{specialSubjectList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox"> |
| | | <view class="listItem" bindtap="goSubjectDetail" data-book="{{item}}"> |
| | | <view class="specialSubject-img"> |
| | |
| | | }, |
| | | }) |
| | | .then(res => { |
| | | res.datas.map(item => { |
| | | item.name = item.name + '-' + this.data.goodsData.saleMethodList[0].name |
| | | item.price ? item.price = (item.price).toFixed(2) : ""; |
| | | item.oldPrice ? item.oldPrice = (item.oldPrice).toFixed(2) : ""; |
| | | item.icon ? item.icon = item.icon : item.icon = "/static/images/default-book-img.png", |
| | | item.itemType = this.data.goodsData.saleMethodList[0].type == 'createProductFolderSaleMethod' ? '目录' : this.data.goodsData.saleMethodList[0].type == 'createProductItemSaleMethod' ? '资源' : '电子书' |
| | | }) |
| | | that.setData({ |
| | | productInfo: res.datas |
| | | }) |
| | | if (res.datas?.length > 0) { |
| | | const list = [] |
| | | this.data.goodsData.saleMethodList?.forEach(citem => { |
| | | const obj = { |
| | | name: res.datas[0].name + '-' + citem.name, |
| | | icon: res.datas[0].icon ? res.datas[0].icon : "/static/images/default-book-img.png", |
| | | itemType: citem.type == 'createProductFolderSaleMethod' ? '目录' : citem.type == 'createProductItemSaleMethod' ? '资源' : '电子书', |
| | | price: res.datas[0].price ? (res.datas[0].price.price).toFixed(2) : "", |
| | | oldPrice: res.datas[0].oldPrice ? (res.datas[0].oldPrice).toFixed(2) : '' |
| | | } |
| | | list.push(obj) |
| | | }) |
| | | // res.datas.map(item => { |
| | | // item.name = item.name + '-' + this.data.goodsData.saleMethodList.map(item => item.name) |
| | | // item.price ? item.price = (item.price).toFixed(2) : ""; |
| | | // item.oldPrice ? item.oldPrice = (item.oldPrice).toFixed(2) : ""; |
| | | // item.icon ? item.icon = item.icon : item.icon = "/static/images/default-book-img.png", |
| | | // item.itemType = this.data.goodsData.saleMethodList[0].type == 'createProductFolderSaleMethod' ? '目录' : this.data.goodsData.saleMethodList[0].type == 'createProductItemSaleMethod' ? '资源' : '电子书' |
| | | // }) |
| | | // debugger |
| | | that.setData({ |
| | | productInfo: list |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | |