From e7d382efc71d1a738a6a7c52d0978d6fdb077a8a Mon Sep 17 00:00:00 2001
From: liuwh <964324856@qq.com>
Date: Sat, 14 Sep 2024 17:34:02 +0800
Subject: [PATCH] 提交

---
 gz-wxparty/pages/myRegisterList/index.js |   39 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 38 insertions(+), 1 deletions(-)

diff --git a/gz-wxparty/pages/myRegisterList/index.js b/gz-wxparty/pages/myRegisterList/index.js
index 9df6b6f..be40cdc 100644
--- a/gz-wxparty/pages/myRegisterList/index.js
+++ b/gz-wxparty/pages/myRegisterList/index.js
@@ -12,6 +12,17 @@
   })
 }
 
+function getfilesApi(param) {
+  return $$.request({
+    url: 'fileInfo/listByMainIdAndType',
+    type: 'get',
+    submitData: param || {},
+    service: 'sys'
+  })
+}
+
+
+
 Page({
 
   /**
@@ -19,6 +30,7 @@
    */
   data: {
     imgUrl: $$.url.img,
+    fileUrl: $$.baseUrl + $$.url.fileShowUrl,
     search: {
       page: 1,
       size: 10,
@@ -171,7 +183,7 @@
       }
     })
   },
-
+  // 关闭协议要点
   agreeContentClosePopup(e) {
     this.setData({
       showData: {
@@ -181,6 +193,31 @@
     })
   },
 
+  // 查看协议文书
+  async agreeClick(e) {
+    let item = e.currentTarget.dataset.item;
+    $$.showLoading();
+
+    const res = await getfilesApi({
+      mainId: item.id,
+      ownerType: '22_00018-302',
+    });
+    $$.hideLoading();
+    if (res.type) {
+      let data = res.data || [];
+      if (data?.length === 0) {
+        $$.showToast({
+          title: '暂无协议文书',
+          duration: 1000
+        });
+      }
+      wx.previewImage({
+        current: `${this.data.fileUrl}${data[0].showUrl}`,
+        urls: data.map(item => `${this.data.fileUrl}${item.showUrl}`) // 需要预览的图片http链接列表
+      });
+    }
+  },
+
   // 评价
   evaluate(e) {
     let id = e.currentTarget.dataset.id;

--
Gitblit v1.8.0