From e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 17 十月 2022 17:57:34 +0800
Subject: [PATCH] 2022-10-17

---
 src/views/mobdesign/menuform/index.jsx |   67 +++++++++++++++++----------------
 1 files changed, 35 insertions(+), 32 deletions(-)

diff --git a/src/views/mobdesign/menuform/index.jsx b/src/views/mobdesign/menuform/index.jsx
index bf80a96..14fae1f 100644
--- a/src/views/mobdesign/menuform/index.jsx
+++ b/src/views/mobdesign/menuform/index.jsx
@@ -12,7 +12,6 @@
 
 class CustomMenuForm extends Component {
   static propTpyes = {
-    dict: PropTypes.object, // 瀛楀吀椤�
     config: PropTypes.object,
     MenuId: PropTypes.string,
     adapters: PropTypes.array,
@@ -22,27 +21,14 @@
   state = {}
 
   // 涓�浜岀骇鑿滃崟鍒囨崲
-  selectChange = (key, value) => {
-    const { config } = this.props
+  selectChange = (key, value, hex) => {
+    let _config = {...this.props.config, [key]: value}
 
-    this.props.updateConfig({...config, [key]: value})
-    // if (key === 'cacheUseful') {
-    //   this.props.updateConfig({...config, cacheUseful: value})
-    // } else if (key === 'timeUnit') {
-    //   this.props.updateConfig({...config, timeUnit: value})
-    // } else if (key === 'advertUrl') {
-    //   this.props.updateConfig({...config, advertUrl: value})
-    // } else if (key === 'advertTime') {
-    //   this.props.updateConfig({...config, advertTime: value})
-    // } else if (key === 'pullRefresh') {
-    //   this.props.updateConfig({...config, pullRefresh: value})
-    // } else if (key === 'statusBarbgColor') {
-    //   this.props.updateConfig({...config, statusBarbgColor: value})
-    // } else if (key === 'permission') {
-    //   this.props.updateConfig({...config, permission: value})
-    // } else if (key === 'share') {
-    //   this.props.updateConfig({...config, share: value})
-    // }
+    if (key === 'statusBarbgColor' && hex) {
+      _config.statusBarHexColor = hex
+    }
+
+    this.props.updateConfig(_config)
   }
 
   // 鑿滃崟鍚嶇О
@@ -67,7 +53,7 @@
   }
 
   render() {
-    const { dict, config, adapters } = this.props
+    const { config, adapters } = this.props
     const { getFieldDecorator } = this.props.form
     const formItemLayout = {
       labelCol: {
@@ -84,26 +70,26 @@
       <Form {...formItemLayout} className="custom-menu-form">
         <Row>
           <Col span={24}>
-            <Form.Item label={dict['mob.menu'] + dict['mob.name']}>
+            <Form.Item label="鑿滃崟鍚嶇О">
               {getFieldDecorator('MenuName', {
                 initialValue: config.MenuName,
                 rules: [
                   {
                     required: true,
-                    message: dict['mob.required.input'] + dict['mob.menu'] + dict['mob.name'] + '!'
+                    message: '璇疯緭鍏ヨ彍鍗曞悕绉�!'
                   }
                 ]
               })(<Input placeholder="" autoComplete="off" onChange={this.changeName}/>)}
             </Form.Item>
           </Col>
           <Col span={24}>
-            <Form.Item label={dict['mob.menu'] + dict['mob.param']}>
+            <Form.Item label="鑿滃崟鍙傛暟">
               {getFieldDecorator('MenuNo', {
                 initialValue: config.MenuNo,
                 rules: [
                   {
                     required: true,
-                    message: dict['mob.required.input'] + dict['mob.menu'] + dict['mob.param'] + '!'
+                    message: '璇疯緭鍏ヨ彍鍗曞弬鏁�!'
                   }
                 ]
               })(<Input placeholder="" autoComplete="off" onChange={this.changeNo}/>)}
@@ -126,7 +112,7 @@
               )}
             </Form.Item>
           </Col>
-          <Col span={24}>
+          {/* <Col span={24}>
             <Form.Item label={
               <Tooltip placement="topLeft" title="璺宠繃鏉冮檺楠岃瘉鏃讹紝椤甸潰涓粍浠跺強鎸夐挳涓嶅湪杩涜鏉冮檺鎺у埗銆�">
                 <QuestionCircleOutlined className="mk-form-tip" />
@@ -142,7 +128,7 @@
                 </Radio.Group>
               )}
             </Form.Item>
-          </Col>
+          </Col> */}
           <Col span={24}>
             <Form.Item label={
               <Tooltip placement="topLeft" title="浣跨敤鐧诲綍楠岃瘉鍚庯紝鐢ㄦ埛蹇呴』鐧诲綍绯荤粺鍚庢墠鍙互璁块棶锛屾敞锛氬惈鏈夌櫥褰曠粍浠剁殑椤甸潰涓棤鏁堛��">
@@ -179,7 +165,7 @@
                 rules: [
                   {
                     required: true,
-                    message: dict['mob.required.input'] + '鏃堕暱!'
+                    message: '璇疯緭鍏ユ椂闀�!'
                   }
                 ]
               })(
@@ -203,10 +189,27 @@
             <Form.Item className="status-bar" label={
               <Tooltip placement="topLeft" title="鍦ㄦ槑绉戜簯APP鎴栧皬绋嬪簭涓紝鐘舵�佹爮鐨勮儗鏅壊銆�">
                 <QuestionCircleOutlined className="mk-form-tip" />
-                鐘舵�佹爮
+                鐘舵�佹爮鑳屾櫙
               </Tooltip>
             }>
-              <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val) => {this.selectChange('statusBarbgColor', val)}} />
+              <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val, hex) => {this.selectChange('statusBarbgColor', val, hex)}} />
+            </Form.Item>
+          </Col> : null}
+          {adapters.includes('wxmini') ? <Col span={24}>
+            <Form.Item className="status-bar-color" label={
+              <Tooltip placement="topLeft" title="鍦ㄤ娇鐢ㄥ皬绋嬪簭鏃讹紝鐘舵�佹爮鐨勫瓧浣撻鑹层��">
+                <QuestionCircleOutlined className="mk-form-tip" />
+                鐘舵�佹爮瀛椾綋
+              </Tooltip>
+            }>
+              {getFieldDecorator('statusBarColor', {
+                initialValue: config.statusBarColor || 'black'
+              })(
+                <Radio.Group onChange={(e) => {this.selectChange('statusBarColor', e.target.value)}}>
+                  <Radio value="black">榛戣壊</Radio>
+                  <Radio value="white">鐧借壊</Radio>
+                </Radio.Group>
+              )}
             </Form.Item>
           </Col> : null}
           {adapters.includes('app') ? <Col span={24}>
@@ -235,7 +238,7 @@
                 rules: [
                   {
                     required: true,
-                    message: dict['mob.required.input'] + '鍋滅暀鏃堕棿!'
+                    message: '璇疯緭鍏ュ仠鐣欐椂闂�!'
                   }
                 ]
               })(

--
Gitblit v1.8.0