From 96266d3d0e1c5c53e2f5b17e2fbf2c814c2a8d8f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 04 四月 2022 11:21:34 +0800
Subject: [PATCH] 2022-04-04

---
 public/options.json                                               |   15 ++++---
 src/index.js                                                      |    1 
 src/mob/components/menubar/normal-menubar/menucomponent/index.jsx |   10 +++-
 src/views/login/loginform.jsx                                     |    7 ++-
 src/views/appmanage/index.jsx                                     |    2 
 src/templates/zshare/formconfig.jsx                               |    9 ++++
 src/mob/components/menubar/normal-menubar/index.jsx               |   47 +++++++++++++++++------
 public/README.txt                                                 |    5 +-
 src/components/header/loginform.jsx                               |    4 +-
 9 files changed, 71 insertions(+), 29 deletions(-)

diff --git a/public/README.txt b/public/README.txt
index 4008b9e..96a1b4e 100644
--- a/public/README.txt
+++ b/public/README.txt
@@ -6,10 +6,11 @@
 systemType        -- 绯荤粺绫诲瀷锛屾寮忕郴缁熸槸濉玴roduction锛屽紑鍙戠郴缁熶负绌猴紝寮�鍙戠郴缁熶細鏈変竴閮ㄥ垎鐨勬暟鎹ā绯婂寲
 externalDatabase  -- 澶栬仈搴擄紝涓嶄娇鐢ㄦ椂榛樿涓篺alse
 lineColor         -- 鐧诲綍椤靛垎鍓茬嚎棰滆壊
-filter            -- 椤甸潰婊ら暅锛屽�间负'true'鏃讹紝椤甸潰鏄剧ず涓洪粦鐧借壊锛涘綋璁剧疆涓烘棩鏈熸椂锛圷YYY-MM-DD锛夛紝鎴鍒板綋鍓嶆棩鏈燂紝椤甸潰鏄剧ず涓洪粦鐧借壊
+filter            -- 椤甸潰婊ら暅锛屽�间负"true"鏃讹紝椤甸潰鏄剧ず涓洪粦鐧借壊锛涘綋璁剧疆涓烘棩鏈熸椂锛圷YYY-MM-DD锛夛紝鎴鍒板綋鍓嶆棩鏈燂紝椤甸潰鏄剧ず涓洪粦鐧借壊
 defaultApp        -- 榛樿搴旂敤锛岀郴缁熼粯璁ゆ墦寮�鏌愪釜瀛愬簲鐢ㄦ椂闇�濉啓搴旂敤缂栫爜
 defaultLang       -- 鎵撳紑鐨勫瓙搴旂敤璇█绫诲瀷锛岄粯璁や负zh-CN
 WXAppID           -- 浣跨敤鍏紬鍙锋椂锛岀粦瀹氱殑鍏紬鍙稩D
 debugger          -- 鍊间负true鏃跺紑鍚皟璇曟ā寮忥紝寮�鍚悗绉诲姩绔瓙搴旂敤涓細鏈夋帶鍒跺彴
 licenseKey        -- 璁稿彲瀵嗛挜锛屽湪鍐呴儴缃戠粶涓娇鐢ㄧ郴缁熸椂锛屼細璺宠繃epc楠岃瘉
-probation         -- 璇曠敤鏈燂紙YYYY-MM-DD锛夛紝鍦ㄦ寮忕郴缁熶腑锛岃瘯鐢ㄦ湡鍐呰皟鐢ㄧ郴缁熸帴鍙g殑鑴氭湰浼氳褰曚笅鏉�
\ No newline at end of file
+probation         -- 璇曠敤鏈燂紙YYYY-MM-DD锛夛紝鍦ㄦ寮忕郴缁熶腑锛岃瘯鐢ㄦ湡鍐呰皟鐢ㄧ郴缁熸帴鍙g殑鑴氭湰浼氳褰曚笅鏉�
+keepPassword      -- 璁颁綇瀵嗙爜锛岄粯璁ゅ紑鍚紝褰撳�间负"false"鏃剁鐢�
\ No newline at end of file
diff --git a/public/options.json b/public/options.json
index 792a858..fa76f1c 100644
--- a/public/options.json
+++ b/public/options.json
@@ -1,17 +1,18 @@
 {
-  "appId": "202108312122504607B107A83F55B40C98CCF",
-  "appkey": "20210831212235413F287EC3BF489424496C8",
+  "appId": "201912040924165801464FF1788654BC5AC73",
+  "appkey": "20191106103859640976D6E924E464D029CF0",
   "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
   "systemType": "",
   "externalDatabase": "false",
   "lineColor": "",
   "filter": "false",
-  "defaultApp": "mkindustry",
+  "defaultApp": "mk",
   "defaultLang": "zh-CN",
   "WXAppID": "",
   "debugger": false,
-  "licenseKey": "7EFE13KIKLILIJB64C12",
-  "probation": "2021-12-31",
-  "host": "http://demo.mk9h.cn",
-  "service": "erp_new/"
+  "licenseKey": "",
+  "probation": "",
+  "keepPassword": "true",
+  "host": "http://qingqiumarket.cn",
+  "service": "MKWMS/"
 }
\ No newline at end of file
diff --git a/src/components/header/loginform.jsx b/src/components/header/loginform.jsx
index be94096..6e066ec 100644
--- a/src/components/header/loginform.jsx
+++ b/src/components/header/loginform.jsx
@@ -115,13 +115,13 @@
             ]
           })(<Input.Password onPressEnter={(e) => {this.handleSubmit(e, 'username')}} placeholder={this.state.dict['login.password']} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)}
         </Form.Item>
-        <Form.Item style={{marginBottom: '10px'}}>
+        {window.GLOB.keepKey ? <Form.Item style={{marginBottom: '10px'}}>
           {getFieldDecorator('remember', {
             valuePropName: 'checked',
             initialValue: remember,
           })(
           <Checkbox onChange={this.rememberChange}>璁颁綇瀵嗙爜</Checkbox>)}
-        </Form.Item>
+        </Form.Item> : <div style={{height: '20px'}}></div>}
       </Form>
     )
   }
diff --git a/src/index.js b/src/index.js
index e628a1b..601a715 100644
--- a/src/index.js
+++ b/src/index.js
@@ -70,6 +70,7 @@
     GLOB.licenseKey = config.licenseKey || ''
     GLOB.probation = false
     GLOB.watermark = config.watermark !== false
+    GLOB.keepKey = config.keepPassword !== 'false'
 
     if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) {
       GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : ''
diff --git a/src/mob/components/menubar/normal-menubar/index.jsx b/src/mob/components/menubar/normal-menubar/index.jsx
index 2e02fab..0ff743d 100644
--- a/src/mob/components/menubar/normal-menubar/index.jsx
+++ b/src/mob/components/menubar/normal-menubar/index.jsx
@@ -144,20 +144,27 @@
   /**
    * @description 鍗曚釜鍗$墖淇℃伅鏇存柊
    */
-  deleteCard = (cell) => {
+  deleteCard = (cell, type) => {
     let card = fromJS(this.state.card).toJS()
     let _this = this
 
-    confirm({
-      content: '纭畾鍒犻櫎鍗$墖鍚楋紵',
-      onOk() {
-        card.subMenus = card.subMenus.filter(item => item.uuid !== cell.uuid)
-
-        _this.setState({card})
-        _this.props.updateConfig(card)
-      },
-      onCancel() {}
-    })
+    if (type !== 'direct') {
+      confirm({
+        content: '纭畾鍒犻櫎鍗$墖鍚楋紵',
+        onOk() {
+          card.subMenus = card.subMenus.filter(item => item.uuid !== cell.uuid)
+  
+          _this.setState({card})
+          _this.props.updateConfig(card)
+        },
+        onCancel() {}
+      })
+    } else {
+      card.subMenus = card.subMenus.filter(item => item.uuid !== cell.uuid)
+  
+      this.setState({card})
+      this.props.updateConfig(card)
+    }
   }
 
   changeStyle = () => {
@@ -185,7 +192,7 @@
 
     let newcard = {
       uuid: Utils.getuuid(),
-      setting: { type: 'menu', width: 6, sign: 'icon', icon: 'user', name: '瀹㈡埛', url: '', color: '#ffffff', iconFont: 20, padding: 12, background: '#1890ff', imgWidth: '' },
+      setting: { type: 'menu', width: 6, sign: 'icon', icon: '', name: '', url: '', color: '#ffffff', iconFont: 20, padding: 12, background: '#1890ff', imgWidth: '' },
       style: {
         paddingTop: '15px', paddingBottom: '15px'
       }
@@ -194,12 +201,28 @@
     if (card.subMenus.length > 0) {
       newcard = fromJS(card.subMenus.slice(-1)[0]).toJS()
       newcard.uuid = Utils.getuuid()
+
+      newcard.setting.clearMenu = 'true'
+      newcard.setting.icon = ''
+      newcard.setting.name = ''
+      newcard.setting.MenuNo = ''
+      newcard.setting.type = 'menu'
+      newcard.setting.copyMenuId = ''
+      newcard.setting.linkMenuId = ''
+      newcard.setting.linkurl = ''
+      newcard.setting.tip = ''
+      newcard.setting.url = ''
     }
 
     card.subMenus.push(newcard)
     
     this.setState({card})
     this.props.updateConfig(card)
+
+    setTimeout(() => {
+      let node = document.getElementById(newcard.uuid)
+      node && node.click()
+    }, 200)
   }
 
   move = (item, direction) => {
diff --git a/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx b/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx
index 4cefea2..3d90d4e 100644
--- a/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx
+++ b/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx
@@ -152,15 +152,19 @@
                 padding: card.setting.padding,
                 background: card.setting.background,
                 color: card.setting.color,
-                borderRadius: card.setting.borderRadius || '15%'
-              }} type={card.setting.icon}/>
+                borderRadius: card.setting.borderRadius || '15%',
+                opacity: !card.setting.icon ? 0 : 1
+              }} type={card.setting.icon || 'cloud'}/>
               {card.setting.tip ? <sup className="am-badge-text"></sup> : null}
             </div> : <div className="menu-sign">
               <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth, borderRadius: card.setting.borderRadius || '15%'}} src={card.setting.url} alt=""/>
               {card.setting.tip ? <sup className="am-badge-text"></sup> : null}
             </div>}
-            <div className="menu-name">{card.setting.name}</div>
+            <div className="menu-name" style={{opacity: !card.setting.name ? 0 : 1}}>{card.setting.name || '鏄庣'}</div>
             <RightOutlined className="menu-right" />
+            {!card.setting.name ? <NormalForm title="鑿滃崟缂栬緫" width={900} update={this.updateSetting} cancel={() => this.props.deleteElement(card, 'direct')} getForms={this.getSettingForms}>
+              <span id={card.uuid}></span>
+            </NormalForm> : null}
           </div>
         </Popover>
       </Col>
diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index a9468fe..a7d05d7 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -302,6 +302,14 @@
   let typeOptions = []
 
   if (appType === 'mob') {
+    // let adapters = sessionStorage.getItem('adapter')
+    // if (adapters) {
+    //   adapters = adapters.split(',')
+    // } else {
+    //   adapters = []
+    // }
+    // (adapters.includes('wxmini') ? '(灏忕▼搴忔殏涓嶆敮鎸�)' : '')
+
     typeOptions = [{
       value: 'range',
       text: '鏁板�硷紙鍖洪棿锛�'
@@ -318,6 +326,7 @@
     //   value: 'daterange',
     //   text: Formdict['model.form.daterange']
     }]
+
   } else {
     typeOptions = [{
       value: 'text',
diff --git a/src/views/appmanage/index.jsx b/src/views/appmanage/index.jsx
index 0142821..f5dc40d 100644
--- a/src/views/appmanage/index.jsx
+++ b/src/views/appmanage/index.jsx
@@ -1161,7 +1161,7 @@
                       <Col span={12}>
                         <div className="app-item">
                           <div className="label">缃戠珯澶村儚:</div>
-                          <div className="content">{item.favicon ? <img style={{width: '18px', height: '18px'}} src={item.favicon} alt="" /> : '鏃�'}</div>
+                          <div className="content">{item.favicon ? <img style={{width: '18px', height: '18px', borderRadius: '4px'}} src={item.favicon} alt="" /> : '鏃�'}</div>
                         </div>
                       </Col>
                     </Row>
diff --git a/src/views/login/loginform.jsx b/src/views/login/loginform.jsx
index 0997d1a..cd4e3be 100644
--- a/src/views/login/loginform.jsx
+++ b/src/views/login/loginform.jsx
@@ -56,6 +56,9 @@
     if (localStorage.getItem(_url + 'remember') === 'false') {
       remember = false
     }
+    if (!window.GLOB.keepKey) {
+      remember = false
+    }
 
     let smsId = ''
     let hasScan = false
@@ -394,12 +397,12 @@
               ]
             })(<Input.Password placeholder={this.props.dict['login.password']} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)}
           </Form.Item>
-          <Form.Item className="minline">
+          {window.GLOB.keepKey ? <Form.Item className="minline">
             {getFieldDecorator('remember', {
               valuePropName: 'checked',
               initialValue: remember,
             })(<Checkbox onChange={this.rememberChange}>{this.props.dict['login.remember']}</Checkbox>)}
-          </Form.Item>
+          </Form.Item> : <div style={{height: '30px', float: 'left'}}></div>}
           {this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right">
             {getFieldDecorator('lang', {
               initialValue: this.props.lang,

--
Gitblit v1.8.0