diff --git a/src/app/interface.ts b/src/app/interface.ts
index 5b7d6e3..74abb85 100644
--- a/src/app/interface.ts
+++ b/src/app/interface.ts
@@ -11,7 +11,8 @@ export interface Data {
refreshToken:string,
expires: number,
realName:string,
- level:any
+ level:any,
+ isDefaultPassword:string
}
export interface windows {
diff --git a/src/app/pages/login/changePassword.html b/src/app/pages/login/changePassword.html
new file mode 100644
index 0000000..a02921a
--- /dev/null
+++ b/src/app/pages/login/changePassword.html
@@ -0,0 +1,48 @@
+
) { }
+
+ ngOnInit() {
+ }
+ errmsg :string = ''
+
+ onSubmit(e){
+ this.http.put(
+ '/api/Account/Password',
+ {
+ newPassword: e.newPassword,
+ password: 'SHya119!@'
+ }
+ ).subscribe(data=> {
+ this.dialogRef.close(data);
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ this.snackBar.open('密码修改成功','确定',config);
+ },(err) =>
+ {this.errmsg = err}
+ )
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts
index 9063210..aca91df 100644
--- a/src/app/pages/pages.module.ts
+++ b/src/app/pages/pages.module.ts
@@ -1,7 +1,7 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { PagesComponent } from './pages.component';
-import { LoginComponent } from './login/login.component';
+import { ChangepasswordComponent2, LoginComponent } from './login/login.component';
import { RegisterComponent } from './register/register.component';
import { PagesRoutingModule } from './pages-routing.module'
@@ -52,8 +52,9 @@ import { RouterModule } from '@angular/router';
import { LockscreenComponent } from './lockscreen/lockscreen.component';
import { HomeComponent } from './home/home.component';
import { HomedetailComponent } from './homedetail/homedetail.component';
+import { UiModule } from '../ui/ui.module';
@NgModule({
- declarations: [PagesComponent, LoginComponent, RegisterComponent, LockscreenComponent, HomeComponent, HomedetailComponent],
+ declarations: [PagesComponent, LoginComponent, RegisterComponent, LockscreenComponent, HomeComponent, HomedetailComponent,ChangepasswordComponent2],
imports: [
PagesRoutingModule,
@@ -105,8 +106,9 @@ import { HomedetailComponent } from './homedetail/homedetail.component';
FormsModule,
ReactiveFormsModule,
- RouterModule
+ RouterModule,
// PagesRoutingModule,
+ UiModule
]
})
export class PagesModule { }
diff --git a/src/app/ui/changepassword/changepassword.component.html b/src/app/ui/changepassword/changepassword.component.html
index a2ebef3..1217de8 100644
--- a/src/app/ui/changepassword/changepassword.component.html
+++ b/src/app/ui/changepassword/changepassword.component.html
@@ -7,27 +7,24 @@
原密码
-
+
新密码
-
+
-
密码格式8-20位,字母+数字
+
密码格式为8-20位,大小写字母+数字+特殊字符
确认新密码
-
+
密码输入不一致!
@@ -37,8 +34,7 @@
-