diff --git a/src/app/pages/register/register.component.html b/src/app/pages/register/register.component.html index e7c9da0..dd7001e 100644 --- a/src/app/pages/register/register.component.html +++ b/src/app/pages/register/register.component.html @@ -8,19 +8,21 @@
- + - +
- + + pattern="^[0-9A-HJ-NP-RTUW-Y]{2}\d{6}[0-9A-HJ-NP-RTUW-Y]{10}$" ngModel placeholder="请输入统一社会信用代码">
@@ -30,24 +32,27 @@
- + - +
-
+
- + - +
@@ -57,11 +62,13 @@
- + - +
- + \ No newline at end of file diff --git a/src/app/pages/register/register.component.ts b/src/app/pages/register/register.component.ts index 4b54576..e8c8d1a 100644 --- a/src/app/pages/register/register.component.ts +++ b/src/app/pages/register/register.component.ts @@ -10,33 +10,33 @@ import { MatSnackBar } from '@angular/material/snack-bar'; }) export class RegisterComponent implements OnInit { - constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,public snackBar: MatSnackBar) { } + constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, public snackBar: MatSnackBar) { } + + ngOnInit() { } + errmsg: any; //错误信息 - ngOnInit() {} - errmsg:any; //错误信息 - //提交注册表单 - onSubmit(e){ - this.http.post('/api/CompanyAccount/SignUp',{ + onSubmit(e) { + this.http.post('/api/CompanyAccount/SignUp', { companyName: e.companyName, - name:e.name, - password:e.password, - phone:e.phone, - usci:e.usci - }).subscribe(data=>{ + name: e.name, + password: e.password, + phone: String(e.phone), + usci: e.usci + }).subscribe(data => { this.snackBar.open('注册成功,请登录!', '确定', { duration: 3000 }); this.router.navigate(['/login']) - },(err)=>{ + }, (err) => { this.errmsg = err }) } //跳转登陆页面 - toLogin () { + toLogin() { this.router.navigate(['/login']) - } + } diff --git a/src/app/ui/basicinfo/basicinfo.component.html b/src/app/ui/basicinfo/basicinfo.component.html index 0304306..be9cfba 100644 --- a/src/app/ui/basicinfo/basicinfo.component.html +++ b/src/app/ui/basicinfo/basicinfo.component.html @@ -10,7 +10,7 @@
-