From 347ca2d72cd044484e566056fb71ae3e0cdbfd19 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 15 十一月 2022 11:21:51 +0800
Subject: [PATCH] 2022-11-15

---
 public/options.json                                         |   10 +++++-----
 src/tabviews/custom/components/carousel/data-card/index.jsx |    6 +++++-
 src/tabviews/custom/components/carousel/prop-card/index.jsx |    7 +++++--
 src/menu/components/carousel/prop-card/index.jsx            |   16 ++++++++++------
 src/menu/components/carousel/data-card/index.jsx            |   16 ++++++++++------
 src/menu/components/iframe/index.jsx                        |    2 +-
 6 files changed, 36 insertions(+), 21 deletions(-)

diff --git a/public/options.json b/public/options.json
index ea0061e..ff6de49 100644
--- a/public/options.json
+++ b/public/options.json
@@ -1,12 +1,12 @@
 {
-  "appId": "201912040924165801464FF1788654BC5AC73",
-  "appkey": "20191106103859640976D6E924E464D029CF0",
+  "appId": "202108312122504607B107A83F55B40C98CCF",
+  "appkey": "20210831212235413F287EC3BF489424496C8",
   "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
   "systemType": "",
   "externalDatabase": "false",
   "lineColor": "",
   "filter": "false",
-  "defaultApp": "mk",
+  "defaultApp": "css_wx_app",
   "defaultLang": "zh-CN",
   "WXAppID": "",
   "WXminiAppID": "",
@@ -17,6 +17,6 @@
   "transfer": "false",
   "keepPassword": "true",
   "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"],
-  "host": "http://qingqiumarket.cn",
-  "service": "MKWMS/"
+  "host": "http://demo.mk9h.cn",
+  "service": "erp_new/"
 }
\ No newline at end of file
diff --git a/src/menu/components/carousel/data-card/index.jsx b/src/menu/components/carousel/data-card/index.jsx
index b83ab21..dceb119 100644
--- a/src/menu/components/carousel/data-card/index.jsx
+++ b/src/menu/components/carousel/data-card/index.jsx
@@ -49,7 +49,7 @@
         subtype: card.subtype,
         setting: { interType: 'system' },
         wrap: { name: card.name, width: card.width || 24, autoplay: 'false', dots: 'true', height: '300px' },
-        style: { borderWidth: '1px', borderColor: '#e8e8e8', marginTop: '8px', marginBottom: '8px', height: '300px' },
+        style: { borderWidth: '1px', borderColor: '#e8e8e8', marginTop: '8px', marginBottom: '8px' },
         columns: [],
         scripts: [],
         subcards: [{
@@ -85,8 +85,15 @@
 
       this.updateComponent(_card)
     } else {
+      let _card = fromJS(card).toJS()
+
+      if (!_card.wrap.height && _card.style.height) { // 鍏煎
+        _card.wrap.height = _card.style.height
+      }
+      delete _card.style.height
+
       this.setState({
-        card: fromJS(card).toJS()
+        card: _card
       })
     }
   }
@@ -208,13 +215,11 @@
   getWrapForms = () => {
     const { card } = this.state
 
-    return getWrapForm({...card.wrap, height: card.style.height}, card.subtype)
+    return getWrapForm(card.wrap, card.subtype)
   }
 
   updateWrap = (res) => {
     let _card = {...this.state.card, wrap: res}
-
-    // _card.style.height = res.height
 
     if (res.title && !_card.headerStyle) {
       _card.headerStyle = { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }
@@ -239,7 +244,6 @@
   render() {
     const { card } = this.state
     let _style = resetStyle(card.style)
-    _style.height = 'auto'
 
     return (
       <div className="menu-data-carousel-edit-box" style={_style} onClick={this.clickComponent} id={card.uuid}>
diff --git a/src/menu/components/carousel/prop-card/index.jsx b/src/menu/components/carousel/prop-card/index.jsx
index dddb947..8efdbe0 100644
--- a/src/menu/components/carousel/prop-card/index.jsx
+++ b/src/menu/components/carousel/prop-card/index.jsx
@@ -50,7 +50,7 @@
         subtype: card.subtype,
         setting: { },
         wrap: { name: card.name, width: card.width || 24, datatype: 'static', autoplay: 'false', dots: 'true', height: '300px' },
-        style: { borderWidth: '1px', borderColor: '#e8e8e8', marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px', height: '300px' },
+        style: { borderWidth: '1px', borderColor: '#e8e8e8', marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px' },
         columns: [],
         scripts: [],
         subcards: [{
@@ -84,8 +84,15 @@
  
       this.updateComponent(_card)
     } else {
+      let _card = fromJS(card).toJS()
+
+      if (!_card.wrap.height && _card.style.height) { // 鍏煎
+        _card.wrap.height = _card.style.height
+      }
+      delete _card.style.height
+
       this.setState({
-        card: fromJS(card).toJS()
+        card: _card
       })
     }
   }
@@ -273,13 +280,11 @@
   getWrapForms = () => {
     const { card } = this.state
 
-    return getWrapForm({...card.wrap, height: card.style.height}, card.subtype)
+    return getWrapForm(card.wrap, card.subtype)
   }
 
   updateWrap = (res) => {
     let _card = {...this.state.card, wrap: res}
-
-    // _card.style.height = res.height
 
     if (res.title && !_card.headerStyle) {
       _card.headerStyle = { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }
@@ -304,7 +309,6 @@
   render() {
     const { card } = this.state
     let _style = resetStyle(card.style)
-    _style.height = 'auto'
 
     return (
       <div className="menu-prop-carousel-edit-box" style={_style} onClick={this.clickComponent} id={card.uuid}>
diff --git a/src/menu/components/iframe/index.jsx b/src/menu/components/iframe/index.jsx
index 2f79a18..53645e2 100644
--- a/src/menu/components/iframe/index.jsx
+++ b/src/menu/components/iframe/index.jsx
@@ -153,7 +153,7 @@
       <div className="menu-iframe-edit-box" style={_style} id={card.uuid}>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
-            <NormalForm title="鏃堕棿杞磋缃�" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
+            <NormalForm title="iframe璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
               <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/>
             </NormalForm>
             <CopyComponent type="iframe" card={card}/>
diff --git a/src/tabviews/custom/components/carousel/data-card/index.jsx b/src/tabviews/custom/components/carousel/data-card/index.jsx
index 90a5d5b..8829c61 100644
--- a/src/tabviews/custom/components/carousel/data-card/index.jsx
+++ b/src/tabviews/custom/components/carousel/data-card/index.jsx
@@ -88,8 +88,12 @@
       return item
     })
 
+    if (!_config.wrap.height) { // 鍏煎
+      _config.wrap.height = _config.style.height || '300px'
+      delete _config.style.height
+    }
+
     _card.style.height = _config.wrap.height
-    _config.style.height = 'auto'
 
     _config.wrap.speed = (_config.wrap.speed || 3) * 1000
 
diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx
index e547437..9b7b8d8 100644
--- a/src/tabviews/custom/components/carousel/prop-card/index.jsx
+++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -78,6 +78,11 @@
       _cols.set(item.field, item)
     })
 
+    if (!_config.wrap.height) { // 鍏煎
+      _config.wrap.height = _config.style.height || '300px'
+      delete _config.style.height
+    }
+
     _config.subcards.forEach(card => {
       card.style.height = _config.wrap.height
       if (card.setting.click) {
@@ -90,8 +95,6 @@
         return item
       })
     })
-
-    _config.style.height = 'auto'
 
     _config.wrap.speed = (_config.wrap.speed || 3) * 1000
 

--
Gitblit v1.8.0