Commit af140a81 authored by 前端-李俊鑫's avatar 前端-李俊鑫

feat: 自营商城-关于我们新增电话和地址字段

parent 918247af
import { useEffect, useState, useRef } from 'react'; import { useEffect, useState, useRef } from 'react'
import { Form, Button, Card, Select, Input, Tooltip, Typography, Row, Col, message } from 'antd'; import { Form, Button, Card, Select, Input, Tooltip, Typography, Row, Col, message } from 'antd'
import RequireItem from '@/components/RequireItem'; import RequireItem from '@/components/RequireItem'
import { Prompt } from 'umi'; import { Prompt } from 'umi'
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api'
import { CopyOutlined, SaveOutlined } from '@ant-design/icons'; import { CopyOutlined, SaveOutlined } from '@ant-design/icons'
import { validatorByte } from '@/utils/regExp'; import { validatorByte, checkRegExp } from '@/utils/regExp'
import { PATTERN_MAPS } from '@/constants/regExp'
import { PageHeaderWrapper } from '@ant-design/pro-layout' import { PageHeaderWrapper } from '@ant-design/pro-layout'
import copy from 'copy-to-clipboard' import copy from 'copy-to-clipboard'
import TabAnchor from '@/components/TabAnchor' import TabAnchor from '@/components/TabAnchor'
...@@ -191,11 +192,11 @@ const OwnMallAboutUs = () => { ...@@ -191,11 +192,11 @@ const OwnMallAboutUs = () => {
name='describe' name='describe'
label={<RequireItem label="公司简介" isRequire={true}/>} label={<RequireItem label="公司简介" isRequire={true}/>}
rules={[ rules={[
{ required: true, message: "请输公司简介" }, { required: true, message: "请输公司简介" },
{ validator: (r, v, c) => validatorByte(r, v, c, 400) } { validator: (r, v, c) => validatorByte(r, v, c, 400) }
]} ]}
> >
<Input.TextArea rows={1} placeholder="最长400个字符,200个汉字"/> <Input.TextArea rows={3} placeholder="最长400个字符,200个汉字"/>
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
...@@ -229,6 +230,26 @@ const OwnMallAboutUs = () => { ...@@ -229,6 +230,26 @@ const OwnMallAboutUs = () => {
</Form.Item> </Form.Item>
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}>
<Form.Item
name='phone'
label={<RequireItem label="联系电话"/>}
rules={[{ max: 20 }]}
>
<Input placeholder="请输入联系电话"/>
</Form.Item>
</Col>
<Col span={12}>
<Form.Item
name='address'
label={<RequireItem label="详细地址"/>}
rules={[
{ validator: (r, v, c) => validatorByte(r, v, c, 100) }
]}
>
<Input placeholder="请输入详细地址"/>
</Form.Item>
</Col>
</Row> </Row>
</Card> </Card>
<Card id='2' title='厂房照片' style={{ marginBottom: 16 }}> <Card id='2' title='厂房照片' style={{ marginBottom: 16 }}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment