From 34e7681fd12b1c4e4994d3bea1a553870e10bc50 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 11 三月 2023 17:58:54 +0800
Subject: [PATCH] 2023-03-11

---
 src/tabviews/custom/components/carousel/prop-card/index.jsx |   22 +++++++---------------
 1 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx
index 0b5782b..6698d56 100644
--- a/src/tabviews/custom/components/carousel/prop-card/index.jsx
+++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -36,7 +36,6 @@
   UNSAFE_componentWillMount () {
     const { data, initdata } = this.props
     let _config = fromJS(this.props.config).toJS()
-    let _cols = new Map()
 
     let _data = {$$empty: true}
     let _sync = false
@@ -79,11 +78,6 @@
     _data.$$BID = BID || ''
     _data.$$BData = BData || ''
 
-    _config.columns.forEach(item => {
-      if (item.type !== 'number') return
-      _cols.set(item.field, item)
-    })
-
     if (!_config.wrap.height) { // 鍏煎
       _config.wrap.height = _config.style.height || '300px'
       delete _config.style.height
@@ -94,12 +88,6 @@
       if (card.setting.click) {
         card.style.cursor = 'pointer'
       }
-      card.elements = card.elements.map(item => {
-        if (item.eleType === 'number' && item.field && _cols.has(item.field) && typeof(item.decimal) !== 'number') {
-          item.decimal = _cols.get(item.field).decimal || 0
-        }
-        return item
-      })
     })
 
     _config.wrap.speed = (_config.wrap.speed || 3) * 1000
@@ -198,7 +186,7 @@
     }
   }
 
-  openModal = () => {
+  openModal = (ErrCode) => {
     const { config, data } = this.state
     
     let code = config.wrap.code || ('modal' + config.uuid)
@@ -210,6 +198,10 @@
       localStorage.setItem(code, data.$$uuid || 'true')
 
       Api.getAppVersion(true)
+
+      if (ErrCode === '-1') {
+        return
+      }
     }
 
     setTimeout(() => {
@@ -316,7 +308,7 @@
       let _data = {}
 
       this.loaded = true
-      if (config.$cache) {
+      if (config.$cache && config.setting.onload !== 'false') {
         Api.writeCacheConfig(config.uuid, result.data || '')
       }
 
@@ -335,7 +327,7 @@
         loading: false
       }, () => {
         if (config.wrap.display === 'modal') {
-          this.openModal()
+          this.openModal(result.ErrCode)
         }
       })
     } else {

--
Gitblit v1.8.0