From 1da6506bf58270bacc2a4345002c6b082835580e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 21 十月 2021 23:17:08 +0800
Subject: [PATCH] 2021-10-21

---
 src/views/mobdesign/menuform/index.jsx |   88 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 88 insertions(+), 0 deletions(-)

diff --git a/src/views/mobdesign/menuform/index.jsx b/src/views/mobdesign/menuform/index.jsx
index cedb3a5..f053755 100644
--- a/src/views/mobdesign/menuform/index.jsx
+++ b/src/views/mobdesign/menuform/index.jsx
@@ -2,7 +2,11 @@
 import PropTypes from 'prop-types'
 import { Form, Row, Col, Input, Radio, Icon, Tooltip, InputNumber } from 'antd'
 
+import asyncComponent from '@/utils/asyncComponent'
 import './index.scss'
+
+const { TextArea } = Input
+const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent'))
 
 class CustomMenuForm extends Component {
   static propTpyes = {
@@ -22,6 +26,10 @@
       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})
     }
   }
 
@@ -33,6 +41,10 @@
   // 鑿滃崟鍙傛暟
   changeNo = (e) => {
     this.props.updateConfig({...this.props.config, MenuNo: e.target.value})
+  }
+
+  changeRemark = (e) => {
+    this.props.updateConfig({...this.props.config, Remark: e.target.value})
   }
 
   changeCacheDay = (val) => {
@@ -102,6 +114,40 @@
               )}
             </Form.Item>
           </Col>
+          <Col span={24}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title="璺宠繃鏉冮檺楠岃瘉鏃讹紝椤甸潰涓粍浠跺強鎸夐挳涓嶅湪杩涜鏉冮檺鎺у埗銆�">
+                <Icon type="question-circle" />
+                鏉冮檺楠岃瘉
+              </Tooltip>
+            }>
+              {getFieldDecorator('permission', {
+                initialValue: config.permission || 'true'
+              })(
+                <Radio.Group onChange={(e) => {this.selectChange('permission', e.target.value)}}>
+                  <Radio value="true">浣跨敤</Radio>
+                  <Radio value="false">涓嶄娇鐢�</Radio>
+                </Radio.Group>
+              )}
+            </Form.Item>
+          </Col>
+          <Col span={24}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title="浣跨敤鐧诲綍楠岃瘉鍚庯紝鐢ㄦ埛蹇呴』鐧诲綍绯荤粺鍚庢墠鍙互璁块棶锛屾敞锛氬惈鏈夌櫥褰曠粍浠剁殑椤甸潰涓棤鏁堛��">
+                <Icon type="question-circle" />
+                鐧诲綍楠岃瘉
+              </Tooltip>
+            }>
+              {getFieldDecorator('logincheck', {
+                initialValue: config.logincheck || 'false'
+              })(
+                <Radio.Group onChange={(e) => {this.selectChange('logincheck', e.target.value)}}>
+                  <Radio value="true">浣跨敤</Radio>
+                  <Radio value="false">涓嶄娇鐢�</Radio>
+                </Radio.Group>
+              )}
+            </Form.Item>
+          </Col>
           {config.cacheUseful === 'true' ? <Col span={24}>
             <Form.Item label="鍗曚綅">
               {getFieldDecorator('timeUnit', {
@@ -129,6 +175,48 @@
               )}
             </Form.Item>
           </Col> : null}
+          <Col span={24}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title="鍦ㄦ槑绉戜簯APP涓湁鏁堛��">
+                <Icon type="question-circle" />
+                骞垮憡椤�
+              </Tooltip>
+            }>
+              {getFieldDecorator('advertUrl', {
+                initialValue: config.advertUrl || ''
+              })(
+                <SourceComponent type="picture" placement="right" onChange={(val) => {this.selectChange('advertUrl', val)}}/>
+              )}
+            </Form.Item>
+          </Col>
+          {config.advertUrl ? <Col span={24}>
+            <Form.Item label="鍋滅暀(s)">
+              {getFieldDecorator('advertTime', {
+                initialValue: config.advertTime || 3,
+                rules: [
+                  {
+                    required: true,
+                    message: dict['mob.required.input'] + '鍋滅暀鏃堕棿!'
+                  }
+                ]
+              })(
+                <InputNumber min={1} max={10} precision={0} onChange={(val) => {this.selectChange('advertTime', val)}}/>
+              )}
+            </Form.Item>
+          </Col> : null}
+          <Col span={24}>
+            <Form.Item label="澶囨敞">
+              {getFieldDecorator('Remark', {
+                initialValue: config.Remark || '',
+                rules: [
+                  {
+                    max: 512,
+                    message: '澶囨敞鏈�澶�512涓瓧绗︼紒'
+                  }
+                ]
+              })(<TextArea rows={2} placeholder={''} onChange={this.changeRemark} />)}
+            </Form.Item>
+          </Col>
         </Row>
       </Form>
     )

--
Gitblit v1.8.0