Commit ca26eade by baiguangyao

合并passport

parents fe3d6a6d 8ff43504
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
input { input {
width: 300px; width: 300px;
height: 46px; height: 46px;
padding-left: 17px; padding: 15px 0 15px 34px;
border: 1px solid $border_ccc; border: 1px solid $border_ccc;
border-radius: 3px; border-radius: 3px;
-webkit-appearance: none; -webkit-appearance: none;
...@@ -16,11 +16,14 @@ ...@@ -16,11 +16,14 @@
} }
.iconfont { .iconfont {
display: inline-block;
position: absolute; position: absolute;
top: 50%; top: 50%;
right: 13px;
transform: translateY(-50%); transform: translateY(-50%);
font-size: 21px; font-size: 21px;
color: $color_bbb;
}
.clear {
right: 13px;
} }
} }
\ No newline at end of file
...@@ -22,7 +22,7 @@ class ClearableInput extends Component { ...@@ -22,7 +22,7 @@ class ClearableInput extends Component {
} }
render() { render() {
let {wrapperClass, inputClass, placeholder, type = 'text', onChange, ...rest} = this.props let {wrapperClass, inputClass, placeholder, type = 'text', onChange, icon, ...rest} = this.props
let clearIconStyle = { let clearIconStyle = {
display: this.state.value.length ? 'block' : 'none' display: this.state.value.length ? 'block' : 'none'
} }
...@@ -36,8 +36,9 @@ class ClearableInput extends Component { ...@@ -36,8 +36,9 @@ class ClearableInput extends Component {
placeholder={placeholder} placeholder={placeholder}
{...rest} {...rest}
/> />
{icon}
<i <i
className={'iconfont icondanseshixintubiao-3'} className={'iconfont icondanseshixintubiao-3 clear'}
onClick={this.clearInput} onClick={this.clearInput}
style={clearIconStyle} style={clearIconStyle}
/> />
......
...@@ -6,7 +6,8 @@ import { Link } from "react-router-dom"; ...@@ -6,7 +6,8 @@ import { Link } from "react-router-dom";
import Header from "../common/Header"; import Header from "../common/Header";
import Input from '../common/Input' import Input from '../common/Input'
import LoginButton from '../common/LoginButton' import LoginButton from '../common/LoginButton'
import VeriCodeButton from '../common/veriCodeInput' import PasswordInput from '../common/passwordInput'
// import VeriCodeButton from '../common/veriCodeInput'
// import LoginWays from '../common/LoginWays' // import LoginWays from '../common/LoginWays'
...@@ -17,10 +18,21 @@ class AccountLogin extends Component { ...@@ -17,10 +18,21 @@ class AccountLogin extends Component {
<div className={'account-login'}> <div className={'account-login'}>
<Header/> <Header/>
<div className="login-info"> <div className="login-info">
<Input inputType={'number'} placeholder={'手机/邮箱/昵称'} wrapperClass={'tel-input'}/> <Input inputType={'number'}
<VeriCodeButton placeholder={'手机/邮箱/昵称'}
wrapperClass={'tel-input'}
icon={<i className={'iconfont iconshouji'}
style={{fontSize: '22px', left: '10px'}}
/>}
/>
{/*<VeriCodeButton
className={'verification'} className={'verification'}
/>*/}
<PasswordInput
placeholder={'密码'}
/> />
<LoginButton/> <LoginButton/>
<Link className={'forgot-password-btn'} to='/passport/forgot-password'>忘记密码</Link> <Link className={'forgot-password-btn'} to='/passport/forgot-password'>忘记密码</Link>
</div> </div>
......
...@@ -26,11 +26,17 @@ class BindingTel extends Component { ...@@ -26,11 +26,17 @@ class BindingTel extends Component {
type={'number'} type={'number'}
placeholder={'请输入需要绑定的手机号'} placeholder={'请输入需要绑定的手机号'}
wrapperClass={'tel'} wrapperClass={'tel'}
icon={<i className={'iconfont iconshouji'}
style={{fontSize: '22px', left: '11px'}}
/>}
/> />
<VeriCodeInput <VeriCodeInput
type={'number'} type={'number'}
className={'verification'} className={'verification'}
onChange={this.handleChange} onChange={this.handleChange}
icon={<i className={'iconfont iconduanxin'}
style={{fontSize: '20px', left: '12px'}}
/>}
/> />
<div className="place"/> <div className="place"/>
<Button className={'complete-btn'}>完成</Button> <Button className={'complete-btn'}>完成</Button>
......
...@@ -19,7 +19,7 @@ class Index extends Component { ...@@ -19,7 +19,7 @@ class Index extends Component {
} }
render() { render() {
let {type, iconClass, placeholder, wrapperClass, children} = this.props let {type, icon, placeholder, wrapperClass, children} = this.props
return ( return (
<div className={classnames('input-wrapper', wrapperClass)}> <div className={classnames('input-wrapper', wrapperClass)}>
<input <input
...@@ -29,7 +29,8 @@ class Index extends Component { ...@@ -29,7 +29,8 @@ class Index extends Component {
value={this.state.value} value={this.state.value}
onChange={this.handleChange} onChange={this.handleChange}
/> />
<i className={classnames('icon', iconClass)}/> {/*<i className={classnames('iconfont', iconClass)}/>*/}
{icon}
{children} {children}
</div> </div>
) )
......
...@@ -16,9 +16,12 @@ ...@@ -16,9 +16,12 @@
font-size: $font_16; font-size: $font_16;
color: $color_999; color: $color_999;
} }
}
.icon { .iconfont {
position: absolute;
} top: 50%;
transform: translateY(-50%);
font-size: $font_20;
color: $color_bbb;
} }
} }
\ No newline at end of file
import React, { Component } from 'react'; import React, { Component } from 'react';
import './password-input.scss' import './password-input.scss'
import classnames from 'classnames'
import Input from '../Input' import Input from '../Input'
...@@ -24,7 +25,10 @@ class PasswordInput extends Component { ...@@ -24,7 +25,10 @@ class PasswordInput extends Component {
placeholder={placeholder} placeholder={placeholder}
onChange={onChange} onChange={onChange}
> >
<i className={'iconfont iconiconfront-54'} onClick={this.togglePasswordVisibility}/> <i className={classnames('iconfont', {
'iconpwd-hidden': this.state.showPassword,
'iconyanjing': !this.state.showPassword
})} onClick={this.togglePasswordVisibility}/>
</Input> </Input>
); );
} }
......
...@@ -44,12 +44,14 @@ class VeriCodeInput extends Component { ...@@ -44,12 +44,14 @@ class VeriCodeInput extends Component {
} }
render() { render() {
let {onChange, type = 'number', placeholder = '', className, ...rest} = this.props
return ( return (
<Input <Input
type={'number'} type={type}
placeholder={''} placeholder={placeholder}
onChange={this.handleChange} onChange={this.handleChange}
wrapperClass={this.props.className} wrapperClass={className}
{...rest}
> >
<button className={classnames('verify', {active: !this.state.counting})} onClick={this.countDown}> <button className={classnames('verify', {active: !this.state.counting})} onClick={this.countDown}>
{ {
......
...@@ -35,10 +35,16 @@ class ForgotPassword extends Component { ...@@ -35,10 +35,16 @@ class ForgotPassword extends Component {
placeholder={'请输入注册时的邮箱账号或手机号'} placeholder={'请输入注册时的邮箱账号或手机号'}
onChange={this.setTel} onChange={this.setTel}
wrapperClass={'tel-input'} wrapperClass={'tel-input'}
icon={<i className={'iconfont iconshouji'}
style={{fontSize: '22px', left: '11px'}}
/>}
/> />
<VeriCodeButton <VeriCodeButton
className={'verify-code'} className={'verify-code'}
onChange={this.setVerificationCode} onChange={this.setVerificationCode}
icon={<i className={'iconfont iconduanxin'}
style={{fontSize: '20px', left: '12px'}}
/>}
/> />
<div className="place"/> <div className="place"/>
<Button className={'next'}>下一步</Button> <Button className={'next'}>下一步</Button>
......
...@@ -29,10 +29,20 @@ class WechatLogin extends Component { ...@@ -29,10 +29,20 @@ class WechatLogin extends Component {
<Header/> <Header/>
<div className="login-info"> <div className="login-info">
<Input inputType={'number'} placeholder={'手机号快捷登录(免注册)'} wrapperClass={'tel-input'}/> <Input
inputType={'number'}
placeholder={'手机号快捷登录(免注册)'}
wrapperClass={'tel-input'}
icon={<i className={'iconfont iconshouji'}
style={{fontSize: '22px', left: '10px'}}
/>}
/>
<VeriCodeInput <VeriCodeInput
className={'verification'} className={'verification'}
onChange={this.handleChange} onChange={this.handleChange}
icon={<i className={'iconfont iconduanxin'}
style={{fontSize: '20px', left: '12px'}}
/>}
/> />
<LoginButton/> <LoginButton/>
</div> </div>
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
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