| | |
| | | this.setData({ |
| | | digitalTextId: options.id |
| | | }) |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | if (data) { |
| | | this.digitalTextbooksDetailsGet(this.data.digitalTextId) |
| | | this.getType() |
| | | this.getCertificateList() |
| | | } else { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | this.digitalTextbooksDetailsGet(this.data.digitalTextId) |
| | | this.getType() |
| | | this.getCertificateList() |
| | |
| | | isBuy: false |
| | | }) |
| | | } |
| | | res.datas.publicationDate = moment(res.datas.publicationDate).format('YYYY年MM月DD日') |
| | | res.datas.publicationDate = moment(res.datas.publicationDate).format('YYYY年MM月') |
| | | if (res.datas.icon == '') { |
| | | res.datas.icon = '/static/images/default-book-img.png' |
| | | } |
| | |
| | | |
| | | }, |
| | | onTabClick(e) { |
| | | // debugger |
| | | console.log(e); |
| | | let tab = e.currentTarget.dataset.tab; |
| | | |
| | |
| | | }, |
| | | |
| | | onCertificate() { |
| | | // if (!this.data.isBuy) { |
| | | // wx.showToast({ |
| | | // title: "请先购买,体验完整服务", |
| | | // icon: "none", |
| | | // duration: 1000, |
| | | // }); |
| | | // return false |
| | | // } |
| | | if (!this.data.isBuy) { |
| | | wx.showToast({ |
| | | title: "请先购买,体验完整服务", |
| | | icon: "none", |
| | | duration: 1000, |
| | | }); |
| | | return false |
| | | } |
| | | // if (!this.data.isLearn) { |
| | | // wx.showToast({ |
| | | // title: "您的学习任务还未完成,暂不能申请证书,加油哦!", |
| | |
| | | // }); |
| | | // return false |
| | | // } |
| | | // if (this.data.isCertificate && this.data.isCertificate.state == 'WaitAudit') { |
| | | // wx.showToast({ |
| | | // title: "您申请的证书正在审核中", |
| | | // icon: "none", |
| | | // duration: 1000, |
| | | // }); |
| | | // return false |
| | | // } |
| | | if (this.data.isCertificate && this.data.isCertificate.state == 'WaitAudit') { |
| | | wx.showToast({ |
| | | title: this.data.isCertificate.state == 'WaitAudit' ? "您申请的证书正在审核中" : this.data.isCertificate.state == 'Normal' ? '您已申请证书' : '', |
| | | icon: "none", |
| | | duration: 1000, |
| | | }); |
| | | return false |
| | | } |
| | | |
| | | var page = getCurrentPages().pop(); // 获取当前页面实例 |
| | | page.setData({ |
| | |
| | | //证书查看 |
| | | onClick1() { |
| | | this.setData({ |
| | | images: ['/static/images/certificate/cbzs.jpg'], |
| | | images: ['https://jsek.bnuic.com/home/certificate/szjc.jpg'], |
| | | showIndex: true, |
| | | visible: true, |
| | | }) |
| | | }, |
| | | onClick2() { |
| | | this.setData({ |
| | | images: ['/static/images/certificate/rzzs.jpg'], |
| | | images: ['https://jsek.bnuic.com/home/certificate/jczs.jpg'], |
| | | showIndex: true, |
| | | visible: true, |
| | | }) |