|
@@ -58,7 +58,7 @@ export class LoginComponent {
|
|
|
{
|
|
|
name: '作者/教师/主编',
|
|
|
type: 6,
|
|
|
- route:'/nav-author/textbook/list'
|
|
|
+ route:'/nav-author/manage/textbook'
|
|
|
},
|
|
|
];
|
|
|
currentProfile: any = this.selector[0];
|
|
@@ -67,13 +67,15 @@ export class LoginComponent {
|
|
|
private fb: NonNullableFormBuilder,
|
|
|
public router: Router,
|
|
|
private authServr: AuthServr
|
|
|
- ) {}
|
|
|
+ ) {
|
|
|
+ }
|
|
|
submitForm(): void {
|
|
|
if (this.validateForm.valid) {
|
|
|
- console.log('submit', this.currentProfile);
|
|
|
+ let {userName, password, code } = this.validateForm.value
|
|
|
+ console.log(userName, password,);
|
|
|
localStorage.setItem('profile', JSON.stringify(this.currentProfile));
|
|
|
this.tbookSer.profile = this.currentProfile;
|
|
|
- this.authServr.login('admin', '12345', this.tbookSer.company).then(() => {
|
|
|
+ this.authServr.login(userName, password, this.tbookSer.company).then(() => {
|
|
|
this.router.navigate([this.currentProfile.route]);
|
|
|
});
|
|
|
} else {
|