| | |
| | | residue: 0, // 组卷剩余次数 |
| | | mockList: [] // 用户组卷提交信息 |
| | | }, |
| | | flag: true |
| | | flag: true, |
| | | applyResourceLoading: false |
| | | }, |
| | | |
| | | |
| | |
| | | }) |
| | | } |
| | | } |
| | | console.log('组卷信息', this.data.mockData); |
| | | this.setData({ |
| | | 'bookDetail.publicationDate': this.formatDate(this.data.bookDetail.publicationDate), |
| | | 'bookDetail.class': className, |
| | |
| | | 'bookDetail.oldPrice': this.numFormat(this.data.bookDetail.oldPrice), |
| | | 'bookDetail.paperPrice': this.numFormat(this.data.bookDetail.paperPrice), |
| | | }); |
| | | console.log('图书信息', this.data.bookDetail); |
| | | }); |
| | | |
| | | }, |
| | |
| | | teach: list, |
| | | loading: false |
| | | }) |
| | | console.log('教学资源', this.data.teach); |
| | | this.findChildIds(this.data.teach, this.data.openTeachids = []) |
| | | } else if (type.refCode == 'jsek_cloudLearning') { |
| | | res.datas.cmsDatas[0].datas.forEach(item => { |
| | |
| | | |
| | | // 图书添加购物车 |
| | | async addBookShopcCar() { |
| | | |
| | | const token = wx.getStorageSync('jsek-token') |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | | desc: '用户登录', |
| | | success: (res) => { |
| | | console.log(res); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const shoppingCartGetId = [] |
| | | |
| | | let query = { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | console.log('有效日期', this.data.deadline); |
| | | this.setData({ |
| | | applyResourceLoading: false |
| | | }) |
| | | }, |
| | | // 申请教学资源 |
| | | applyResource() { |
| | | this.setData({ |
| | | applyResourceLoading: true |
| | | }) |
| | | // let role = userStore.userInfo ? userStore.userInfo.role : null |
| | | // if (role) { |
| | | // if (role == 'Teacher') { |
| | |
| | | } |
| | | app.MG.ugc.newTopicMessage(query).then((res) => { |
| | | if (res) { |
| | | Message.success('申请已提交,请待审核通过后下载') |
| | | wx.showToast({ |
| | | title: '申请已提交,请待审核通过后下载', |
| | | }) |
| | | } |
| | | this.getApplyInfo(this.data.bookDetail.id) |
| | | }) |
| | |
| | | async allAddShoppiingCar() { |
| | | const child = this.selectComponent('#learn-resource') |
| | | const token = wx.getStorageSync('jsek-token') |
| | | // if (!token) { |
| | | // return wx.getUserProfile({ |
| | | // desc: '用户登录', |
| | | // success: (res) => { |
| | | // console.log(res); |
| | | // } |
| | | // }) |
| | | // } |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | | desc: '用户登录', |
| | | success: (res) => { |
| | | console.log(res); |
| | | } |
| | | }) |
| | | } |
| | | let shopList = this.handleTreeData(this.data.learn).filter((item) => this.resourceIsBuy(item)) |
| | | this.getShoppingCartProductGet() |
| | | if (!shopList.length) return wx.showToast({ |
| | |
| | | } |
| | | else if (this.data.tabValue == 'jsek_cloudLearning') { |
| | | const tree = this.selectComponent('#tree') |
| | | |
| | | |
| | | tree.onCloudShoppingCart() |
| | | |
| | | |