| | |
| | | this.properties.bookInfo.rootCmsItemId |
| | | }&idPathList=${JSON.stringify(idPathList)}&answerTitle=${ |
| | | value.name |
| | | }&answerType=${"option"}&storeInfo=${this.properties.storeInfo}&jslx=${this.properties.jslx}`, |
| | | }&answerType=${value.refCode ?? "option"}&storeInfo=${this.properties.storeInfo}&jslx=${this.properties.jslx}`, |
| | | }); |
| | | } |
| | | }, |
| | |
| | | jslx: false, |
| | | }); |
| | | } else { |
| | | data = res.datas.cmsDatas[0].datas.filter((item) => item.type == 'questionBankFolder' && |
| | | item.refCode != 'jsek_interaction') |
| | | data = res.datas.cmsDatas[0].datas.filter((item) => item.type == 'questionBankFolder') |
| | | // && item.refCode != 'jsek_interaction' |
| | | that.setData({ |
| | | jslx: true, |
| | | }); |
| | |
| | | } else { |
| | | wx.showToast({ |
| | | icon: 'error', |
| | | title: '请选择加入班级', |
| | | title: '请选择后确认', |
| | | }) |
| | | } |
| | | }, |
| | |
| | | filterList: [], |
| | | } |
| | | app.MG.identity.joinedGroupByList(query).then((res) => { |
| | | console.log('班级信息', res); |
| | | res.datas.forEach(async item => { |
| | | item.topicId = null |
| | | const data = await this.getTopicInfo(item.id) |
| | |
| | | item.topicId = data.id |
| | | } |
| | | }) |
| | | |
| | | if (res.datas.length) { |
| | | this.setData({ |
| | | joinGroup: true, |
| | | classList: res.datas, |
| | | classList: res.datas |
| | | }) |
| | | // 判断班级 是否所属于该书 |
| | | const flag = res.datas.some(item => item.linkProductDto.product.id == this.data.bookId) |
| | | if (!flag) { |
| | | this.setData({ |
| | | visible: true, |
| | | }) |
| | | } else { |
| | | // 未加入班级,唤起加入班级弹窗 |
| | | this.setData({ |
| | | joinGroup: false, |
| | | visible: true |
| | | visible: false, |
| | | joinGroup: true |
| | | }) |
| | | } |
| | | } else { |
| | | this.setData({ |
| | | visible: true, |
| | | }) |
| | | } |
| | | |
| | | // if (res.datas.length) { |
| | | // this.setData({ |
| | | // classList: res.datas, |
| | | // visible: true |
| | | // }) |
| | | // } else { |
| | | // // 未加入班级,唤起加入班级弹窗 |
| | | // this.setData({ |
| | | // joinGroup: false, |
| | | // visible: true |
| | | // }) |
| | | // } |
| | | }) |
| | | }, |
| | | // 加入班级 |
| | |
| | | .then((res) => { |
| | | if (res.length) { |
| | | let value = JSON.parse(res[0].value); |
| | | const scoreData = value.dataList.find(item => item.name == "客观题得分" && item.path == this.data.productLinkPath) |
| | | this.setData({ |
| | | submitStatus: value.submitStatus, |
| | | currentIndex: value.currentIndex, |
| | | subjectiveNum: scoreData ? scoreData.score : 0 |
| | | }); |
| | | // 携带答题记录 获取题目 |
| | | this.getQuestionList(value.dataList); |
| | |
| | | })) |
| | | }) |
| | | }) |
| | | list.push({ |
| | | name: "客观题得分", |
| | | score: this.data.subjectiveNum, |
| | | path: this.data.productLinkPath, |
| | | }) |
| | | console.log('提交数据', list); |
| | | app.MG.identity |
| | | .setUserKey({ |
| | |
| | | }, |
| | | // 处理教学互动答题 |
| | | handleClassQuestion() { |
| | | debugger |
| | | console.log(1, this.data.questionDataList); |
| | | const flag = this.data.questionDataList.some(item => !item.userAnswer) |
| | | if (flag) { |
| | | // 没做完,保存即可 |
| | | const isAnswer = this.data.questionDataList.some(item => item.userAnswer) |
| | | if (isAnswer) this.setinteractionInfo(false) |
| | | } else { |
| | | // 做完了,提交到message |
| | | this.setinteractionInfo(true) |
| | | if (this.data.classList.length) { |
| | | // 做完了且加入了班级,提交到message |
| | | if (this.data.classList.length && this.data.joinGroup) { |
| | | this.data.classList.forEach(item => { |
| | | if (item.linkProductDto.product.id == this.data.bookId) |
| | | this.newTopicMessage(item.topicId) |
| | | }) |
| | | this.setinteractionInfo(true) |
| | | } else { |
| | | // 做完了,没加入班级 |
| | | this.setData({ |
| | | isShowDialog: true |
| | | }) |
| | | this.setinteractionInfo(false) |
| | | } |
| | | |
| | | } |
| | | this.setData({ |
| | | submitStatus: true |
| | |
| | | observers: {}, |
| | | detached() { |
| | | if (innerAudioContext) { |
| | | try { |
| | | innerAudioContext.stop(); |
| | | innerAudioContext.destroy(); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | }, |
| | |
| | | }, |
| | | observers: { |
| | | countdownTime: function (newValue, oldValue) { |
| | | if (this.properties.answerType == "option") { |
| | | if (this.properties.answerType == "option" || this.properties.answerType == 'interaction') { |
| | | this.setData({ |
| | | useTime: this.formatTime( |
| | | 2 * 60 * 60 * 1000 - this.properties.countdownTime |
| | |
| | | // this.getRules(); |
| | | this.getProductByCode(); |
| | | } else { |
| | | debugger |
| | | this.setData({ |
| | | isOther: true |
| | | }) |
| | | } |
| | | } catch (error) { |
| | | console.log(error); |
| | | debugger |
| | | this.setData({ |
| | | isOther: true |
| | | }) |
| | |
| | | const list = JSON.parse(res.config); |
| | | console.log('code', res, list); |
| | | if (this.data.result) { |
| | | |
| | | const type = res.saleMethodList[0].type |
| | | this.setData({ |
| | | goodsData: res, |