| | |
| | | "pages/bookServices/detail/index", |
| | | "pages/bookServices/examination/examination", |
| | | "pages/bookServices/webpage/index", |
| | | "pages/components/webView/index" |
| | | "pages/components/webView/index", |
| | | "pages/bookServices/detail/buyResource/index" |
| | | ] |
| | | } |
| | | ], |
| | |
| | | openTeachids: [], |
| | | openLearnids: [], |
| | | openTestids: [], |
| | | applyResourceState: false, // 申请教学资源按钮防抖 |
| | | resourceClassList: [], // 资源所属分类 |
| | | applyState: "", // 教学资源申请状态 |
| | | deadline: "", // 教学资源申请有效日期 |
| | |
| | | }); |
| | | }, |
| | | |
| | | |
| | | |
| | | async buyBook() { |
| | | if (!this.data.expire) { |
| | | let bookOrdersId = '' |
| | |
| | | }, |
| | | |
| | | // 获取教学资源下载是否申请通过 |
| | | getApplyInfo(id) { |
| | | async getApplyInfo(id) { |
| | | // 获取当前时间 |
| | | const currentDate = new Date() |
| | | let query = { |
| | |
| | | appRefCode: app.config.appRefCode, |
| | | topicIdOrRefCode: 'productDownLoad' |
| | | } |
| | | app.MG.ugc.getTopicMessageList(query).then((res) => { |
| | | await app.MG.ugc.getTopicMessageList(query).then((res) => { |
| | | const applyResource = res.datas.find((item) => { |
| | | let content = [] |
| | | try { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | this.setData({ |
| | | applyResourceState: false |
| | | }) |
| | | wx.hideLoading() |
| | | }, |
| | | // 申请教学资源 |
| | | applyResource() { |
| | | if (this.data.applyResourceState) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请勿重复点击', |
| | | }) |
| | | } |
| | | this.setData({ |
| | | applyResourceState: true |
| | | }) |
| | | wx.showLoading({ |
| | | title: '加载中', |
| | | }) |
| | |
| | | } |
| | | ]) |
| | | } |
| | | app.MG.ugc.newTopicMessage(query).then((res) => { |
| | | app.MG.ugc.newTopicMessage(query).then(async (res) => { |
| | | if (res) { |
| | | wx.showToast({ |
| | | title: '申请已提交,请待审核通过后下载', |
| | | }) |
| | | } |
| | | this.getApplyInfo(this.data.bookDetail.id) |
| | | await this.getApplyInfo(this.data.bookDetail.id) |
| | | }) |
| | | // } else { |
| | | // ElMessageBox.confirm('请先进行教师认证!', '尊敬的用户,您好!', { |