From 89d33476c7ab9bf7a4fbad399685652eabd478de Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期六, 07 九月 2024 11:17:15 +0800 Subject: [PATCH] token --- assets/js/middleGround/api/ugc.js | 8 pages/digitalCourses/digitalCoursesDetails/index.js | 2 packageBookService/pages/bookServices/detail/components/learnTask/index.js | 406 ++++++++++++++++++++++++++++----- packageBookService/pages/bookServices/detail/components/learnTask/index.wxss | 51 ++++ packageBookService/pages/bookServices/detail/components/learnTask/index.wxml | 43 ++- packageBookService/pages/bookServices/detail/components/learnTask/index.json | 2 packageDomain/pages/resourceDetails/myVideo/index.js | 8 packageDomain/pages/resourceDetails/myAudio/index.js | 10 packageBookService/pages/components/webView/index.js | 28 +- pages/digitalCourses/digitalCoursesDetails/components/question/question.js | 2 pages/digitalCourses/digitalCoursesDetails/index.wxss | 105 ++++++++ app.json | 3 packageDomain/pages/resourceDetails/document/index.js | 8 pages/digitalCourses/digitalCoursesDetails/index.wxml | 23 + packageBookService/pages/bookServices/examination/examination.js | 8 15 files changed, 592 insertions(+), 115 deletions(-) diff --git a/app.json b/app.json index 957797f..80256f0 100644 --- a/app.json +++ b/app.json @@ -135,5 +135,6 @@ "scope.userLocation": { "desc": "浣犵殑浣嶇疆淇℃伅灏嗙敤浜庡皬绋嬪簭浣嶇疆鎺ュ彛鐨勬晥鏋滃睍绀�" } - } + }, + "shareAppMessage": true } \ No newline at end of file diff --git a/assets/js/middleGround/api/ugc.js b/assets/js/middleGround/api/ugc.js index aad8265..76b166f 100644 --- a/assets/js/middleGround/api/ugc.js +++ b/assets/js/middleGround/api/ugc.js @@ -70,6 +70,14 @@ data }) }, + // 鑾峰彇MessageList瀛恗essage + getChildTopicMessageList(data) { + return request({ + url: '/ugc/api/ApiAppUserGetSubMessageList', + method: 'post', + data + }) + }, // 鑾峰彇cms璇勮 getCmsItemCommentTopic(data) { return request({ diff --git a/packageBookService/pages/bookServices/detail/components/learnTask/index.js b/packageBookService/pages/bookServices/detail/components/learnTask/index.js index e3a9020..2c5b30a 100644 --- a/packageBookService/pages/bookServices/detail/components/learnTask/index.js +++ b/packageBookService/pages/bookServices/detail/components/learnTask/index.js @@ -5,6 +5,7 @@ * 椤甸潰鐨勫垵濮嬫暟鎹� */ data: { + height: '', //灞忓箷楂樺害 bookId: '', consumer: '', bookInfo: {}, @@ -19,24 +20,56 @@ tasksListData: [], //宸插~鍐欎换鍔″崟messsge taskInfo: {}, //閫変腑浠诲姟鍗曠洰褰� tasksData: {}, //宸插~鍐欎换鍔″崟 - userId: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).id, + userId: 0, + userName: '', isUpdate: false, taskId: 0, //榛樿閫変腑鐩綍id autosize: { maxHeight: 120, minHeight: 80, }, + disabled: false, + dialogVisible: false, + invitee: "", }, - + onShow() { + var that = this; + // 鍔ㄦ�佽幏鍙栧睆骞曢珮搴� + wx.getSystemInfo({ + success: (result) => { + that.setData({ + height: result.windowHeight + }); + }, + }) + }, /** * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { if (options) { + console.log(options, 666) this.setData({ bookId: options.bookId, - consumer: options.consumer + taskId: options.bookId, + consumer: options.consumer, + userId: options.userId, + userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name }); + if (options.consumer) { + this.setData({ + bookId: options.bookId, + taskId: options.bookId, + consumer: options.consumer, + userId: options.userId, + disabled: true + }); + } else { + this.setData({ + userId: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).id, + disabled: false + }); + } this.getResourceData() } @@ -66,36 +99,22 @@ }); if (res.datas.cmsDatas[0].datas) { let list = res.datas.cmsDatas[0].datas - let dataLists = [] - list.forEach(async (item) => { - if (item.childrenFolderCount > 0) { - let query = { - path: '*', - queryType: '*', - productId: this.data.bookId, - cmsPath: item.productLinkPath, - // cmsType: '*', - itemFields: { - SysType: 'CmsFolder' - }, - pading: { - start: 0, - size: 99 - } - } - const data = await app.MG.store.getProductDetail(query).then((res1) => { - // item.children = res1.datas.cmsDatas[0].datas - return res1.datas.cmsDatas[0].datas - }) - item.children = data - } - dataLists.push(item) - }) this.setData({ - menuList: dataLists, - loading: false + menuList: list, }); - console.log(this.data.menuList) + if (this.data.taskId) { + this.data.menuList.forEach((item) => { + if (item.id == this.data.taskId) { + this.setData({ + taskInfo: item, + }); + } + }) + } else { + this.setData({ + taskInfo: this.data.menuList[0], + }); + } } this.getTasksList() }) @@ -104,10 +123,35 @@ getTask(e) { console.log(e, 123) let data = e.currentTarget.dataset.item - this.setData({ - taskShow: true, - }); + if (data.childrenFolderCount > 0) { + let query = { + path: '*', + queryType: '*', + productId: this.data.bookId, + cmsPath: data.productLinkPath, + // cmsType: '*', + itemFields: { + SysType: 'CmsFolder' + }, + pading: { + start: 0, + size: 99 + } + } + app.MG.store.getProductDetail(query).then((res1) => { + this.data.menuList.forEach((item) => { + if (item.id == data.id) { + item.children = res1.datas.cmsDatas[0].datas + } + }) + }) + } else { + this.setData({ + taskShow: true, + }); + } this.taskSelect(data) + }, onVisibleChange(e) { this.setData({ @@ -136,51 +180,56 @@ this.setData({ tasksListData: res.datas, }); + this.taskSelect(this.data.taskInfo) }) }, taskSelect(item) { if (!item.children) { this.setData({ taskInfo: item, - dataList: [] + dataList: [], }); if (this.data.tasksListData.length > 0) { this.data.tasksListData.forEach((item1) => { let content = JSON.parse(item1.content) - if (content.id == this.data.taskInfo.id && content.userId == this.data.userId) { - isUpdate.value = true - tasksData.value = item1 - form.name = content.userName - form.school = content.school - form.class = content.class - form.learnTime = content.learnTime - this.setData({ - isUpdate: true, - tasksData: item1, - name: content.userName, - school: content.school, - class: content.class, - learnTime: content.learnTime - }); - this.getChildTasksList() - if (content.evaluate.length > 0) { - content.evaluate.forEach((element) => { - if (this.data.consumer == 'classmate') { - element.mateEvaluation = '' - } - if (this.data.consumer == 'teacher') { - element.teacherEvaluation = '' - } - }) + this.setData({ + name: content.userName, + school: content.school, + class: content.class, + learnTime: content.learnTime, + }); + if (content.id == this.data.taskInfo.id) { + if (content.userId == this.data.userId) { this.setData({ - dataList: content.evaluate + isUpdate: true, + tasksData: item1, + name: content.userName, + school: content.school, + class: content.class, + learnTime: content.learnTime, + taskShow: true, }); + this.getChildTasksList() + if (content.evaluate.length > 0) { + content.evaluate.forEach((element) => { + if (this.data.consumer == 'classmate') { + element.mateEvaluation = '' + } + if (this.data.consumer == 'teacher') { + element.teacherEvaluation = '' + } + }) + this.setData({ + dataList: content.evaluate, + }); + + } } - console.log(1111) } else { this.goDetail(item) } }) + } else { this.goDetail(item) } @@ -217,9 +266,8 @@ }) } this.setData({ - dataList: res.datas.cmsDatas[0].datas + dataList: res.datas.cmsDatas[0].datas, }); - console.log(this.data.dataList, 444) }) }, getChildTasksList() { @@ -236,8 +284,8 @@ } app.MG.ugc.getChildTopicMessageList(query).then((res) => { if (res.datas.length > 0) { + let list = [] this.data.dataList.forEach((item) => { - console.log(item, 1) res.datas.forEach((item1) => { let content = JSON.parse(item1.content) if (content.teacherComment) { @@ -255,7 +303,12 @@ }) } }) + list.push(item) }) + this.setData({ + dataList: list + }); + console.log(this.data.dataList, 777) } }) }, @@ -264,24 +317,233 @@ //鍙嶆�� onIntrospectionInput(e) { console.log(e) - + let index = e.target.dataset.index + let data = 'dataList[' + index + '].introspection' + this.setData({ + [data]: e.detail.value + }); + console.log(this.data.dataList) }, //瀹屾垚鎯呭喌 onCompletionInput(e) { - + let index = e.target.dataset.index + let data = 'dataList[' + index + '].completion' + this.setData({ + [data]: e.detail.value + }); }, //鑷繁璇勪环 onSelfInput(e) { - + let index = e.target.dataset.index + let data = 'dataList[' + index + '].selfEvaluation' + this.setData({ + [data]: e.detail.value + }); + console.log(this.data.dataList) }, //鍚屼即璇勪环 onMateInput(e) { - + let index = e.target.dataset.index + let data = 'dataList[' + index + '].mateEvaluation' + this.setData({ + [data]: e.detail.value + }); }, //鑰佸笀璇勪环 onTeacherInput(e) { + let index = e.target.dataset.index + let data = 'dataList[' + index + '].teacherEvaluation' + this.setData({ + [data]: e.detail.value + }); + }, + //鎻愪氦鑷繁濉啓 + inviteBtn() { + let empty = false + this.data.dataList.forEach((item) => { + if (item.introspection == '' || item.completion == '' || item.selfEvaluation == '') { + empty = true + return false + } + }) + if (empty) { + wx.showToast({ + title: "璇峰厛濉啓瀹岃嚜宸卞涔犳儏鍐�", + icon: 'none', + duration: 1000 + }) + } else { + let evaluate = [] + this.data.dataList.forEach((item) => { + evaluate.push({ + id: item.id, + name: item.name, + subtaskDescription: item.subtaskDescription, + learningSuggestions: item.subtaskDescription, + introspection: item.introspection, + completion: item.completion, + selfEvaluation: item.selfEvaluation, + mateEvaluation: [], + teacherEvaluation: [] + }) + }) + let content = { + bookName: this.data.bookInfo.name, + userName: this.data.name, + userId: this.data.userId, + school: this.data.school, + class: this.data.class, + learnTime: this.data.learnTime, + id: this.data.taskInfo.id, + taskName: this.data.taskInfo.name, + productLinkPath: this.data.taskInfo.productLinkPath, + evaluate: evaluate + } + let query = { + topicIdOrRefCode: 'learningTasks', + name: this.data.bookInfo.name, + content: JSON.stringify(content), + type: 'learningTasks', + cmsTypeRefCode: '', + newDataListRequest: [] + } + app.MG.ugc.newTopicMessage(query).then((res) => { + this.getTasksList() + this.setData({ + dialogVisible: true + }); + }) + } + }, + updateSubmit() { + let evaluate = [] + this.data.dataList.forEach((item) => { + evaluate.push({ + id: item.id, + name: item.name, + subtaskDescription: item.subtaskDescription, + learningSuggestions: item.subtaskDescription, + introspection: item.introspection, + completion: item.completion, + selfEvaluation: item.selfEvaluation, + mateEvaluation: [], + teacherEvaluation: [] + }) + }) + let content = { + bookName: this.data.bookInfo.name, + userName: this.data.name, + userId: this.data.userId, + school: this.data.school, + class: this.data.class, + learnTime: this.data.learnTime, + id: this.data.taskInfo.id, + taskName: this.data.taskInfo.name, + productLinkPath: this.data.taskInfo.productLinkPath, + evaluate: evaluate + } + + let query = { + topicIdOrRefCode: 'learningTasks', + id: this.data.tasksData.id, + name: this.data.bookInfo.name, + type: 'learningTasks', + content: JSON.stringify(content), + newDataRequests: [], + updateDataRequests: [] + } + app.MG.ugc.updateTopicMessage(query).then((res) => { + this.getTasksList() + this.setData({ + dialogVisible: true + }); + }) + }, + onInviteeChange(e) { + console.log(e) + this.setData({ + invitee: e.detail.value + }); + }, + + handleClose() { + this.setData({ + dialogVisible: false, + invitee: '' + }); + }, + + confirmBtn() { + wx.showShareMenu({ + withShareTicket: true + }); + console.log(888) + }, + submitComment() { + let mateEvaluationList = [] + let teacherEvaluationList = [] + this.data.dataList.forEach((item) => { + if (this.data.consumer == 'classmate') { + if (item.mateEvaluation == '') { + wx.showToast({ + title: "璇峰厛濉瘎浠�", + icon: 'none', + duration: 1000 + }) + } else { + mateEvaluationList.push({ + childTaskId: item.id, + userName: this.data.userName, + evaluation: item.mateEvaluation + }) + } + } + + if (this.data.consumer == 'teacher') { + if (item.teacherEvaluation == '') { + wx.showToast({ + title: "璇峰厛濉瘎浠�", + icon: 'none', + duration: 1000 + }) + } else { + teacherEvaluationList.push({ + childTaskId: item.id, + userName: this.data.userName, + evaluation: item.teacherEvaluation + }) + } + } + }) + let content = { + id: this.data.taskInfo.id, + taskName: this.data.taskInfo.name, + productLinkPath: this.data.taskInfo.productLinkPath, + mateComment: mateEvaluationList, + teacherComment: teacherEvaluationList + } + + let query = { + topicIdOrRefCode: 'learningTasks', + parentId: this.data.tasksData.id, + name: this.data.bookInfo.name, + type: 'learningTasks', + content: JSON.stringify(content), + cmsTypeRefCode: '', + newDataListRequest: [] + } + app.MG.ugc.newTopicMessage(query).then((res) => { + this.getTasksList() + wx.showToast({ + title: "璇勪环宸叉彁浜�", + icon: 'success', + duration: 1000 + }) + }) + }, + /** * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 */ @@ -300,6 +562,10 @@ * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� */ onShareAppMessage() { - + return { + title: '璇勪环瀛︿範浠诲姟鍗�', + path: `packageBookService/pages/bookServices/detail/components/learnTask/index?bookId=${this.data.bookId}&consumer=${this.data.invitee}&taskId=${this.data.taskInfo.id}&userId=${this.data.userId}`, + imgUrl: 'https://jsek.bnuic.com/home/image/click-icon.png', + } } }) \ No newline at end of file diff --git a/packageBookService/pages/bookServices/detail/components/learnTask/index.json b/packageBookService/pages/bookServices/detail/components/learnTask/index.json index e46006e..9159b09 100644 --- a/packageBookService/pages/bookServices/detail/components/learnTask/index.json +++ b/packageBookService/pages/bookServices/detail/components/learnTask/index.json @@ -7,6 +7,8 @@ "t-icon": "tdesign-miniprogram/icon/icon", "t-popup": "tdesign-miniprogram/popup/popup", "t-button": "tdesign-miniprogram/button/button", + "t-radio-group": "tdesign-miniprogram/radio-group/radio-group", + "t-radio": "tdesign-miniprogram/radio/radio", "empty": "/components/empty/index" } } \ No newline at end of file diff --git a/packageBookService/pages/bookServices/detail/components/learnTask/index.wxml b/packageBookService/pages/bookServices/detail/components/learnTask/index.wxml index 7e3d008..86e10c6 100644 --- a/packageBookService/pages/bookServices/detail/components/learnTask/index.wxml +++ b/packageBookService/pages/bookServices/detail/components/learnTask/index.wxml @@ -9,19 +9,19 @@ <view class="from-item"> <view class="label"><text class="icon">*</text> 濮撳悕锛� </view> <view class="item-content"> - <t-input placeholder="璇疯緭鍏ュ鍚�" borderless value="{{name}}" bindchange="bindTnputBlur" /> + <t-input placeholder="璇疯緭鍏ュ鍚�" borderless value="{{name}}" bindchange="bindTnputBlur" disabled="{{disabled}}" /> </view> </view> <view class="from-item"> <view class="label"> <text class="icon">*</text>瀛︽牎锛� </view> <view class="item-content"> - <t-input placeholder="杈撳鏍″悕绉�" borderless value="{{school}}" type="number" bindchange="onSchoolInput" /> + <t-input placeholder="杈撳鏍″悕绉�" borderless value="{{school}}" type="number" bindchange="onSchoolInput" disabled="{{disabled}}" /> </view> </view> <view class="from-item"> <view class="label"><text class="icon">*</text> 鐝骇锛� </view> <view class="item-content"> - <t-input placeholder="璇疯緭鍏ョ彮绾�" borderless value="{{class}}" bindchange="bindClassBlur" /> + <t-input placeholder="璇疯緭鍏ョ彮绾�" borderless value="{{class}}" bindchange="bindClassBlur" disabled="{{disabled}}" /> </view> </view> <view class="from-item"> @@ -40,7 +40,7 @@ </view> <view class="content-Box"> <view class="item-title"> - <image src="/static/images/bookService/detail/renwudan锛廼con.png" class="icon" /> + <image src="/static/images/bookService/detail/renwudan锛廼con.png" class="iconImage" /> <view>瀛︿範浠诲姟鍗�</view> </view> <view class="item-box" wx:if="{{menuList.length > 0 && !loading}}"> @@ -50,7 +50,7 @@ </view> <view bind:tap="getTask" data-item="{{item}}">{{ item.name }}</view> </view> - <view class="childBox"> + <view class="childBox" wx:if="{{item.children}}"> <view wx:for="{{item.children}}" wx:for-item="item1" wx:for-index="index" wx:key="id" class="item"> <view bind:tap="getTask" data-item="{{item}}">{{ item1.name }}</view> </view> @@ -80,27 +80,27 @@ <view class="box-list"> <view class="lable"><text class="icon">*</text>瀛︿範鍙嶆��:</view> <view class="inputBox"> - <t-textarea placeholder="璇疯緭鍏ュ涔犲弽鎬�" value="{{item.introspection}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" data-index="{{index}}" bindchange="onIntrospectionInput" /> + <t-textarea placeholder="璇疯緭鍏ュ涔犲弽鎬�" value="{{item.introspection}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" data-index="{{index}}" bindchange="onIntrospectionInput" disabled="{{disabled}}" /> </view> </view> <view class="box-list"> <view class="lable"><text class="icon">*</text>瀹屾垚鎯呭喌:</view> <view class="inputBox"> - <t-textarea placeholder="璇疯緭鍏ュ畬鎴愭儏鍐�" value="{{item.completion}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onCompletionInput" /> + <t-textarea placeholder="璇疯緭鍏ュ畬鎴愭儏鍐�" value="{{item.completion}}" data-index="{{index}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" disabled="{{disabled}}" bindchange="onCompletionInput" /> </view> </view> <view class="box-list"> <view class="lable"><text class="icon">*</text>鑷繁璇�:</view> <view class="inputBox"> - <t-textarea placeholder="璇疯緭鍏ヨ瘎浠�" value="{{item.selfEvaluation}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onSelfInput" /> + <t-textarea placeholder="璇疯緭鍏ヨ瘎浠�" value="{{item.selfEvaluation}}" data-index="{{index}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" disabled="{{disabled}}" bindchange="onSelfInput" /> </view> </view> <view class="box-list" wx:if="{{consumer == 'classmate' || !consumer}}"> <view class="lable">鍚屼即璇�:</view> <view class="inputBox"> - <t-textarea placeholder="璇疯緭鍏ヨ瘎浠�" value="{{item.mateEvaluation}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onMateInput" wx:if="{{consumer == 'classmate'}}" /> + <t-textarea placeholder="璇疯緭鍏ヨ瘎浠�" value="{{item.mateEvaluation}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onMateInput" data-index="{{index}}" wx:if="{{consumer == 'classmate'}}" /> <view wx:if="{{isUpdate && item.mateEvaluation.length > 0}}" class="rateList"> - <view wx:for="{{item.mateEvaluation}}" wx:for-item="mateItem" wx:key="index"> + <view wx:for="{{item.mateEvaluation}}" wx:for-item="mateItem" wx:key="index" class="li"> <view class="userName">{{ mateItem.userName }}</view> <view>{{ mateItem.evaluation }}</view> </view> @@ -111,10 +111,10 @@ <view class="box-list" wx:if="{{consumer == 'teacher' || !consumer}}"> <view class="lable">鑰佸笀璇�:</view> <view class="inputBox"> - <t-textarea placeholder="璇疯緭鍏ヨ瘎浠�" value="{{item.teacherEvaluation}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onTeacherInput" wx:if="{{consumer == 'teacher'}}" /> + <t-textarea placeholder="璇疯緭鍏ヨ瘎浠�" value="{{item.teacherEvaluation}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onTeacherInput" data-index="{{index}}" wx:if="{{consumer == 'teacher'}}" /> <view wx:if="{{isUpdate && item.teacherEvaluation.length > 0}}" class="rateList"> - <view wx:for="{{item.teacherEvaluation}}" wx:for-item="mateItem" wx:key="index"> - <view class="userName">{{ mateItem.userName }}</view> + <view wx:for="{{item.teacherEvaluation}}" wx:for-item="mateItem" wx:key="index" class="li"> + <view class="userName"><text></text>{{ mateItem.userName }}</view> <view>{{ mateItem.evaluation }}</view> </view> </view> @@ -144,4 +144,21 @@ </view> </t-popup> </view> + <view class="popup-box" wx:if="{{dialogVisible}}" bindtap="handleClose"></view> + <view class="info-center" style="top:{{height*0.3}}px;" wx:if="{{dialogVisible}}"> + <view class="block1"> + <t-radio-group value="{{invitee}}" borderless t-class="box" class="radioBox" bind:change="onInviteeChange"> + <t-radio block="{{false}}" label="鍚屼即" value="mate" class="radio" /> + <t-radio block="{{false}}" label="鑰佸笀" value="teacher" class="radio" /> + </t-radio-group> + </view> + <view class="buttonBox"> + <t-button class="btn" theme="primary" bind:tap="handleClose"> + <view slot="content" class="btn-content">鍙栨秷</view> + </t-button> + <t-button class="btn" theme="primary" bind:tap="confirmBtn" open-type="share"> + <view slot="content" class="btn-content">纭畾</view> + </t-button> + </view> + </view> </view> \ No newline at end of file diff --git a/packageBookService/pages/bookServices/detail/components/learnTask/index.wxss b/packageBookService/pages/bookServices/detail/components/learnTask/index.wxss index 69260f4..42ffa45 100644 --- a/packageBookService/pages/bookServices/detail/components/learnTask/index.wxss +++ b/packageBookService/pages/bookServices/detail/components/learnTask/index.wxss @@ -58,7 +58,7 @@ background: #fff6f0; } -.icon { +.iconImage { width: 36rpx; height: 36rpx; margin-right: 10rpx; @@ -133,10 +133,24 @@ .box-list .lable { margin-bottom: 10rpx; + font-weight: bold; } .lable .icon { color: #f56c6c; +} + +.rateList { + line-height: 36rpx; +} + +.li { + margin: 10rpx; +} + +.userName { + font-family: '妤蜂綋', SimSun, 'Sunflower', sans-serif; + font-style: italic; } .buttonBox { @@ -155,9 +169,12 @@ --td-button-primary-active-bg-color: #fff0e6; --td-button-primary-active-border-color: #ff6c00; padding: 0; + margin: 0 30rpx; display: flex; align-items: center; } + + .close-btn { position: absolute; @@ -170,4 +187,36 @@ .submit { background: #ff6c00; color: #fff; +} + +.popup-box { + position: absolute; + z-index: 99999; + top: 0; + background-color: rgba(0, 0, 0, 0.5); + width: 100vw; + height: 100vh; +} + +.info-center { + position: fixed; + z-index: 99999; + background-color: white; + align-items: center; + justify-content: center; + border-radius: 10rpx; + width: 78%; + height: 400rpx; + margin-left: 8%; +} + +.block1 { + height: 200rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.t-radio { + margin-right: 40rpx; } \ No newline at end of file diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js index 3579fe6..1fcfa73 100644 --- a/packageBookService/pages/bookServices/examination/examination.js +++ b/packageBookService/pages/bookServices/examination/examination.js @@ -88,10 +88,14 @@ const token = wx.getStorageSync(app.config.tokenKey) if (!token) { loginInfo(app, (data) => { - if (data) {} else {} + if (data) { + this.init(); + } else { + this.init(); + } }) } - this.init(); + }, /** diff --git a/packageBookService/pages/components/webView/index.js b/packageBookService/pages/components/webView/index.js index bc293e5..fd1827e 100644 --- a/packageBookService/pages/components/webView/index.js +++ b/packageBookService/pages/components/webView/index.js @@ -1,5 +1,8 @@ // packageBookService/pages/components/webView/index.js const app = getApp() +import { + loginInfo +} from '../../../../assets/js/login'; Page({ /** @@ -21,19 +24,7 @@ */ onLoad(options) { console.log(options) - const token = wx.getStorageSync(app.config.tokenKey) - if (!token) { - loginInfo(app, (data) => { - // 濡傛灉涓嶆槸绗竴娆$櫥褰曪紝浼氭墽琛屽洖璋� - if (data) { - // 鐧诲綍鎴愬姛锛岃嚜鍔ㄨ褰晅oken鍜岀敤鎴蜂俊鎭紝骞惰繑鍥瀟rue - } else { - // 鍑虹幇閿欒锛岃繑鍥瀎alse - } - }) - } else { - // 濡傛灉鏄涓�娆$櫥褰曪紝浼氳烦杞嚦缁戝畾鐢ㄦ埛淇℃伅椤甸潰锛屽~鍐欏畬鐢ㄦ埛淇℃伅鍚庤繘琛岀櫥褰曞苟鍌ㄥ瓨token鍜岀敤鎴蜂俊鎭紝缁撴潫鍚庤烦杞洖褰撳墠椤甸潰锛堟惡甯﹂〉闈㈠弬鏁帮級 - } + if (options && options.link) { this.setData({ src: decodeURIComponent(options.link), @@ -49,9 +40,18 @@ title: options.fileName, skeletonLoding: true }) - this.getProgress(options) } } + const token = wx.getStorageSync(app.config.tokenKey) + if (!token) { + loginInfo(app, (data) => { + if (data) { + this.getProgress(options) + } else { + this.getProgress(options) + } + }) + } }, onLoadWeb(e) { diff --git a/packageDomain/pages/resourceDetails/document/index.js b/packageDomain/pages/resourceDetails/document/index.js index dd3cd03..b8950fb 100644 --- a/packageDomain/pages/resourceDetails/document/index.js +++ b/packageDomain/pages/resourceDetails/document/index.js @@ -70,10 +70,14 @@ const token = wx.getStorageSync(app.config.tokenKey) if (!token) { loginInfo(app, (data) => { - if (data) {} else {} + if (data) { + this.resourceDetailsData() + } else { + this.resourceDetailsData() + } }) } - this.resourceDetailsData() + }, /** diff --git a/packageDomain/pages/resourceDetails/myAudio/index.js b/packageDomain/pages/resourceDetails/myAudio/index.js index 4875000..90dc3f7 100644 --- a/packageDomain/pages/resourceDetails/myAudio/index.js +++ b/packageDomain/pages/resourceDetails/myAudio/index.js @@ -110,11 +110,15 @@ const token = wx.getStorageSync(app.config.tokenKey) if (!token) { loginInfo(app, (data) => { - if (data) {} else {} + if (data) { + this.resourceDetailsData() + this.getNoteList() + } else { + this.resourceDetailsData() + this.getNoteList() + } }) } - this.resourceDetailsData() - this.getNoteList() }, /** diff --git a/packageDomain/pages/resourceDetails/myVideo/index.js b/packageDomain/pages/resourceDetails/myVideo/index.js index f31ea0f..5a5d299 100644 --- a/packageDomain/pages/resourceDetails/myVideo/index.js +++ b/packageDomain/pages/resourceDetails/myVideo/index.js @@ -93,10 +93,14 @@ const token = wx.getStorageSync(app.config.tokenKey) if (!token) { loginInfo(app, (data) => { - if (data) {} else {} + if (data) { + this.resourceDetailsData() + } else { + this.resourceDetailsData() + } }) } - this.resourceDetailsData() + }, diff --git a/pages/digitalCourses/digitalCoursesDetails/components/question/question.js b/pages/digitalCourses/digitalCoursesDetails/components/question/question.js index f9a293d..1b0b32d 100644 --- a/pages/digitalCourses/digitalCoursesDetails/components/question/question.js +++ b/pages/digitalCourses/digitalCoursesDetails/components/question/question.js @@ -236,7 +236,7 @@ item.title = JSON.parse(item.content).content; item.createDate = moment(item.createDate).format("YYYY-MM-DD HH:mm:ss"); item.updateDate = moment(item.updateDate).format("YYYY-MM-DD HH:mm:ss"); - item.feedBack = item.feedBack ? item.feedBack : '-' + item.feedBack = item.feedBack ? item.feedBack : '鏆傛湭鍥炲' }); this.setData({ "pageCount.total": res.totalSize, diff --git a/pages/digitalCourses/digitalCoursesDetails/index.js b/pages/digitalCourses/digitalCoursesDetails/index.js index bf16ec4..d443f2c 100644 --- a/pages/digitalCourses/digitalCoursesDetails/index.js +++ b/pages/digitalCourses/digitalCoursesDetails/index.js @@ -1,5 +1,6 @@ // pages/digitalCourses/digitalCoursesDetails/index.js const app = getApp() +import moment from 'moment' import SparkMD5 from 'spark-md5' import FormData from '../../../utils/formdata/index.js'; import Wxml2Canvas from 'wxml2canvas'; @@ -101,6 +102,7 @@ rzzsImg: '', //璁よ瘉璇佷功base64 imageWidth: '', //鐢诲湪鐢诲竷涓婄殑鍥剧墖鐨勫搴� imageHeight: '', //鐢诲湪鐢诲竷涓婄殑鍥剧墖鐨勯珮搴� + website: 'https://jsek.bnuic.com', }, formatDate(dateString) { if (!dateString) { diff --git a/pages/digitalCourses/digitalCoursesDetails/index.wxml b/pages/digitalCourses/digitalCoursesDetails/index.wxml index 9cfdb18..4db6f31 100644 --- a/pages/digitalCourses/digitalCoursesDetails/index.wxml +++ b/pages/digitalCourses/digitalCoursesDetails/index.wxml @@ -115,6 +115,29 @@ <view class="codeBox"></view> </view> </view> + <canvas canvas-id="myCanvas1" style="height:845px;width:595px" wx:if="{{pubCertificateHide}}"></canvas> + <view id="textCertificate" class="my_canvas" wx:if="{{pubCertificateHide}}"> + <image data-type="image" data-url="https://jsek.bnuic.com/home/certificate/kczs.jpg" src="https://jsek.bnuic.com/home/certificate/kczs.jpg" mode="" class="bgImg" /> + <view class="certificateInfo my_draw_canvas"> + <view class="userIcon my_draw_canvas"> + <view class="hexagon"> + <image src="{{userPicture}}" class="img" /> + </view> + </view> + <view class="userName my_draw_canvas" data-type="text" data-text="{{userName}}">{{userName}}</view> + <view class="bookName my_draw_canvas" data-type="text" data-text="{{digitalsData.name}}">{{digitalsData.name}}</view> + <view class="author my_draw_canvas" data-type="text" data-text="{{digitalsData.courseLeader}}">{{digitalsData.courseLeader || '-' }}</view> + <view class="classHours my_draw_canvas" data-type="text" data-text="{{digitalsData.classHours}}">{{digitalsData.classHours || '-' }}</view> + <view class="affiliatedUnit my_draw_canvas" data-type="text" data-text="{{publishingUnit}}">{{publishingUnit || '-'}}</view> + <view class="affiliatedUnit my_draw_canvas" data-type="text" data-text="{{digitalsData.isbn}}"> {{ digitalsData.isbn || '-'}}</view> + <view class="studyTime my_draw_canvas" data-type="text" data-text="{{digitalsData.classHours}}">{{digitalsData.classHours}}</view> + <view class="website my_draw_canvas" data-type="text" data-text="{{website}}">{{website}}</view> + <view class="codeBox"></view> + <view class="updateDate" wx-if="{{isCertificate}}"> + {{ moment(isCertificate.updateDate).format('YYYY骞碝M鏈�') }} + </view> + </view> + </view> </t-tab-panel> <t-tab-panel icon="{{ tabValue == '2' ? courseLearningClick : courseLearning}}" label="璇剧▼瀛︿範" value="2"> <view class="course-content"> diff --git a/pages/digitalCourses/digitalCoursesDetails/index.wxss b/pages/digitalCourses/digitalCoursesDetails/index.wxss index 3e1bcb0..208d751 100644 --- a/pages/digitalCourses/digitalCoursesDetails/index.wxss +++ b/pages/digitalCourses/digitalCoursesDetails/index.wxss @@ -432,7 +432,7 @@ /* background-image: url('https://jsek.bnuic.com/home/certificate/szkc.jpg'); */ } -.bgImg { +#pubCertificate .bgImg { width: 100%; height: 100%; } @@ -445,7 +445,7 @@ left: 0; } -.bookName { +#pubCertificate .bookName { padding-top: 260px; text-align: center; font-size: 30px; @@ -453,7 +453,7 @@ font-family: 'FZXBSJW'; } -.author { +#pubCertificate .author { margin-top: 30px; font-size: 24px; margin-left: 250px; @@ -462,25 +462,118 @@ font-family: 'FZXBSJW'; } -.affiliatedUnit { +#pubCertificate .affiliatedUnit { margin-top: 13px; margin-left: 46%; color: #000; font-family: 'SimHei', sans-serif; } -.website { +#pubCertificate .website { margin-top: 62px; margin-left: 27%; color: #000; font-family: 'SimHei', sans-serif; } -.codeBox { +#pubCertificate .codeBox { margin-top: 24px; text-align: center; } +#textCertificate { + width: 595px; + height: 845px; + position: relative; +} + +#textCertificate .userIcon { + padding-top: 233px; +} + +#textCertificate .hexagon { + width: 103px; + height: 117px; + display: flex; + align-items: center; + justify-content: center; + clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); + margin: 0 auto; + overflow: hidden; + + +} + +#textCertificate .img { + width: 103px; + height: 117px; +} + +#textCertificate .userName { + height: 120rpx; + font-size: 38px; + padding-top: 26px; + text-align: center; + font-family: 'FZXBSJW'; +} + +#textCertificate .bookName { + padding-top: 30px; + margin-left: 215px; + + font-size: 20px; + color: #000; + font-family: 'FZXBSJW'; +} + +#textCertificate .author { + margin-top: 43px; + margin-left: 52%; + color: #000; + font-family: 'SimHei', sans-serif; +} + +#textCertificate .classHours { + margin-top: 12px; + margin-left: 52%; + color: #000; + font-family: 'SimHei', sans-serif; +} + +#textCertificate .affiliatedUnit { + margin-top: 13px; + margin-left: 40%; + color: #000; + font-family: 'SimHei', sans-serif; +} + +#textCertificate .studyTime { + margin-top: 13px; + margin-left: 33%; + color: #000; + font-family: 'SimHei', sans-serif; +} + +#textCertificate .website { + margin-top: 22px; + margin-left: 27%; + color: #000; + font-family: 'SimHei', sans-serif; +} + +#textCertificate .codeBox { + margin-top: 16px; + text-align: center; +} + +#textCertificate .updateDate { + margin-top: 30px; + text-align: center; + font-size: 12px; + color: #000; +} + + .rubricBox { display: flex; -- Gitblit v1.9.1