Commit a34b13c6 by zeyang

优化手机禁用校验规则

parent 27b16f83
......@@ -17,7 +17,7 @@
<div class="weui-cell" style="padding:10px 0px">
<div class="weui-cell__bd">
<input autofocus="" class="weui-input" type="tel" maxlength="11" pattern="[0-9]*" placeholder="请输入您的真实手机"
name="mobileNo" [(ngModel)]="userInfo.mobileNo" (blur)="inputBlur()" [disabled]="type=='identify'">
name="mobileNo" [(ngModel)]="userInfo.mobileNo" (blur)="inputBlur()" [disabled]="type=='identify' || (type=='register' && isDisMobileNo)">
</div>
</div>
<div class="weui-cell weui-cell_vcode" style="padding:12px 0px">
......
......@@ -40,6 +40,10 @@ export class RegisterComponent implements OnInit {
eNoticeId:string;
// 电子告知书信息
eNoticeInfo:any;
//是否禁用注册页面下的手机号码输入框
isDisMobileNo:Boolean=false;
ngOnInit() {
const title = this.activatedRoute.snapshot.data[0]['title'];
this.lifeCommonService.setTitle(title);
......@@ -47,16 +51,33 @@ export class RegisterComponent implements OnInit {
this.eNoticeId = this.activatedRoute.snapshot.queryParams.eNoticeId?this.activatedRoute.snapshot.queryParams.eNoticeId:null;
sessionStorage.setItem('eNoticeId',this.eNoticeId);
this.type = this.activatedRoute.snapshot.routeConfig.path;
console.log(this.type)
console.log(this.type);
console.log(this.activatedRoute.snapshot)
if(this.type=='identify'){
this.queryInformedSheetById();
}
if(this.type=='register' && this.hiringBasicInfoId){
this.queryWholeInfo();
}
}
inputBlur() {
window.scrollTo(0, 0);
}
//查询
queryWholeInfo(){
this.myService.queryWholeInfo({hiringBasicInfoId:this.hiringBasicInfoId}).subscribe(res => {
if (res['success']) {
if(res['data']['mobileNo']){
this.isDisMobileNo = true;
this.userInfo.mobileNo = res['data']['mobileNo'];
}
} else {
this.openPopInfo('报聘信息不完整,请联系推荐人');
}
});
}
// 查询告知书链接
queryInformedSheetList(){
this.myService.queryInformedSheetList({id:this.eNoticeId}).subscribe(res=>{
......
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