Commit 6838bed8 authored by wangqinghua's avatar wangqinghua

忘记密码

parent 5330af0c
......@@ -9,16 +9,16 @@
<ion-content class="content-box">
<ng-container *ngIf="!isSend">
<div class="pwd-item">
<img src="./assets/imgs/icon-password-confirm.png" class="pwd-img">
<img src="./assets/imgs/icon-phone.png" class="pwd-img">
<input [(ngModel)]="user.phone" class="pwd-content" type="text" required placeholder="请输入手机号码" />
<span (click)="sendCode()">发送验证码</span>
<span class="sendCode" (click)="sendCode()">发送验证码</span>
</div>
<div class="pwd-item">
<img src="./assets/imgs/icon-password-confirm.png" class="pwd-img">
<input [(ngModel)]="user.code" class="pwd-content" type="text" required placeholder="请输入手机号码" />
<input [(ngModel)]="user.code" class="pwd-content" type="text" required placeholder="请输入验证码" />
</div>
<div class="modify-btn">
<button class="submit-btn submit" (click)="sureModifyPassword()">下一步</button>
<button class="submit-btn submit" (click)="next()">下一步</button>
</div>
</ng-container>
<ng-container *ngIf="isSend">
......
......@@ -24,6 +24,16 @@ page-forget-pwd {
margin-left: 20px;
margin-right: 20px;
margin-top: 20px;
position: relative;
}
.sendCode{
position: absolute;
right: 10px;
font-size: 1rem;
color: #e42179;
border: 1px solid #e42179;
border-radius: 3px;
padding: 2px 5px;
}
.pwd-img {
......
......@@ -36,13 +36,25 @@ export class ForgetPwdPage {
//发送验证码
sendCode() {
this.tabSer.sendCode(this.user.phone).subscribe(
const data = {
phone:this.user.phone
}
this.tabSer.sendCode(data).subscribe(
(res) => {
console.log(res);
}
)
}
//下一步
next(){
this.tabSer.checkCode(this.user).subscribe(
(res)=>{
this.isSend = true;
}
)
}
sureModifyPassword() {
if (!this.check()) {
......
......@@ -185,8 +185,13 @@ export class TabsService {
}
//发送短信验证码
sendCode(params): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/manager/sendCode?phone='+params);
sendCode(data): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/manager/sendCode?'+this.commonSer.toQuery(data) );
}
//校验验证码
checkCode(data): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/manager/checkCode?'+this.commonSer.toQuery(data) );
}
//修改密码
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment