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