From 9f8a5f2ada396ed94f18b6c30a896ceb0da41351 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期一, 23 十二月 2024 15:17:54 +0800
Subject: [PATCH] 开班时间选择期优化

---
 packageCourse/pages/course/detail/index.js |   38 +++++++++++++++++++++++++++++++++-----
 1 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/packageCourse/pages/course/detail/index.js b/packageCourse/pages/course/detail/index.js
index 4a2f495..3430dc3 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: ''
     });
   },
 
@@ -253,7 +278,7 @@
         wx.showToast({
           title: '鐢宠寮�鐝嚭閿�',
           duration: 1000,
-          icon: 'err',
+          icon: 'none',
         })
         this.setData({
           visible: false
@@ -354,14 +379,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,
     })

--
Gitblit v1.9.1