You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
855 B
34 lines
855 B
import { Component, OnInit } from '@angular/core';
|
|
import {FormBuilder} from '@angular/forms';
|
|
import {Commons} from '../../commons';
|
|
@Component({
|
|
selector: 'app-register',
|
|
templateUrl: './register.component.html',
|
|
styleUrls: ['./register.component.scss']
|
|
})
|
|
// 注册模块
|
|
export class RegisterComponent extends Commons implements OnInit {
|
|
// 注册表单
|
|
registerForm = this.fb.group({
|
|
managerName: [],
|
|
password: [],
|
|
confirmPassword: [],
|
|
mobile: [],
|
|
email: []
|
|
});
|
|
|
|
constructor(private fb: FormBuilder) {
|
|
super();
|
|
}
|
|
|
|
ngOnInit(): void {
|
|
}
|
|
|
|
register() {
|
|
this.request('http://localhost:8080/api/manager/register', JSON.stringify(this.registerForm.value),
|
|
res => {
|
|
this.message = res.message;
|
|
this.messageStyle = (res.result === 'OK' ? 'info' : 'warning');
|
|
});
|
|
}
|
|
}
|
|
|