| | |
| | | type: String, |
| | | value: "", |
| | | }, |
| | | jslx: { |
| | | type: Boolean, |
| | | }, |
| | | }, |
| | | |
| | | /** |
| | |
| | | }) |
| | | }, |
| | | async goTest(e) { |
| | | console.log(e.detail.value.item, 666) |
| | | const value = e.detail.value.item; |
| | | const token = wx.getStorageSync("jsek-token"); |
| | | if (!token) { |
| | |
| | | }); |
| | | // 获取章节下是否有题目 |
| | | let idPathList = []; |
| | | if (this.properties.storeInfo) { |
| | | |
| | | if (this.properties.storeInfo || this.properties.jslx) { |
| | | idPathList.push({ |
| | | id: this.properties.bookInfo.id, |
| | | name: this.properties.bookInfo.name, |
| | |
| | | this.properties.bookInfo.rootCmsItemId |
| | | }&idPathList=${JSON.stringify(idPathList)}&answerTitle=${ |
| | | value.name |
| | | }&answerType=${"option"}&storeInfo=${this.properties.storeInfo}`, |
| | | }&answerType=${"option"}&storeInfo=${this.properties.storeInfo}&jslx=${this.properties.jslx}`, |
| | | }); |
| | | }, |
| | | goMycollect(e) { |
| | |
| | | }); |
| | | }, |
| | | goTest(e) { |
| | | console.log(e, 234) |
| | | const value = e.currentTarget.dataset; |
| | | var myEventDetail = { |
| | | value, |
| | |
| | | teach: [], |
| | | learn: [], |
| | | test: [], |
| | | jslx: true, |
| | | openTeachids: [], |
| | | openLearnids: [], |
| | | openTestids: [], |
| | |
| | | ], |
| | | showIndex: '', |
| | | successOrderNumber: '', |
| | | applicationState: '' // 电子样书申请状态 |
| | | applicationState: '', // 电子样书申请状态 |
| | | |
| | | }, |
| | | |
| | | resetTree: function (e) { |
| | |
| | | }, |
| | | }; |
| | | app.MG.store.getProductDetail(query).then(async (res) => { |
| | | console.log(res.datas, 'res.datas'); |
| | | this.setData({ |
| | | bookDetail: res.datas, |
| | | buyIdList: res.datas.purchasedSaleMethodIdList, |
| | |
| | | ), |
| | | |
| | | }); |
| | | console.log("图书信息", this.data.bookClass); |
| | | }); |
| | | }, |
| | | //请求子商品的文件 |
| | |
| | | this.setData({ |
| | | showIndex: '1' |
| | | }) |
| | | console.log(this.data.bookDetail.icon, '0111111'); |
| | | console.log(this.data.bookDetail.name, '45688'); |
| | | }, |
| | | // 跳转网店 |
| | | goShop(e) { |
| | |
| | | }, |
| | | // 获取 云测试 |
| | | getResourceData(type) { |
| | | this.setData({ |
| | | var that = this |
| | | that.setData({ |
| | | loading: true, |
| | | noResources: false, |
| | | }); |
| | | let query = { |
| | | path: "*", |
| | | queryType: "*", |
| | | storeInfo: this.data.options.storeInfo, |
| | | productId: this.data.bookDetail.id, |
| | | storeInfo: that.data.options.storeInfo, |
| | | productId: that.data.bookDetail.id, |
| | | cmsPath: type.productLinkPath, |
| | | cmsType: '*', |
| | | itemFields: { |
| | |
| | | if (type.refCode == "questionBank") { |
| | | let data = [] |
| | | let result = []; |
| | | if (this.data.options.storeInfo == 'jsek_jslx') { |
| | | const isTSFW = res.datas.cmsDatas[0].datas.filter( |
| | | (item) => |
| | | item.type == 'questionBankFolder' && |
| | | (item.name == '填空题' || |
| | | item.name == '判断题' || |
| | | item.name == '单选题' || |
| | | item.name == '多选题' || |
| | | item.name == '简答题') |
| | | ) |
| | | if (that.data.options.storeInfo == 'jsek_jslx') { |
| | | data = res.datas.cmsDatas[0].datas.filter((item) => item.type == 'questionBankFolder'); |
| | | if (data.length > 0) { |
| | | this.setData({ |
| | | that.setData({ |
| | | test: data, |
| | | loading: false, |
| | | openTeachids: result, |
| | | }); |
| | | } else { |
| | | this.setData({ |
| | | that.setData({ |
| | | noResources: true, |
| | | loading: false, |
| | | }); |
| | | } |
| | | } else { |
| | | data = res.datas.cmsDatas[0].datas.filter((item) => item.type == 'questionBankFolder' && item.childrenFolderCount > 0); |
| | | if (isTSFW.length > 0) { |
| | | data = res.datas.cmsDatas[0].datas.filter((item) => item.type == 'questionBankFolder' && item.childrenFolderCount > 0) |
| | | that.setData({ |
| | | jslx: false, |
| | | }); |
| | | } else { |
| | | data = res.datas.cmsDatas[0].datas.filter((item) => item.type == 'questionBankFolder') |
| | | that.setData({ |
| | | jslx: true, |
| | | }); |
| | | } |
| | | if (data.length > 0) { |
| | | let list = [] |
| | | // 测试 6位// 正式 5位// 测试调用传20,内部7 正式调用传17 内部传6 |
| | | |
| | | const addNum = query.cmsPath.length > 10 ? 7 : query.cmsPath.length > 14 ? 8 : 6 |
| | | const num = query.cmsPath.length + addNum |
| | | this.getTreeList(data, num, list, '\\', addNum) |
| | | list = this.ensureTreeConsistency(list) |
| | | this.findChildIds(list[0].children, result); |
| | | this.setData({ |
| | | test: list[0].children, |
| | | that.getTreeList(data, num, list, '\\', addNum) |
| | | list = that.ensureTreeConsistency(list) |
| | | that.findChildIds(list[0].children, result); |
| | | that.setData({ |
| | | test: list.length == 1 && list[0].name == '题库' ? list[0].children : list, |
| | | loading: false, |
| | | openTeachids: result, |
| | | }); |
| | | } else { |
| | | this.setData({ |
| | | that.setData({ |
| | | noResources: true, |
| | | loading: false, |
| | | }); |
| | |
| | | url, |
| | | }); |
| | | } |
| | | } else { |
| | | console.log(222); |
| | | } |
| | | } else {} |
| | | } else { |
| | | wx.showToast({ |
| | | title: "商品不在有效期", |
| | |
| | | }); |
| | | return false; |
| | | } else if (isApply.state == 'Normal') { |
| | | console.log(isApply.state, "isApply.state") |
| | | const flag = new Date(isApply.feedBack.endDate + ' 23:59:59').getTime() > new Date().getTime() |
| | | if (flag) { |
| | | wx.showToast({ |
| | |
| | | </t-tab-panel> |
| | | <t-tab-panel label="云测试" icon="{{tabValue == 'questionBank' ? testResourceClickIocn : testResourceIocn}}" value="questionBank" style="{{tabPanelstyle}}"> |
| | | <view wx:if="{{!loading}}"> |
| | | <test-resource id="test-resource" list="{{test}}" bookInfo="{{bookDetail}}" openIds="{{openLearnids}}" mockData="{{mockData}}" tab="{{tabValue}}" storeInfo="{{options.storeInfo}}" bind:buyMock="buyMock"></test-resource> |
| | | <test-resource id="test-resource" list="{{test}}" bookInfo="{{bookDetail}}" openIds="{{openLearnids}}" mockData="{{mockData}}" tab="{{tabValue}}" storeInfo="{{options.storeInfo}}" jslx="{{jslx}}" bind:buyMock="buyMock"></test-resource> |
| | | </view> |
| | | </t-tab-panel> |
| | | <t-tab-panel label="云笔记" icon="{{tabValue == 'jsek_note' ? noteClickIcon: noteIcon}}" value="jsek_note" style="{{tabPanelstyle}}"> |
| | |
| | | isCountdownRunning: true, // 是否倒计时 |
| | | countdownTime: 0, // 倒计时时间 |
| | | storeInfo: '', |
| | | jslx: '', |
| | | bookId: "", |
| | | productLinkPath: "", |
| | | rootCmsItemId: "", |
| | |
| | | idPathList: options.idPathList ? JSON.parse(options.idPathList) : [], |
| | | answerType: options.answerType, |
| | | storeInfo: options.storeInfo, |
| | | jslx: options.jslx, |
| | | }); |
| | | wx.setNavigationBarTitle({ |
| | | title: options.answerTitle, |
| | |
| | | const inputData = e.detail.value.detail.value; |
| | | const id = e.detail.value.currentTarget.dataset.id; |
| | | const index = Number(e.detail.value.currentTarget.dataset.index); |
| | | console.log(index); |
| | | const questionList = this.data.questionDataList; |
| | | questionList.forEach((item) => { |
| | | if (item.id == id) { |
| | |
| | | }); |
| | | } |
| | | res.datas.cmsDatas[0].datas.forEach((item, index) => { |
| | | if (this.data.storeInfo) { |
| | | if (this.data.storeInfo || this.data.jslx) { |
| | | if (item.Embedded_QuestionBank_QuestionType == 'singleChoice') { |
| | | pathitem.name = "单选题" |
| | | } else if (item.Embedded_QuestionBank_QuestionType == 'shortAnswer') { |