| | |
| | | console.log(this.data.bookItemDetail.defaultSaleMethodId, 'this.data.bookItemDetail.defaultSaleMethodId'); |
| | | if (!this.data.expire) { |
| | | let bookOrdersId = '' |
| | | let pBookInfo = { |
| | | type: "电子书", |
| | | pId: this.data.bookItemDetail ? this.data.bookDetail.id : '' |
| | | } |
| | | let query = { |
| | | remarks: '电子书', |
| | | remarks: JSON.stringify(pBookInfo), |
| | | requests: [{ |
| | | saleMethodId: this.data.bookItemDetail.defaultSaleMethodId ? this.data.bookItemDetail.defaultSaleMethodId : this.data.bookDetail.defaultSaleMethodId, |
| | | count: 1 |
| | |
| | | this.setData({ |
| | | applyResourceState: true |
| | | }) |
| | | wx.showLoading({ |
| | | title: '加载中', |
| | | }) |
| | | let role = wx.getStorageSync(app.config.userInfoKey).role |
| | | let role = JSON.parse(wx.getStorageSync(app.config.userInfoKey)).role |
| | | if (role) { |
| | | debugger |
| | | if (role == 'Teacher') { |
| | | wx.showLoading({ |
| | | title: '加载中', |
| | | }) |
| | | // 申请教学资源 |
| | | let query = { |
| | | topicIdOrRefCode: 'productDownLoad', |
| | |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | wx.showModal({ |
| | | title: '尊敬的用户,您好!', |
| | | content: '请先进行教师认证!', |
| | | complete: (res) => { |
| | | if (res.cancel) {} |
| | | if (res.confirm) { |
| | | wx.navigateTo({ |
| | | url: '/packageDomain/pages/teacherCertification/index', |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // 教学资源下载前往PC提示Diialog |