dev_forum
hjm 5 years ago
parent 8b6ca86a83
commit 95037fa4cb

@ -21,6 +21,58 @@ class AccountNav extends Component {
const isSecure = path.indexOf('secure') != -1 const isSecure = path.indexOf('secure') != -1
return ( return (
<div className="accountNav fl"> <div className="accountNav fl">
<style>{`
.accountInfo {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
}
.accountInfo .name {
color: #05101A;
font-size: 24px;
height: 36px;
}
.accountInfo .role {
color: #666666;
font-size: 14px;
}
.accountManagement .title {
color: #05101A;
font-size: 18px;
font-weight: 400;
padding: 10px 28px;
margin-top: 6px;
}
.accountManagement .navItem {
font-size: 16px;
padding: 6px 0px;
padding-left: 30px;
border-left: 2px solid #fff;
cursor: pointer;
color:#4D4D4D;
}
.accountManagement .navItem i{
margin-top: -4px;
display: inline-block;
margin-right: 7px;
}
.accountManagement .navItem i.status{
margin-top: 1px;
margin-right: 24px;
}
.accountManagement .navItem.active {
border-left: 2px solid #4CACFF;
background: #E6F3FF;
}
.accountManagement .navItem.active i:first-child{
color:#4CACFF!important;
}
.color-green-light{
color: #45E660!important;
}
`}</style>
{ {
basicInfo && basicInfo.id && basicInfo && basicInfo.id &&
<React.Fragment> <React.Fragment>

@ -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: '请输入816位的新密码区分大小写',
},{
validator:this.InputNewPassword validator:this.InputNewPassword
}], }],
})( })(

@ -18,9 +18,7 @@
.flexRow { .flexRow {
display: flex; display: flex;
} }
.color-green-light{
color: #45E660!important;
}
.mb15{margin-bottom: 15px!important;} .mb15{margin-bottom: 15px!important;}
/* BUTTOn */ /* BUTTOn */
.ant-btn { .ant-btn {
@ -53,49 +51,3 @@ button.ant-btn.ant-btn-primary.grayBtn {
.basicForm .ant-form-item-label label { .basicForm .ant-form-item-label label {
color: #979797 color: #979797
} */ } */
.accountInfo {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
}
.accountInfo .name {
color: #05101A;
font-size: 24px;
height: 36px;
}
.accountInfo .role {
color: #666666;
font-size: 14px;
}
.accountManagement .title {
color: #05101A;
font-size: 18px;
font-weight: 400;
padding: 10px 28px;
margin-top: 6px;
}
.accountManagement .navItem {
font-size: 16px;
padding: 6px 0px;
padding-left: 30px;
border-left: 2px solid #fff;
cursor: pointer;
color:#4D4D4D;
}
.accountManagement .navItem i{
margin-top: -4px;
display: inline-block;
margin-right: 7px;
}
.accountManagement .navItem i.status{
margin-top: 1px;
margin-right: 24px;
}
.accountManagement .navItem.active {
border-left: 2px solid #4CACFF;
background: #E6F3FF;
}
.accountManagement .navItem.active i:first-child{
color:#4CACFF!important;
}
Loading…
Cancel
Save