|
|
|
@ -35,6 +35,9 @@ class AccountSecure extends Component {
|
|
|
|
|
|
|
|
|
|
// 获取验证码倒计时
|
|
|
|
|
remainTime=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
seconds: 60
|
|
|
|
|
})
|
|
|
|
|
this.timer = setInterval(() => {
|
|
|
|
|
let { seconds } =this.state;
|
|
|
|
|
let s = parseInt(seconds)-1;
|
|
|
|
@ -53,7 +56,7 @@ class AccountSecure extends Component {
|
|
|
|
|
|
|
|
|
|
// 获取验证码
|
|
|
|
|
getCode=(index)=>{
|
|
|
|
|
let url=`/account/get_verification_code.json`
|
|
|
|
|
let url=`/accounts/get_verification_code.json`
|
|
|
|
|
let login = '';
|
|
|
|
|
let values=this.props.form.getFieldsValue();
|
|
|
|
|
if(index == 3){
|
|
|
|
@ -199,9 +202,11 @@ class AccountSecure extends Component {
|
|
|
|
|
|
|
|
|
|
InputNewPassword=(rule,value,callback)=>{
|
|
|
|
|
const { form } = this.props;
|
|
|
|
|
if (value.length<8 || value.length>12) {
|
|
|
|
|
callback("请输入8-12个字符的新密码,区分大小写!");
|
|
|
|
|
}else {
|
|
|
|
|
if (!value) {
|
|
|
|
|
callback("请输入8-16位字符的新密码,区分大小写!");
|
|
|
|
|
} else if (value.length<8 || value.length>16) {
|
|
|
|
|
callback("请输入8-16位字符的新密码,区分大小写!");
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -283,7 +288,7 @@ class AccountSecure extends Component {
|
|
|
|
|
:
|
|
|
|
|
<span style={{color: '#EA320E'}}>未绑定</span>
|
|
|
|
|
}
|
|
|
|
|
绑定手机号码,将获得500金币的奖励哟~,手机号码仅自己可见~
|
|
|
|
|
{basicInfo.phone ? '仅自己可见,可用手机号码登录EduCoder' : '绑定手机号码,将获得500金币的奖励哟~,手机号码仅自己可见~'}
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
updating != PHONE &&
|
|
|
|
@ -305,10 +310,10 @@ class AccountSecure extends Component {
|
|
|
|
|
rules: [{
|
|
|
|
|
// initialValue: this.state.cityDefaultValue,
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入要绑定的手机号码',
|
|
|
|
|
message: `请输入要${basicInfo.phone ? '更换' : '绑定'}的手机号码`,
|
|
|
|
|
}],
|
|
|
|
|
})(
|
|
|
|
|
<Input placeholder="请输入要绑定的手机号码"></Input>
|
|
|
|
|
<Input placeholder={`请输入要${basicInfo.phone ? '更换' : '绑定'}的手机号码`}></Input>
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
@ -442,10 +447,6 @@ class AccountSecure extends Component {
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator('p_new', {
|
|
|
|
|
rules: [{
|
|
|
|
|
// initialValue: this.state.cityDefaultValue,
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入8~16位的新密码,区分大小写',
|
|
|
|
|
},{
|
|
|
|
|
validator:this.InputNewPassword
|
|
|
|
|
}],
|
|
|
|
|
})(
|
|
|
|
|