Commit 8b48d540 authored by ddcat1115's avatar ddcat1115

update login/register/resut pages

parent 9e051436
...@@ -24,24 +24,28 @@ ...@@ -24,24 +24,28 @@
color: @heading-color; color: @heading-color;
font-weight: 500; font-weight: 500;
line-height: 32px; line-height: 32px;
margin-bottom: 8px; margin-bottom: 16px;
} }
.description { .description {
font-size: 14px; font-size: 14px;
color: @text-color-secondary; color: @text-color-secondary;
margin-bottom: 16px; margin-bottom: 24px;
} }
.extra { .extra {
background: rgba(245, 245, 245, 0.5); background: rgba(245, 245, 245, 0.5);
padding: 16px 40px; padding: 16px 40px;
margin-bottom: 24px; margin-top: 24px;
border-radius: @border-radius-sm; border-radius: @border-radius-sm;
text-align: left; text-align: left;
} }
.actions button:not(:last-child) { .actions {
margin-right: 8px; margin-top: 32px;
button:not(:last-child) {
margin-right: 8px;
}
} }
} }
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
.container { .container {
background: @background-color-base; background: #f0f2f5;
background-image: url('https://gw.alipayobjects.com/zos/rmsportal/bOjjckIwLKuWCswKAghg.svg'); background-image: url('https://gw.alipayobjects.com/zos/rmsportal/TVYTbAXWheQpRcWDaDMu.svg');
width: 100%; width: 100%;
min-height: 100%; min-height: 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
background-size: 85%; background-size: 100%;
padding: 110px 0 144px 0; padding: 110px 0 144px 0;
position: relative; position: relative;
} }
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
.logo { .logo {
height: 44px; height: 44px;
vertical-align: top; vertical-align: top;
margin-right: 12px; margin-right: 16px;
} }
.title { .title {
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
} }
.desc { .desc {
font-size: @font-size-lg; font-size: @font-size-base;
color: @text-color-secondary; color: @text-color-secondary;
margin-top: 12px; margin-top: 12px;
margin-bottom: 40px; margin-bottom: 40px;
......
...@@ -63,7 +63,7 @@ export default class Login extends Component { ...@@ -63,7 +63,7 @@ export default class Login extends Component {
renderMessage = (message) => { renderMessage = (message) => {
return ( return (
<Alert <Alert
style={{ marginBottom: 16 }} style={{ marginBottom: 24 }}
message={message} message={message}
type="error" type="error"
showIcon showIcon
...@@ -93,6 +93,7 @@ export default class Login extends Component { ...@@ -93,6 +93,7 @@ export default class Login extends Component {
}], }],
})( })(
<Input <Input
size="large"
prefix={<Icon type="user" style={{ fontSize: 14, color: 'rgba(0, 0, 0, 0.25)' }} />} prefix={<Icon type="user" style={{ fontSize: 14, color: 'rgba(0, 0, 0, 0.25)' }} />}
placeholder="admin" placeholder="admin"
/> />
...@@ -105,6 +106,7 @@ export default class Login extends Component { ...@@ -105,6 +106,7 @@ export default class Login extends Component {
}], }],
})( })(
<Input <Input
size="large"
prefix={<Icon type="lock" style={{ fontSize: 14, color: 'rgba(0, 0, 0, 0.25)' }} />} prefix={<Icon type="lock" style={{ fontSize: 14, color: 'rgba(0, 0, 0, 0.25)' }} />}
type="password" type="password"
placeholder="888888" placeholder="888888"
...@@ -128,6 +130,7 @@ export default class Login extends Component { ...@@ -128,6 +130,7 @@ export default class Login extends Component {
}], }],
})( })(
<Input <Input
size="large"
prefix={<Icon type="mobile" style={{ fontSize: 14, color: 'rgba(0, 0, 0, 0.25)' }} />} prefix={<Icon type="mobile" style={{ fontSize: 14, color: 'rgba(0, 0, 0, 0.25)' }} />}
placeholder="手机号" placeholder="手机号"
/> />
...@@ -167,10 +170,10 @@ export default class Login extends Component { ...@@ -167,10 +170,10 @@ export default class Login extends Component {
valuePropName: 'checked', valuePropName: 'checked',
initialValue: true, initialValue: true,
})( })(
<Checkbox>自动登录</Checkbox> <Checkbox className={styles.autoLogin}>自动登录</Checkbox>
)} )}
<a className={styles.forgot} href="">忘记密码</a> <a className={styles.forgot} href="">忘记密码</a>
<Button loading={login.submitting} className={styles.submit} type="primary" htmlType="submit"> <Button size="large" loading={login.submitting} className={styles.submit} type="primary" htmlType="submit">
登录 登录
</Button> </Button>
</FormItem> </FormItem>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
} }
.ant-form-item { .ant-form-item {
margin-bottom: 16px; margin-bottom: 24px;
} }
} }
...@@ -35,7 +35,13 @@ ...@@ -35,7 +35,13 @@
.submit { .submit {
width: 100%; width: 100%;
margin-top: 16px; margin-top: 24px;
}
:global {
.ant-form-item-control {
line-height: 22px;
}
} }
} }
...@@ -75,7 +81,7 @@ ...@@ -75,7 +81,7 @@
.other { .other {
text-align: left; text-align: left;
margin-top: 32px; margin-top: 24px;
.register { .register {
float: right; float: right;
......
...@@ -34,7 +34,7 @@ export default class Register extends Component { ...@@ -34,7 +34,7 @@ export default class Register extends Component {
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
if (nextProps.register.status === 'ok') { if (nextProps.register.status === 'ok') {
this.props.dispatch(routerRedux.push('/')); this.props.dispatch(routerRedux.push('/user/register-result'));
} }
} }
...@@ -154,7 +154,7 @@ export default class Register extends Component { ...@@ -154,7 +154,7 @@ export default class Register extends Component {
type: 'email', message: '邮箱地址格式错误!', type: 'email', message: '邮箱地址格式错误!',
}], }],
})( })(
<Input placeholder="邮箱" /> <Input size="large" placeholder="邮箱" />
)} )}
</FormItem> </FormItem>
<FormItem help={this.state.help}> <FormItem help={this.state.help}>
...@@ -176,6 +176,7 @@ export default class Register extends Component { ...@@ -176,6 +176,7 @@ export default class Register extends Component {
}], }],
})( })(
<Input <Input
size="large"
type="password" type="password"
placeholder="至少6位密码,区分大小写" placeholder="至少6位密码,区分大小写"
/> />
...@@ -191,24 +192,25 @@ export default class Register extends Component { ...@@ -191,24 +192,25 @@ export default class Register extends Component {
}], }],
})( })(
<Input <Input
size="large"
type="password" type="password"
placeholder="确认密码" placeholder="确认密码"
/> />
)} )}
</FormItem> </FormItem>
<FormItem> <FormItem>
<InputGroup className={styles.mobileGroup} compact> <InputGroup size="large" className={styles.mobileGroup} compact>
<FormItem> <FormItem style={{ width: '20%' }}>
{getFieldDecorator('prefix', { {getFieldDecorator('prefix', {
initialValue: '86', initialValue: '86',
})( })(
<Select> <Select size="large">
<Option value="86">+86</Option> <Option value="86">+86</Option>
<Option value="87">+87</Option> <Option value="87">+87</Option>
</Select> </Select>
)} )}
</FormItem> </FormItem>
<FormItem> <FormItem style={{ width: '80%' }}>
{getFieldDecorator('mobile', { {getFieldDecorator('mobile', {
rules: [{ rules: [{
required: true, message: '请输入手机号!', required: true, message: '请输入手机号!',
...@@ -230,12 +232,14 @@ export default class Register extends Component { ...@@ -230,12 +232,14 @@ export default class Register extends Component {
}], }],
})( })(
<Input <Input
size="large"
placeholder="验证码" placeholder="验证码"
/> />
)} )}
</Col> </Col>
<Col span={8}> <Col span={8}>
<Button <Button
size="large"
disabled={count} disabled={count}
className={styles.getCaptcha} className={styles.getCaptcha}
onClick={this.onGetCaptcha} onClick={this.onGetCaptcha}
...@@ -246,7 +250,7 @@ export default class Register extends Component { ...@@ -246,7 +250,7 @@ export default class Register extends Component {
</Row> </Row>
</FormItem> </FormItem>
<FormItem> <FormItem>
<Button loading={register.submitting} className={styles.submit} type="primary" htmlType="submit"> <Button size="large" loading={register.submitting} className={styles.submit} type="primary" htmlType="submit">
注册 注册
</Button> </Button>
<Link className={styles.login} to="/user/login">使用已有账户登录</Link> <Link className={styles.login} to="/user/login">使用已有账户登录</Link>
......
...@@ -6,39 +6,30 @@ ...@@ -6,39 +6,30 @@
:global { :global {
.ant-form-item { .ant-form-item {
margin-bottom: 16px; margin-bottom: 24px;
} }
} }
h3 { h3 {
font-size: 16px; font-size: 16px;
margin-bottom: 16px; margin-bottom: 20px;
} }
.mobileGroup { .mobileGroup {
:global { :global {
.ant-form-item { .ant-form-item {
margin-bottom: 0; margin-bottom: 0;
display: table-cell;
vertical-align: top; vertical-align: top;
&:first-child { &:first-child .ant-select-selection {
width: 20%; border-right-width: 0;
border-top-right-radius: 0;
.ant-select-selection { border-bottom-right-radius: 0;
border-right-width: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
} }
&:last-child { &:last-child .ant-input {
width: 80%; border-top-left-radius: 0;
border-bottom-left-radius: 0;
.ant-input {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
} }
} }
} }
...@@ -55,6 +46,7 @@ ...@@ -55,6 +46,7 @@
.login { .login {
float: right; float: right;
line-height: @btn-height-lg;
} }
} }
......
...@@ -5,19 +5,17 @@ import Result from '../../components/Result'; ...@@ -5,19 +5,17 @@ import Result from '../../components/Result';
const actions = ( const actions = (
<div> <div>
<Button type="primary"><a href="">查看邮箱</a></Button> <Button size="large" type="primary"><a href="">查看邮箱</a></Button>
<Button><Link to="/">返回首页</Link></Button> <Button size="large"><Link to="/">返回首页</Link></Button>
</div> </div>
); );
export default () => ( export default () => (
<div style={{ width: 520, margin: '0 auto' }}> <Result
<Result type="success"
type="success" title="你的账户:AntDesign@example.com 注册成功"
title="你的账户:AntDesign@example.com 注册成功" description="激活邮件已发送到你的邮箱中,邮件有效期为24小时。请及时登录邮箱,点击邮件中的链接激活帐户。"
description="激活邮件已发送到你的邮箱中,邮件有效期为24小时。请及时登录邮箱,点击邮件中的链接激活帐户。" actions={actions}
actions={actions} style={{ marginTop: 64 }}
style={{ marginTop: 64 }} />
/>
</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