|
|
|
@ -142,7 +142,7 @@ class RealNameCertificationModal extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getDepartments=(e,flag)=>{
|
|
|
|
|
let arr=this.state.schoolList.filter(function(item){
|
|
|
|
@ -450,6 +450,28 @@ class RealNameCertificationModal extends Component{
|
|
|
|
|
department_id: arr[0].id,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 姓名
|
|
|
|
|
handleSubmitNames(rule, value, callback){
|
|
|
|
|
if (value) {
|
|
|
|
|
let iconRule1 = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im;
|
|
|
|
|
// 判断是否含有emoji表情
|
|
|
|
|
let iconRule2 = /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig;
|
|
|
|
|
// 如果为true,字符串含有emoji表情 ,false不含
|
|
|
|
|
const iconRule2s =iconRule2.test(value);
|
|
|
|
|
// 如果为true,字符串含有特殊符号 ,false不
|
|
|
|
|
const iconRule1s =iconRule1.test(value);
|
|
|
|
|
|
|
|
|
|
if (iconRule2s===true|| iconRule1s===true) {
|
|
|
|
|
callback('2-10位中英文、数字');
|
|
|
|
|
}
|
|
|
|
|
else if(value.length<2){
|
|
|
|
|
callback('2-10位中英文、数字');
|
|
|
|
|
}else if(value.length>=11){
|
|
|
|
|
callback('2-10位中英文、数字');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
const { course_lists, checkBoxValues, searchValue, loading, imageUrl, imageUrl2,
|
|
|
|
@ -669,8 +691,10 @@ class RealNameCertificationModal extends Component{
|
|
|
|
|
// initialValue: this.state.cityDefaultValue,
|
|
|
|
|
required: true,
|
|
|
|
|
message: `请输入真实姓名,最大限制${MAX_NAME_LENGTH}个字符`,
|
|
|
|
|
validator: this.checkNameLength
|
|
|
|
|
}],
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
{ validator: this.handleSubmitNames },
|
|
|
|
|
],
|
|
|
|
|
})(
|
|
|
|
|
<Input placeholder={`请输入真实姓名,最大限制${MAX_NAME_LENGTH}个字符`} className="yslgraduainputedit" disabled={!showRealName && this.state.forDisable == true } addonAfter={
|
|
|
|
|
<i className={showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue"}
|
|
|
|
@ -678,7 +702,7 @@ class RealNameCertificationModal extends Component{
|
|
|
|
|
}></Input>
|
|
|
|
|
)}
|
|
|
|
|
<span>{ showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }</span>
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
{/* // <div className="df" style={{}}>
|
|
|
|
|
// <Tooltip title="已完成实名认证,不能修改">
|
|
|
|
|
// <span className="mr8" >{showRealName ? this.props.basicInfo.name : getHiddenName(this.props.basicInfo.name)}</span>
|
|
|
|
@ -687,7 +711,7 @@ class RealNameCertificationModal extends Component{
|
|
|
|
|
// onClick={()=>this.showOrHide(showRealName)}></i>
|
|
|
|
|
// <span>{ showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)' }</span>
|
|
|
|
|
// </div> */}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<Form.Item
|
|
|
|
|