From 32986b54a0e2661f7ad6ed79f3ef12c4289eace9 Mon Sep 17 00:00:00 2001 From: zhongshujie <2862698242@qq.com> Date: 星期五, 20 十二月 2024 17:52:52 +0800 Subject: [PATCH] Merge refs/remotes/origin/master into refs/heads/master --- packageCourse/pages/course/detail/index.js | 27 +++ packageCourse/pages/course/detail/index.json | 3 packageCourse/pages/course/index.json | 3 packageCourse/pages/course/index.wxss | 17 ++ packageBookService/pages/bookServices/examination/questionOptions/index.js | 3 packageCourse/pages/course/index.wxml | 13 + assets/js/middleGround/api/edu.js | 8 + packageBookService/pages/bookServices/examination/examination.wxml | 5 packageCourse/pages/course/detail/index.wxss | 24 +++ packageCourse/pages/studentClass/index.wxml | 15 +- packageBookService/pages/bookServices/examination/questionOptions/index.wxml | 2 packageCourse/pages/teachClass/index.wxml | 4 packageCourse/pages/course/detail/index.wxml | 14 + pages/cart/index.js | 9 + packageBookService/pages/bookServices/examination/examination.js | 167 ++++++++++++----------- packageCourse/pages/course/index.js | 13 + packageCourse/components/teaching/index.js | 43 ++++- packageCourse/pages/teachClass/detail/index.js | 2 packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml | 2 packageCourse/components/studentManage/index.wxss | 10 + 20 files changed, 261 insertions(+), 123 deletions(-) diff --git a/assets/js/middleGround/api/edu.js b/assets/js/middleGround/api/edu.js index b9e9cb1..62162e5 100644 --- a/assets/js/middleGround/api/edu.js +++ b/assets/js/middleGround/api/edu.js @@ -188,6 +188,14 @@ data }) }, + // 鑾峰彇鍔犲叆鐨勭彮绾у垪琛� + getJoinCourseClassList(data) { + return request({ + url: '/edu/api/ApiGetJoinCourseClassList', + method: 'post', + data + }) + }, } export default eduApi \ No newline at end of file diff --git a/packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml b/packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml index f985a67..8ead846 100644 --- a/packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml +++ b/packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml @@ -113,7 +113,7 @@ data-answerType="errorQuestion" > <view slot="content" class="btn-content"> - <image src="/static/images/bookService/detail/yijiangoumai.png" /> + <image src="/static/images/bookService/detail/cart.png" /> <text class="primary-color">鍔犲叆璐墿杞�</text> </view> </t-button> diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js index 536cd7a..357ec3c 100644 --- a/packageBookService/pages/bookServices/examination/examination.js +++ b/packageBookService/pages/bookServices/examination/examination.js @@ -91,7 +91,6 @@ } const token = wx.getStorageSync(app.config.tokenKey) - if (!token) { loginInfo(app, (data) => { if (data) { @@ -103,7 +102,6 @@ } else { this.init() } - }, /** @@ -761,6 +759,14 @@ }, ], }); this.init(); + } else if (this.data.answerType == 'interaction') { + this.setData({ + countdownTime: 2 * 60 * 60 * 1000, + }); + this.delinteractionInfo(() => { + this.getQuestionList() + this.clearTime(); + }) } else { this.init(); this.clearTime(); @@ -1080,9 +1086,6 @@ questionDataList: questionList, cardList: cardUpdatedList, }); - console.log( - '棰樼洰', this.data.questionDataList - ); }); }); } @@ -2282,10 +2285,9 @@ const query = { start: 0, size: 999, - filterList: [], + infoTypes: [], } 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) @@ -2293,21 +2295,47 @@ item.topicId = data.id } }) - + console.log('鐝骇', res) if (res.datas.length) { this.setData({ classList: res.datas }) // 鍒ゆ柇鐝骇 鏄惁鎵�灞炰簬璇ヤ功 - const flag = res.datas.some(item => item.linkProductDto.product.id == this.data.bookId) - if (!flag) { - this.setData({ - visible: true, - }) + const classData = res.datas.find(item => item.linkProductDto.product.id == this.data.bookId) + if (classData) { + if (classData.userState == 'Normal') { + // 鍔犲叆鐝骇 + this.setData({ + joinGroup: true + }) + } else if (classData.userState == 'WaitValid') { + this.setData({ + submitStatus: true + }) + // 瀹℃牳涓� + wx.showModal({ + title: '鎻愮ず', + content: '璇风瓑寰呰�佸笀瀹℃牳鍔犲叆鐝骇鍚庣瓟棰�', + confirmColor: "#ff6c00", + complete: (res) => { + if (res.cancel) { + wx.navigateBack() + } + if (res.confirm) { + wx.navigateBack() + } + } + }) + } else { + // 鎷掔粷 + this.setData({ + visible: true + }) + } } else { + // 鏈姞鍏ョ彮绾� this.setData({ - visible: false, - joinGroup: true + visible: true }) } } else { @@ -2316,18 +2344,6 @@ }) } - // if (res.datas.length) { - // this.setData({ - // classList: res.datas, - // visible: true - // }) - // } else { - // // 鏈姞鍏ョ彮绾э紝鍞よ捣鍔犲叆鐝骇寮圭獥 - // this.setData({ - // joinGroup: false, - // visible: true - // }) - // } }) }, // 鍔犲叆鐝骇 @@ -2388,9 +2404,9 @@ 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 + currentIndex: value.currentIndex ? value.currentIndex : 0, + subjectiveNum: scoreData ? scoreData.score : 0, + submitStatus: true }); // 鎼哄甫绛旈璁板綍 鑾峰彇棰樼洰 this.getQuestionList(value.dataList); @@ -2403,7 +2419,7 @@ }); }, // 鎻愪氦鏁欏浜掑姩绛旈鏁版嵁 - setinteractionInfo(submitStatus) { + setinteractionInfo() { const list = [] this.data.cardList.forEach(item => { list.push({ @@ -2420,14 +2436,12 @@ score: this.data.subjectiveNum, path: this.data.productLinkPath, }) - console.log('鎻愪氦鏁版嵁', list); app.MG.identity .setUserKey({ setKeyRequests: [{ domain: "interactionData", key: this.data.productLinkPath, value: JSON.stringify({ - submitStatus, currentIndex: this.data.currentIndex, dataList: list }), @@ -2437,12 +2451,11 @@ }, // 澶勭悊鏁欏浜掑姩绛旈 handleClassQuestion() { - 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) + if (isAnswer) this.setinteractionInfo() } else { // 鍋氬畬浜嗕笖鍔犲叆浜嗙彮绾э紝鎻愪氦鍒癿essage if (this.data.classList.length && this.data.joinGroup) { @@ -2450,10 +2463,10 @@ if (item.linkProductDto.product.id == this.data.bookId) this.newTopicMessage(item.topicId) }) - this.setinteractionInfo(true) + this.setinteractionInfo() } else { // 鍋氬畬浜嗭紝娌″姞鍏ョ彮绾� - this.setinteractionInfo(false) + this.setinteractionInfo() } this.setData({ isShowDialog: true @@ -2475,49 +2488,41 @@ state: citem.questionType == 'shortAnswer' ? 'none' : citem.isRight, type: citem.questionType }) - } - const data = { - description: '', - icon: '', - state: 'Normal', - topicIdOrRefCode: String(topicId), - name: this.data.answerTitle, - content: JSON.stringify({ - bookId: this.data.bookId, - userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name, - path: this.data.productLinkPath, - content - }), - type: 'Normal', - cmsTypeRefCode: '', - newDataListRequest: [] - } - app.MG.ugc.newTopicMessage(data).then((res) => { - if (res) { - this.setData({ - isShowDialog: true - }) + const userInfo = JSON.parse(wx.getStorageSync(app.config.userInfoKey)) + const data = { + description: '', + icon: '', + state: 'Normal', + topicIdOrRefCode: String(topicId), + name: this.data.answerTitle, + content: JSON.stringify({ + bookId: this.data.bookId, + userName: userInfo.name ? userInfo.name : userInfo.nickName ? userInfo.nickName : '-', + path: this.data.productLinkPath, + content + }), + type: 'Normal', + cmsTypeRefCode: '', + newDataListRequest: [] } - }) + app.MG.ugc.newTopicMessage(data).then((res) => { + if (res) { + this.setData({ + isShowDialog: true + }) + } + }) + } }, - // 鏂板缓瀛恡opicMessage - // newTopicSubMessage(parentId,topicId) { - // const data = { - // description: '', - // icon: '', - // parentId, - // state: 'Normal', - // topicIdOrRefCode: String(topicId), - // name: this.data.answerTitle, - // content: '', - // type: 'Normal', - // cmsTypeRefCode: '', - // newDataListRequest: [] - // } - // MG.ugc.newTopicMessage(data).then((res) => { - // if (res) { - - // } - // }) - // }, -}); \ No newline at end of file + // 鍒犻櫎鏁欏浜掑姩绛旈璁板綍 + delinteractionInfo(callback) { + app.MG.identity + .delUserKey({ + domain: 'interactionData', + keys: [this.data.productLinkPath] + }) + .then((res) => { + if (callback) callback() + }) + } +}) \ No newline at end of file diff --git a/packageBookService/pages/bookServices/examination/examination.wxml b/packageBookService/pages/bookServices/examination/examination.wxml index cb4691c..64a5873 100644 --- a/packageBookService/pages/bookServices/examination/examination.wxml +++ b/packageBookService/pages/bookServices/examination/examination.wxml @@ -59,6 +59,7 @@ subjectiveGrade="{{subjectiveGrade}}" correctNum="{{correctNum}}" mockSumTime="{{mockData.sumTime}}" + joinGroup="{{joinGroup}}" showId="{{showId}}" bind:setCollect="setCollect" bind:submitPaper="submitPaper" @@ -80,6 +81,4 @@ ></page-container> <!-- 鍔犲叆鐝骇寮圭獥 --> -<join-dialog visible="{{visible}}" bind:joinClass="joinClass"> - -</join-dialog> \ No newline at end of file +<join-dialog visible="{{visible}}" bind:joinClass="joinClass"> </join-dialog> diff --git a/packageBookService/pages/bookServices/examination/questionOptions/index.js b/packageBookService/pages/bookServices/examination/questionOptions/index.js index f4c88f8..dfaa84d 100644 --- a/packageBookService/pages/bookServices/examination/questionOptions/index.js +++ b/packageBookService/pages/bookServices/examination/questionOptions/index.js @@ -57,6 +57,9 @@ }, isShowDialog: { type: Boolean + }, + joinGroup:{ + type:Boolean } }, diff --git a/packageBookService/pages/bookServices/examination/questionOptions/index.wxml b/packageBookService/pages/bookServices/examination/questionOptions/index.wxml index 70bf3e4..af4c963 100644 --- a/packageBookService/pages/bookServices/examination/questionOptions/index.wxml +++ b/packageBookService/pages/bookServices/examination/questionOptions/index.wxml @@ -37,7 +37,7 @@ <view class="li-option" bind:tap="resterBtn" - wx:if="{{answerType == 'option' || (answerType == 'mock' && !submitStatus)}}" + wx:if="{{answerType == 'option' || (answerType == 'mock' && !submitStatus) || (answerType == 'interaction' && !joinGroup)}}" style="color: {{isNight ? '#fff' : '#000'}};" > <image diff --git a/packageCourse/components/studentManage/index.wxss b/packageCourse/components/studentManage/index.wxss index 33a1628..4d35761 100644 --- a/packageCourse/components/studentManage/index.wxss +++ b/packageCourse/components/studentManage/index.wxss @@ -86,6 +86,7 @@ width: 85vw; height: 180px; border-radius: 10rpx; + position: relative; } .block-select-title { @@ -99,7 +100,7 @@ display: flex; justify-content: flex-start; align-items: center; - padding: 70rpx 20rpx; + padding: 50rpx 20rpx; box-sizing: border-box; } @@ -111,7 +112,12 @@ display: flex; justify-content: flex-end; align-items: center; - padding: 0 20rpx; + min-height: 120rpx; + padding: 0rpx 20rpx; + box-sizing: border-box; + position: absolute; + bottom: 0; + right: 0; } diff --git a/packageCourse/components/teaching/index.js b/packageCourse/components/teaching/index.js index 876032f..af77c75 100644 --- a/packageCourse/components/teaching/index.js +++ b/packageCourse/components/teaching/index.js @@ -214,7 +214,6 @@ }, // 澶勭悊鏁版嵁缁撴瀯 chageData(arr, zrr) { - let newData = [] // 棰樺簱棰樼洰绫诲瀷 const questionTypeList = [{ name: '鍗曢�夐', @@ -259,22 +258,30 @@ ] for (let i = 0; i < arr.length; i++) { const item = arr[i] - item.questionTypeList = questionTypeList - for (let j = 0; j < zrr.length; j++) { - const ele = zrr[j] - const qusObj = item.question.find((citem) => citem.cmsItemId == ele.id) - if (qusObj?.cmsItemId) { - ele.userAnswer = qusObj.answer - const index = findIndexByValue(questionTypeList, ele.questionType) - if (index > -1) { - item.questionTypeList[index].data.push(ele) + item.questionTypeList = JSON.parse(JSON.stringify(questionTypeList)); + item.other = [] + for (let j = 0; j < item.question.length; j++) { + const ele = item.question[j] + const data = zrr.find((sitem) => sitem.id == ele.cmsItemId) + const index = findIndexById(zrr, ele.cmsItemId) + if (index > -1) { + item.other[index] = { + ...data, + userAnswer: ele.answer } } } - item.questionTypeList = item.questionTypeList.filter((item) => item.data.length > 0) - newData.push(item) + if (item.other.length > 0) { + item.other.forEach((aitem) => { + const index = findIndexByValue(item.questionTypeList, aitem.questionType) + if (index > -1) { + item.questionTypeList[index].data.push(aitem) + } + }) + } + item.questionTypeList = item.questionTypeList.filter((xitem) => xitem.data.length > 0) } - return newData.filter((item) => item.questionTypeList.length > 0) + return arr }, findIndexByValue(res, type) { for (let i = 0; i < res.length; i++) { @@ -284,6 +291,16 @@ } return -1 // 濡傛灉鏈壘鍒帮紝鍒欒繑鍥� -1 }, + + findIndexById(res, id) { + for (let i = 0; i < res.length; i++) { + if (res[i].id == id) { + return i + } + } + return -1 // 濡傛灉鏈壘鍒帮紝鍒欒繑鍥� -1 + }, + toDetail(e) { const { item diff --git a/packageCourse/pages/course/detail/index.js b/packageCourse/pages/course/detail/index.js index 4a2f495..bdb935c 100644 --- a/packageCourse/pages/course/detail/index.js +++ b/packageCourse/pages/course/detail/index.js @@ -26,6 +26,8 @@ }, courseLoading: true, classLoading: false, + showContentOnly: false, + reason: '', // 鍔犺浇鍙傛暟 bottomLoading: false, isMoreData: false, @@ -49,6 +51,24 @@ title: '鍩烘湰淇℃伅', }) this.getData() + }, + + + showDialog(e) { + const { + item + } = e.currentTarget.dataset; + const str = item.reason ? item.reason : '-' + this.setData({ + showContentOnly: true, + reason: str + }); + }, + + closeDialog() { + this.setData({ + showContentOnly: false + }); }, // 鑾峰彇璇剧▼淇℃伅 @@ -354,14 +374,17 @@ classId, item } = e.currentTarget.dataset - if (item.applyState == 'WaitAudit' || item.applyState == 'Reject') { + if (item.applyState == 'WaitAudit') { wx.showToast({ - title: item.applyState == 'WaitAudit' ? '瀹℃牳涓�' : '鏈�氳繃', + title: '瀹℃牳涓�', duration: 1000, icon: 'none', }) return false } + if (item.applyState == 'Reject') { + return false + } wx.navigateTo({ url: '/packageCourse/pages/teachClass/index?classId=' + classId + '&courseId=' + this.data.courseId + '&author=' + this.data.bookData.author + '&isbn=' + this.data.bookData.isbn + '&bookId=' + this.data.bookData.id + '&rootCmsItemId=' + this.data.bookData.rootCmsItemId + "&bookRefCode=" + this.data.defaultCmsPath, }) diff --git a/packageCourse/pages/course/detail/index.json b/packageCourse/pages/course/detail/index.json index 3a73cdf..49d114f 100644 --- a/packageCourse/pages/course/detail/index.json +++ b/packageCourse/pages/course/detail/index.json @@ -10,6 +10,7 @@ "t-back-top": "tdesign-miniprogram/back-top/back-top", "empty": "/components/empty/index", "t-skeleton": "tdesign-miniprogram/skeleton/skeleton", - "t-loading": "tdesign-miniprogram/loading/loading" + "t-loading": "tdesign-miniprogram/loading/loading", + "t-dialog": "tdesign-miniprogram/dialog/dialog" } } \ No newline at end of file diff --git a/packageCourse/pages/course/detail/index.wxml b/packageCourse/pages/course/detail/index.wxml index 2a71244..b7ca226 100644 --- a/packageCourse/pages/course/detail/index.wxml +++ b/packageCourse/pages/course/detail/index.wxml @@ -67,7 +67,11 @@ <text class="classTag" wx:if="{{item.applyState == 'Normal'}}" style="color: #1dbd11">鐘舵��: 杩涜涓�</text> <text class="classTag" wx:if="{{item.applyState == 'Reject'}}" style="color: red">鐘舵��: 鏈�氳繃</text> <t-icon bindtap="delClass" data-del-id="{{item.id}}" class="delete" wx:if="{{item.applyState == 'Reject'}}" name="delete" color="red" size='18px' /> - <text class="classTag" wx:if="{{item.applyState == 'Reject'}}" style="color: red">鎷掔粷鍘熷洜锛歿{ item.reason != '' ? item.reason : '-' }}</text> + <view wx:if="{{item.applyState == 'Reject'}}" class="reason"> + <text> 鎷掔粷鍘熷洜锛�</text> + <t-tag style="margin-left: 0;" bind:tap="showDialog" data-item="{{item}}" class="margin-16 replay" theme="danger">鐐瑰嚮鏌ョ湅</t-tag> + </view> + <!-- <text class="classTag" wx:if="{{item.applyState == 'Reject'}}" style="color: red">鎷掔粷鍘熷洜锛歿{ item.reason != '' ? item.reason : '-' }}</text> --> <text class="classTag">鐝骇浜烘暟: {{ item.memberCount }} / {{ item.maxUserCount }}</text> <text class="classTag">鏈夋晥鏈燂細{{ item.beginDate }} - {{ item.endDate }}</text> </view> @@ -124,6 +128,14 @@ </view> </view> </t-popup> + <t-dialog visible="{{showContentOnly}}" bind:confirm="closeDialog" close-on-overlay-click> + <view slot="content" class="reasonContent"> + {{reason}} + </view> + <view slot="confirm-btn" style="width: 100%;"> + <t-button style="color: #ff6d00;border-top: 1px solid #eee ;" variant="text" bindtap="closeDialog" size="large" block t-class="external-class">鐭ラ亾浜�</t-button> + </view> + </t-dialog> </view> </view> <view class="tabbar-bottom"> diff --git a/packageCourse/pages/course/detail/index.wxss b/packageCourse/pages/course/detail/index.wxss index ea0891d..1c6380a 100644 --- a/packageCourse/pages/course/detail/index.wxss +++ b/packageCourse/pages/course/detail/index.wxss @@ -122,6 +122,26 @@ font-weight: 700; } +.replay { + margin-left: 20rpx; + background-color: red !important; + border: 0 !important; +} + +.reason { + margin-bottom: 10rpx; +} + +.reasonContent { + color: #666; + font-size: 26rpx; + line-height: 44rpx; +} + +.external-class { + border-radius: 0 !important; +} + .statics { width: 100%; margin-bottom: 40rpx; @@ -274,6 +294,10 @@ top: 55px !important } +.classBox .t-dialog { + border: 1rpx solid #eee; +} + .block-title { padding: 30rpx 20rpx; font-size: 30rpx; diff --git a/packageCourse/pages/course/index.js b/packageCourse/pages/course/index.js index 5179ae4..2579567 100644 --- a/packageCourse/pages/course/index.js +++ b/packageCourse/pages/course/index.js @@ -34,6 +34,7 @@ updateCourse: false, currentCourse: null, submitLoading: false, + showContentOnly: false, // 鍔犺浇鍙傛暟 bottomLoading: false, isMoreData: false, @@ -50,6 +51,18 @@ this.getData() }, + showDialog() { + this.setData({ + showContentOnly: true, + }); + }, + + closeDialog() { + this.setData({ + showContentOnly: false + }); + }, + // 璇剧▼璇︽儏 todetail(e) { const { diff --git a/packageCourse/pages/course/index.json b/packageCourse/pages/course/index.json index 0065610..9806567 100644 --- a/packageCourse/pages/course/index.json +++ b/packageCourse/pages/course/index.json @@ -13,6 +13,7 @@ "t-icon": "tdesign-miniprogram/icon/icon", "t-back-top": "tdesign-miniprogram/back-top/back-top", "t-tag": "tdesign-miniprogram/tag/tag", - "t-loading": "tdesign-miniprogram/loading/loading" + "t-loading": "tdesign-miniprogram/loading/loading", + "t-dialog": "tdesign-miniprogram/dialog/dialog" } } \ No newline at end of file diff --git a/packageCourse/pages/course/index.wxml b/packageCourse/pages/course/index.wxml index 9bf6c59..0261e09 100644 --- a/packageCourse/pages/course/index.wxml +++ b/packageCourse/pages/course/index.wxml @@ -28,7 +28,18 @@ </view> <t-tag class="margin-16" wx:if="{{item.applyState == 'Normal'}}" variant="light" theme="success">浣跨敤涓�</t-tag> </view> - <view wx:if="{{item.applyState == 'Reject'}}" class="reason">鎷掔粷鍘熷洜: {{item.reason}}</view> + <view wx:if="{{item.applyState == 'Reject'}}" class="reason"> + <text> 鎷掔粷鍘熷洜锛�</text> + <t-tag style="margin-left: 0;" bind:tap="showDialog" class="margin-16 replay" theme="danger">鐐瑰嚮鏌ョ湅</t-tag> + <t-dialog visible="{{showContentOnly}}" bind:confirm="closeDialog" close-on-overlay-click> + <view slot="content" class="reasonContent"> + {{item.reason}} + </view> + <view slot="confirm-btn" style="width: 100%;"> + <t-button style="color: #ff6d00;border-top: 1px solid #eee;" variant="text" bindtap="closeDialog" size="large" block t-class="external-class">鐭ラ亾浜�</t-button> + </view> + </t-dialog> + </view> <view class="desc">鎻忚堪锛歿{item.description}}</view> </view> </view> diff --git a/packageCourse/pages/course/index.wxss b/packageCourse/pages/course/index.wxss index b4c7659..dc113a7 100644 --- a/packageCourse/pages/course/index.wxss +++ b/packageCourse/pages/course/index.wxss @@ -71,7 +71,7 @@ justify-content: space-between; align-items: center; box-sizing: border-box; - height: 300rpx; + min-height: 300rpx; border-bottom: 1rpx solid #eee; } @@ -79,8 +79,16 @@ margin-left: 20rpx; background-color: red !important; border: 0 !important; - position: relative; - z-index: 999999; +} + +.reasonContent { + color: #666; + font-size: 26rpx; + line-height: 44rpx; +} + +.external-class { + border-radius: 0 !important; } .courseIcon { @@ -116,6 +124,9 @@ .courseInfo .reason { font-size: 24rpx; color: red; + display: flex; + justify-content: flex-start; + align-items: center; } .courseInfo .desc { diff --git a/packageCourse/pages/studentClass/index.wxml b/packageCourse/pages/studentClass/index.wxml index e64bb0b..b431df0 100644 --- a/packageCourse/pages/studentClass/index.wxml +++ b/packageCourse/pages/studentClass/index.wxml @@ -20,19 +20,18 @@ <text class="classTag" wx:if="{{item.userState == 'WaitValid'}}" style="color: #ef9f29">鐘舵�� : 瀹℃牳涓�</text> <text class="classTag" wx:if="{{item.userState == 'Normal'}}" style="color: #1dbd11">鐘舵�� : 杩涜涓�</text> <text class="classTag" wx:if="{{item.userState == 'Reject'}}" style="color: red">鐘舵�� : 鏈�氳繃</text> - <t-icon bindtap="delClass" data-del-id="{{item.id}}" class="delete" wx:if="{{item.userState == 'Reject'}}" name="delete" color="red" size='18px' /> + <!-- <t-icon bindtap="delClass" data-del-id="{{item.id}}" class="delete" wx:if="{{item.userState == 'Reject'}}" name="delete" color="red" size='18px' /> --> <text class="classTag" wx:if="{{item.userState == 'Reject'}}" style="color: red">鎷掔粷鍘熷洜锛歿{ item.reason != '' ? item.reason : '-' }}</text> <text class="classTag">鐝骇浜烘暟 : {{ item.memberCount }} / {{ item.maxUserCount }}</text> <text class="classTag">鏈夋晥鏈� 锛歿{ item.classTime }}</text> </view> </view> - - </view> - <view class="bottom-loading" wx:if="{{bottomLoading}}"> - <t-loading theme="circular" size="40rpx" text="鍔犺浇涓�..." class="wrapper" /> - </view> - <view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}"> - <text>娌℃湁鏇村浜�</text> + <view class="bottom-loading" wx:if="{{bottomLoading}}"> + <t-loading theme="circular" size="40rpx" text="鍔犺浇涓�..." class="wrapper" /> + </view> + <view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}"> + <text>娌℃湁鏇村浜�</text> + </view> </view> </scroll-view> </view> diff --git a/packageCourse/pages/teachClass/detail/index.js b/packageCourse/pages/teachClass/detail/index.js index 00cea8e..e142417 100644 --- a/packageCourse/pages/teachClass/detail/index.js +++ b/packageCourse/pages/teachClass/detail/index.js @@ -231,7 +231,7 @@ ] for (let i = 0; i < arr.length; i++) { const item = arr[i] - item.questionTypeList = questionTypeList + item.questionTypeList = JSON.parse(JSON.stringify(questionTypeList)) for (let j = 0; j < zrr.length; j++) { const ele = zrr[j] const qusObj = item.question.find((citem) => citem.cmsItemId == ele.id) diff --git a/packageCourse/pages/teachClass/index.wxml b/packageCourse/pages/teachClass/index.wxml index 689dbb9..0ff42df 100644 --- a/packageCourse/pages/teachClass/index.wxml +++ b/packageCourse/pages/teachClass/index.wxml @@ -10,7 +10,7 @@ <studentManage classId="{{classId}}" bookRefCode="{{defaultCmsPath}}" /> </view> <!-- 鏁欏浜掑姩 --> - <view class="teachBox" wx:if="{{tabVal == 'teach'}}"> + <view class="teachBox" wx:if="{{tabVal == 'teach'&& userData.role == 'Teacher'}}"> <Teach classId="{{classId}}" bookId="{{bookId}}" rootCmsItemId="{{rootCmsItemId}}" /> </view> </view> @@ -23,7 +23,7 @@ <t-icon class="tabIcon" name="file-setting" size="24px" /> <text class="text">瀛︾敓绠$悊</text> </view> - <view class="{{tabVal == 'teach'?'tab-pubItem activeTab':'tab-pubItem'}}" data-str="teach" bindtap="tabActive"> + <view wx:if="{{ userData.role == 'Teacher'}}" class="{{tabVal == 'teach'?'tab-pubItem activeTab':'tab-pubItem'}}" data-str="teach" bindtap="tabActive"> <t-icon class="tabIcon" name="system-setting" size="24px" /> <text class="text">鏁欏浜掑姩</text> </view> diff --git a/pages/cart/index.js b/pages/cart/index.js index 7a91a6d..b36954d 100644 --- a/pages/cart/index.js +++ b/pages/cart/index.js @@ -130,8 +130,13 @@ item.productType = "鍥句功鏈嶅姟-鐢靛瓙涔�" if (item.saleMethod.type == 'createProductItemSaleMethod' || item.saleMethod.type == 'createProductFolderSaleMethod') { - item.typeTxt = '浜戝涔�' - item.productType = "鍥句功鏈嶅姟-浜戝涔�" + if (item.linkCmsItems[0].refCode == 'questionBank') { + item.type = '浜戞祴璇�' + item.productType = '鍥句功鏈嶅姟-浜戞祴璇�' + } else { + item.typeTxt = '浜戝涔�' + item.productType = "鍥句功鏈嶅姟-浜戝涔�" + } } } // -- Gitblit v1.9.1