From 06c5736947d0efb1ca8984320120cf14b65a9276 Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Sat, 29 May 2021 15:57:58 +0800
Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E9=BB=98=E8=AE=A4=E5=AF=86?=
=?UTF-8?q?=E7=A0=81=E8=BF=9B=E5=85=A5=E5=90=8E=E6=8F=90=E7=A4=BA=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E5=AF=86=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/interface.ts | 3 +-
src/app/pages/login/changePassword.html | 48 +++++++
src/app/pages/login/changePassword.scss | 15 +++
src/app/pages/login/login.component.ts | 65 ++++++++-
src/app/pages/pages.module.ts | 8 +-
.../changepassword.component.html | 22 ++-
.../collection-tools.component.ts | 11 +-
src/app/ui/ui.module.ts | 125 +++++++++---------
8 files changed, 210 insertions(+), 87 deletions(-)
create mode 100644 src/app/pages/login/changePassword.html
create mode 100644 src/app/pages/login/changePassword.scss
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 @@
-