From 051eb785a36ec3b6cd3b4305fdb65f6940415e9b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 14 九月 2021 13:17:48 +0800
Subject: [PATCH] 2021-09-14

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

diff --git a/src/views/mobdesign/menuform/index.jsx b/src/views/mobdesign/menuform/index.jsx
index 7e656b6..61d7111 100644
--- a/src/views/mobdesign/menuform/index.jsx
+++ b/src/views/mobdesign/menuform/index.jsx
@@ -2,7 +2,10 @@
 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 SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent'))
 
 class CustomMenuForm extends Component {
   static propTpyes = {
@@ -22,6 +25,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})
     }
   }
 
@@ -146,6 +153,35 @@
               )}
             </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}
         </Row>
       </Form>
     )

--
Gitblit v1.8.0