| | |
| | | }) |
| | | }, |
| | | openDialog() { |
| | | console.log(this.properties.bookInfo.name); |
| | | this.setData({ |
| | | submitTitle: this.properties.bookInfo.name, |
| | | showNoteDialog: true |
| | |
| | | }, |
| | | // 弹窗确定按钮 |
| | | confirmSuggest() { |
| | | if (!this.data.submitTitle) { |
| | | const submitTitle = this.data.submitTitle.trim() |
| | | const textvalue = this.data.textvalue.trim() |
| | | if (!submitTitle.length) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请填写笔记标题', |
| | | }) |
| | | } else if (!this.data.textvalue) { |
| | | } else if (!textvalue.length) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请填写笔记内容', |
| | |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | app.MG.ugc |
| | | .delTopicMessage({ messageIds }) |
| | | .delTopicMessage({ |
| | | messageIds |
| | | }) |
| | | .then((res) => { |
| | | wx.showToast({ |
| | | title: '删除成功', |
| | |
| | | submitTitle: note.name, |
| | | noteId: note.id |
| | | }) |
| | | this.openDialog() |
| | | console.log(note.name, this.data.submitTitle); |
| | | this.setData({ |
| | | showNoteDialog: true |
| | | }) |
| | | }, |
| | | // 编辑笔记接口 |
| | | updateNote() { |
| | |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .t-input__placeholder { |
| | | font-size: 28rpx !important |
| | | } |
| | |
| | | }, |
| | | |
| | | data: { |
| | | inputStyle: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding:16rpx', |
| | | inputStyle: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding:16rpx;font-size: 24rpx;', |
| | | placeholderstyle: 'font-size:28rpx', |
| | | dialogKey: '', |
| | | showWithInput: false, |
| | |
| | | </view> |
| | | <view class="phone-input"> |
| | | <t-input |
| | | clearable |
| | | value="{{inputvalue}}" |
| | | slot="content" |
| | | label="" |
| | |
| | | maxlength="{{11}}" |
| | | class="phone" |
| | | style="{{inputStyle}}" |
| | | placeholder-class="t-input__placeholder input-placeholder" |
| | | /> |
| | | </view> |
| | | <view style="width: 100%"> |
| | |
| | | /* pages/bookServices/detail/components/suggest/suggest.wxss */ |
| | | .t-input__placeholder { |
| | | |
| | | |
| | | |
| | | |
| | | .t-input__wrap .t-input__content, |
| | | .t-input__control { |
| | | font-size: 28rpx !important; |
| | | } |
| | | |
| | |
| | | wx.showLoading({ |
| | | title: '加载中', |
| | | }) |
| | | // let role = userStore.userInfo ? userStore.userInfo.role : null |
| | | // if (role) { |
| | | // if (role == 'Teacher') { |
| | | let role = wx.getStorageSync(app.config.userInfoKey).role |
| | | if (role) { |
| | | debugger |
| | | if (role == 'Teacher') { |
| | | // 申请教学资源 |
| | | let query = { |
| | | topicIdOrRefCode: 'productDownLoad', |
| | |
| | | } |
| | | await this.getApplyInfo(this.data.bookDetail.id) |
| | | }) |
| | | // } else { |
| | | // ElMessageBox.confirm('请先进行教师认证!', '尊敬的用户,您好!', { |
| | | // confirmButtonText: '去认证', |
| | | // cancelButtonText: '取消', |
| | | // type: 'warning' |
| | | // }) |
| | | // .then(() => { |
| | | // isShow.value = true |
| | | // }) |
| | | // .catch(() => { }) |
| | | // } |
| | | // } |
| | | } else { |
| | | wx.showModal({ |
| | | title: '尊敬的用户,您好!', |
| | | content: '请先进行教师认证!', |
| | | complete: (res) => { |
| | | if (res.cancel) {} |
| | | if (res.confirm) { |
| | | wx.navigateTo({ |
| | | url: '/packageDomain/pages/teacherCertification/index', |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | // 教学资源下载前往PC提示Diialog |
| | | closeTeachDownload() { |
| | |
| | | }, |
| | | // 下载功能 |
| | | downloadTeach(e) { |
| | | let role = JSON.parse(wx.getStorageSync(app.config.userInfoKey)).role |
| | | if (role && role == 'Teacher') { |
| | | this.setData({ |
| | | isShowTeachDownload: true |
| | | }) |
| | | console.log('zhuan', this.data.isShowTeachDownload); |
| | | } else { |
| | | wx.showModal({ |
| | | title: '尊敬的用户,您好!', |
| | | content: '请先进行教师认证!', |
| | | complete: (res) => { |
| | | if (res.cancel) { |
| | | |
| | | } |
| | | if (res.confirm) { |
| | | wx.navigateTo({ |
| | | url: '/packageDomain/pages/teacherCertification/index', |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | // const data = e.detail.value |
| | | // // const data |
| | | // // let role = userStore.userInfo ? userStore.userInfo.role : null |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .suggest-component .t-input__placeholder { |
| | | font-size: 28rpx !important; |
| | | } |
| | |
| | | this.setData({ |
| | | collectList: JSON.parse(res[0].value) |
| | | }) |
| | | // total.value = collectList.value.length |
| | | } catch (error) {} |
| | | if (this.data.collectList && this.data.collectList.length) { |
| | | await this.getCollectDataList() |
| | |
| | | // 获取收藏夹 |
| | | async getCollectDataList() { |
| | | let questionArr = [] |
| | | // this.setData({ |
| | | // cardList: [{ |
| | | // catalogName: '收藏夹', |
| | | // infoList: [] |
| | | // }] |
| | | // }) |
| | | this.setData({ |
| | | cardList: [{ |
| | | catalogName: '单选题', |
| | |
| | | let shortArr = [] // 简答 |
| | | let multipleChoiceArr = [] // 多选 |
| | | let completionArr = [] // 填空 |
| | | for (let qindex = 0; qindex < this.data.collectList.length; qindex++) { |
| | | const qitem = this.data.collectList[qindex]; |
| | | let query = { |
| | | path: '*', |
| | | cmsPath: this.data.rootCmsItemId, |
| | | cmsType: '*', |
| | | productId: this.data.bookId, |
| | | queryType: '*', |
| | | itemIds: this.data.collectList.map((item) => item + ''), |
| | | itemIds: qitem + '', |
| | | itemFields: { |
| | | Embedded_QuestionBank_Stem: [], |
| | | Embedded_QuestionBank_AnalysisCon: [], |
| | |
| | | Embedded_QuestionBank_Difficulty: [] |
| | | } |
| | | } |
| | | app.MG.store.getProductDetail(query).then((res) => { |
| | | await app.MG.store.getProductDetail(query).then((res) => { |
| | | let questionArr = [] |
| | | res.datas.cmsDatas[0].datas.forEach((item, index) => { |
| | | const questionObj = { |
| | |
| | | questionObj.type = '简答题' |
| | | shortArr.push(questionObj) |
| | | } |
| | | // questionArr.push(questionObj) |
| | | }) |
| | | // this.setData({ |
| | | // questionDataList: questionArr, |
| | | // ['cardList[0].infoList']: questionArr, |
| | | // loading: false, |
| | | // }) |
| | | }) |
| | | } |
| | | this.setData({ |
| | | ['cardList[0].infoList']: singleChoiceArr, |
| | | ['cardList[1].infoList']: judgeArr, |
| | |
| | | questionDataList: questionArr, |
| | | cardList: cardList, |
| | | loading: false |
| | | }) |
| | | }) |
| | | }, |
| | | // 我的错题模式下获取错题id列表 |
| | |
| | | >{{item.userAnswer}}</view |
| | | > |
| | | </view> |
| | | <view class="short-answer-mr"> |
| | | <view class="short-answer-mr" style="margin-bottom: 50rpx"> |
| | | <text |
| | | class="short-answer-fz;" |
| | | style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;" |
| | |
| | | }, |
| | | }; |
| | | app.MG.store.getStoreChannelList(query).then((res) => { |
| | | if (!res.datas.length) { |
| | | this.setData({ |
| | | disabledSecondList: true |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | disabledSecondList: false |
| | | }) |
| | | } |
| | | for (let index = 0; index < res.datas.length; index++) { |
| | | const item = res.datas[index]; |
| | | options.push({ |
| | |
| | | BaseType: 'DateTime' |
| | | } |
| | | } else if (this.data.sortList.value == 'time-desc') { |
| | | debugger |
| | | sort = { |
| | | PublicationDate: 'Desc', |
| | | BaseType: 'DateTime' |
| | |
| | | this.setData({ |
| | | noData: true, |
| | | }) |
| | | if (!this.data.pathList.length) { |
| | | // 未选择二级分类,且无图书 |
| | | this.setData({ |
| | | disabledSecondList: true |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | disabledSecondList: false |
| | | }) |
| | | } |
| | | } |
| | | if (this.data.triggered) { |
| | | this.setData({ |
| | |
| | | `${this.data.assortCheck.code}\\${e.detail.value}` : |
| | | this.data.assortCheck.code; |
| | | console.log(this.data.path); |
| | | |
| | | this.setData({ |
| | | pathList: [], |
| | | stairCode: e.detail.value, |
| | |
| | | path: path, |
| | | 'stairList.value': e.detail.value, |
| | | }); |
| | | this.getBookList(path); |
| | | this.getSecondList(path); |
| | | |
| | | if (e.detail.value == '') { |
| | | this.setData({ |
| | | disabledSecondList: true |
| | | }) |
| | | }); |
| | | } else { |
| | | this.setData({ |
| | | disabledSecondList: false |
| | | }) |
| | | this.getSecondList(path); |
| | | } |
| | | this.getBookList(path); |
| | | console.log(this.data.disabledSecondList); |
| | | }, |
| | | // 二级分类切换 |
| | |
| | | bindchange="onChangeStair" |
| | | /> |
| | | <t-dropdown-item |
| | | disabled="{{disabledSecondList}}" |
| | | wx:if="{{disabledSecondList === false}}" |
| | | disabled="{{false}}" |
| | | label="二级" |
| | | bind:open="openDropdown" |
| | | bind:close="closeDropdown" |