From 73a96931c99e2f849c8856dc8e78d3d25adaa654 Mon Sep 17 00:00:00 2001
From: QYF-GitLab1 <1940665526@qq.com>
Date: 星期五, 20 十二月 2024 16:44:06 +0800
Subject: [PATCH] 1111

---
 packageCourse/pages/course/detail/index.js |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

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,
     })

--
Gitblit v1.9.1