From c83a50317baeba1a4771e4d802eee029ed2b7e31 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 23 六月 2020 18:23:43 +0800
Subject: [PATCH] 2020-06-23

---
 src/tabviews/zshare/cardcomponent/index.jsx |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/tabviews/zshare/cardcomponent/index.jsx b/src/tabviews/zshare/cardcomponent/index.jsx
index 567aaa8..0190941 100644
--- a/src/tabviews/zshare/cardcomponent/index.jsx
+++ b/src/tabviews/zshare/cardcomponent/index.jsx
@@ -383,6 +383,26 @@
           {content}
         </span>
       )
+    } else if (col.type === 'link') {
+      let content = col.nameField ? data[col.nameField] : ''
+      let _href = data[col.field] || ''
+
+      if (!content && _href) {
+        content = _href
+      } else if (!_href) {
+        content = ''
+      }
+
+      if (col.joint === 'true' && _href) {
+        let _param = window.btoa('id=' + data[this.props.setting.primaryKey] + '&userid=' + sessionStorage.getItem('UserID') + '&loginuid=' + sessionStorage.getItem('LoginUID'))
+        _href += '?' + _param
+      }
+
+      return (
+        <span>
+          {_href ? <a href={_href} target="_blank" rel="noopener noreferrer">{content}</a> : null}
+        </span>
+      )
     }
   }
 

--
Gitblit v1.8.0