From e7a3bb27266c2fe0defa39bc7d71af5a47d62df2 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期三, 08 一月 2025 14:40:22 +0800 Subject: [PATCH] 答题无解析,添加- --- packageCourse/pages/course/detail/index.js | 50 ++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 44 insertions(+), 6 deletions(-) diff --git a/packageCourse/pages/course/detail/index.js b/packageCourse/pages/course/detail/index.js index 4a2f495..564f0e7 100644 --- a/packageCourse/pages/course/detail/index.js +++ b/packageCourse/pages/course/detail/index.js @@ -15,6 +15,7 @@ startTime: '', endTime: '', className: '', + isShow: "", count: null, classList: [], searchKey: '', @@ -26,6 +27,8 @@ }, courseLoading: true, classLoading: false, + showContentOnly: false, + reason: '', // 鍔犺浇鍙傛暟 bottomLoading: false, isMoreData: false, @@ -49,6 +52,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 + }); }, // 鑾峰彇璇剧▼淇℃伅 @@ -159,13 +180,15 @@ // 鎵撳紑閫夋嫨鏃ユ湡 openDateStart() { this.setData({ - visibleStart: true + visibleStart: true, + isShow: 'none', }) }, openDateEnd() { this.setData({ - visibleEnd: true + visibleEnd: true, + isShow: 'none' }) }, @@ -177,6 +200,7 @@ const dateStr = moment(value).format('YYYY-MM-DD') this.setData({ startTime: dateStr, + isShow: '' }); }, @@ -187,6 +211,7 @@ const dateStr = moment(value).format('YYYY-MM-DD') this.setData({ endTime: dateStr, + isShow: '' }); }, @@ -199,6 +224,8 @@ // 鐢宠鎻愪氦鐝骇 submitClass() { + const bTime = moment(this.data.startTime).valueOf() + const eTime = moment(this.data.endTime).valueOf() if (!this.data.className) { wx.showToast({ title: '璇峰~鍐欒绋嬪悕绉�', @@ -218,6 +245,14 @@ if (!this.data.startTime || !this.data.endTime) { wx.showToast({ title: '璇烽�夋嫨鐝骇鏈夋晥鏈�', + duration: 1000, + icon: 'none', + }) + return false + } + if (bTime && eTime && eTime < bTime) { + wx.showToast({ + title: '璇烽�夋嫨鐝纭殑鐝骇鏈夋晥鏈�', duration: 1000, icon: 'none', }) @@ -253,7 +288,7 @@ wx.showToast({ title: '鐢宠寮�鐝嚭閿�', duration: 1000, - icon: 'err', + icon: 'none', }) this.setData({ visible: false @@ -354,16 +389,19 @@ 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, + 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=" + item.linkProductDto.product.refCode, }) }, -- Gitblit v1.9.1