Commit 1c8b68d7 authored by 前端-许佳敏's avatar 前端-许佳敏

feat:add component agreement

parent 50721d63
......@@ -23,7 +23,7 @@
"@ant-design/icons": "^4.2.1",
"@umijs/preset-react": "1.x",
"@umijs/test": "^3.2.0",
"god": "^1.1.26",
"god": "0.0.12",
"lint-staged": "^10.0.7",
"mobx": "^5.15.4",
"mobx-react": "^6.2.2",
......
......@@ -55,4 +55,18 @@
padding: 0 115px;
display: flex;
align-items: center;
}
.form-box {
width: 320px;
margin: 40px auto 0;
}
.formBefore {
width: 54px;
line-height: 40px;
height: 40px;
text-align: center;
background: #F4F5F7;
color: #42526E;
border: 1px solid #DFE1E6;
border-right: 0;
}
\ No newline at end of file
// This file is automatically generated.
// Please do not change this file!
interface CssExports {
'form-box': string;
'formBefore': string;
'formBox': string;
'lingxi-business-content1024': string;
'lingxi-business-margin_content': string;
'lingxiBusinessContent1024': string;
......
import React, { useState } from 'react'
import { Input, Form, Steps } from 'antd'
import { Input, Form, Steps, Button, Row, Space } from 'antd'
import styles from './index.less'
import globalStyles from '@/global.less'
import cx from 'classnames'
import { FormPage } from 'god'
import { IFormControllers, IFormButtonTypes } from 'god/dist/src/form-page'
import { Link } from 'umi'
const Step = Steps.Step
......@@ -13,6 +15,66 @@ const stepList = [
{ title: '等待审核', key: 'wait' },
{ title: '注册成功', key: 'success' },
]
const registerForm: IFormControllers[] = [
{
type: 'Input',
name: 'phone',
inputProps: {
addonBefore: <div className={styles.formBefore}>+86</div>,
placeholder: '请输入你的手机号码',
}
},
{
type: 'Verification',
name: 'code',
inputProps: {
}
},
{
type: 'Input',
name: 'password',
inputProps: {
type: 'password',
placeholder: '设置你的密码',
}
},
{
type: 'Input',
name: 'confirmPassword',
inputProps: {
type: 'password',
placeholder: '请再次输入你的登录密码',
}
},
{
type: 'Input',
name: 'email',
inputProps: {
type: 'email',
placeholder: '请输入你的邮箱(选填)',
}
},
{
type: 'CheckBox',
name: 'readme',
label: <>
<span>阅读并同意</span>
<Link to='/'>《会员服务协议》</Link>
<Link to='/'>《法律条款》</Link>
<Link to='/'>《隐私政策》</Link>
</>
}
]
const registerButtons: IFormButtonTypes[] = [
{
text: '同意协议并注册',
type: 'primary',
htmlType: 'submit',
block: true,
disabled: true,
}
]
const UserRegistry = () => {
const [current, setCurrent] = useState(0)
return (
......@@ -24,6 +86,13 @@ const UserRegistry = () => {
stepList.map(v => <Step title={v.title} key={v.key}/>)
}
</Steps>
<div className={styles.formBox}>
<FormPage renderFormLists={registerForm} renderButtonLists={registerButtons}>
<Row justify='center' align='middle'>
已有平台账号?<Button type='link'>去登陆</Button>
</Row>
</FormPage>
</div>
</div>
</div>
)
......
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