From 06404e701a89955958cbf56213e2eec618d8644d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 16 十二月 2020 18:36:16 +0800
Subject: [PATCH] 2020-12-16

---
 src/tabviews/custom/components/card/cardcellList/index.jsx |   45 +++++++++++++++++++++++++++++----------------
 1 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx
index 9e34be0..0b3b3ac 100644
--- a/src/tabviews/custom/components/card/cardcellList/index.jsx
+++ b/src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -9,6 +9,7 @@
 import asyncComponent from './asyncButtonComponent'
 import asyncElementComponent from '@/utils/asyncComponent'
 
+import LostPng from '@/assets/img/lost.png'
 import './index.scss'
 
 const NormalButton = asyncComponent(() => import('@/tabviews/zshare/actionList/normalbutton'))
@@ -76,9 +77,23 @@
       url = data[card.linkurl]
     }
 
-    if (url === 'sso') {
+    if (!url) {
+      notification.warning({
+        top: 92,
+        message: '閾炬帴鍦板潃涓嶅瓨鍦紒',
+        duration: 5
+      })
+      return
+    }
+
+    if (/^sso$/ig.test(url)) {
       if (!data.LinkUrl1) {
-        url = ''
+        notification.warning({
+          top: 92,
+          message: '閾炬帴鍦板潃涓嶅瓨鍦紒',
+          duration: 5
+        })
+        return
       } else {
         url = data.LinkUrl1 + 'index.html#/ssologin/' + window.btoa(window.encodeURIComponent(JSON.stringify({
           UserID: sessionStorage.getItem('UserID'),
@@ -108,15 +123,6 @@
       if (card.joint === 'true') {
         url = url + `${con}id=${Id}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}`
       }
-    }
-
-    if (!url) {
-      notification.warning({
-        top: 92,
-        message: '閾炬帴鍦板潃涓嶅瓨鍦紒',
-        duration: 5
-      })
-      return
     }
 
     window.open(url)
@@ -349,15 +355,22 @@
     } else if (card.eleType === 'picture') {
       let _imagestyle = {}
       let _style = card.style ? {...card.style} : {}
+      let url = ''
 
-      if (card.url) {
-        _imagestyle = {backgroundImage: `url('${card.url}')`}
+      if (card.datatype === 'static') {
+        url = card.url
       } else {
-        _imagestyle = {backgroundImage: `url('')`}
+        url = data[card.field]
+      }
+      
+      if (url) {
+        _imagestyle = {backgroundImage: `url('${url}')`}
+      } else {
+        _imagestyle = {backgroundImage: `url(${LostPng})`, backgroundSize: 'contain'}
       }
 
-      if (card.radius === 'true') {
-        _imagestyle.borderRadius = '50%'
+      if (_style.borderRadius) {
+        _imagestyle.borderRadius = _style.borderRadius
       }
 
       if (card.lenWidRadio === '16:9') {

--
Gitblit v1.8.0