From 558845242a07b68f42fa1802c45ab2769395d8b8 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期一, 29 四月 2024 14:31:30 +0800
Subject: [PATCH] 合并代码

---
 packageDomain/pages/resourceDetails/document/index.js |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/packageDomain/pages/resourceDetails/document/index.js b/packageDomain/pages/resourceDetails/document/index.js
index 22a42c8..9cf27f2 100644
--- a/packageDomain/pages/resourceDetails/document/index.js
+++ b/packageDomain/pages/resourceDetails/document/index.js
@@ -24,7 +24,9 @@
     titleName: '',
     pdfDatA: [],
     startTime: "", //杩涘叆椤甸潰褰撳墠鏃堕棿
-    pauseTime: 0 //鏆傚仠鏃堕棿
+    pauseTime: 0, //鏆傚仠鏃堕棿
+    applyState: '',
+    deadline: '',
   },
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
@@ -56,7 +58,9 @@
       cmsId: options.cmsId,
       parentName: options.parentName,
       parentProductLinkPath: options.parentProductLinkPath,
-      productLinkPath: options.productLinkPath
+      productLinkPath: options.productLinkPath,
+      applyState: options.applyState,
+      deadline: options.deadline
     })
     this.resourceDetailsData()
   },
@@ -194,6 +198,18 @@
   //zpi鏂囦欢涓嬭浇
   onDownloadButton() {
     const item = this.data.zipData;
+    if (this.data.applyState !== 'Normal') {
+      return wx.showToast({
+        icon: 'none',
+        title: '璇峰厛鐢宠涓嬭浇',
+      })
+    } else {
+      const flag = new Date(this.data.deadline) > new Date()
+      if (!flag) return wx.showToast({
+        icon: 'none',
+        title: '璇峰厛鐢宠涓嬭浇',
+      })
+    }
     if (!item || !item.file) {
       wx.showToast({
         title: '鏂囦欢淇℃伅缂哄け',
@@ -201,7 +217,6 @@
       });
       return;
     }
-
     const downloadUrl = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file;
     wx.showLoading({
       title: '姝e湪涓嬭浇...',

--
Gitblit v1.9.1