Commit 033813bd authored by wangqinghua's avatar wangqinghua

忘记密码

parent d259e50f
...@@ -27,7 +27,7 @@ export class ForgetPwdPage { ...@@ -27,7 +27,7 @@ export class ForgetPwdPage {
isSend = false; isSend = false;
constructor(public navCtrl: NavController, public navParams: NavParams,private commonSer:CommonService, constructor(public navCtrl: NavController, public navParams: NavParams, private commonSer: CommonService,
private appService: AppService, private tabSer: TabsService) { private appService: AppService, private tabSer: TabsService) {
} }
...@@ -50,9 +50,9 @@ export class ForgetPwdPage { ...@@ -50,9 +50,9 @@ export class ForgetPwdPage {
next() { next() {
this.tabSer.checkCode(this.user).subscribe( this.tabSer.checkCode(this.user).subscribe(
(res) => { (res) => {
if(res.errcode == "1000"){ if (res.errcode == "1000") {
this.isSend = true; this.isSend = true;
}else{ } else {
this.commonSer.toast(res.errmsg); this.commonSer.toast(res.errmsg);
} }
} }
...@@ -69,16 +69,26 @@ export class ForgetPwdPage { ...@@ -69,16 +69,26 @@ export class ForgetPwdPage {
}; };
this.tabSer.updatePassword(data).subscribe( this.tabSer.updatePassword(data).subscribe(
(res) => { (res) => {
if(res == 1){ if (res == 1) {
this.commonSer.toast('密码修改成功'); this.commonSer.toast('密码修改成功');
this.logoutApp();
this.navCtrl.pop(); this.navCtrl.pop();
}else{ } else {
this.commonSer.toast('密码修改失败'); this.commonSer.toast('密码修改失败');
} }
} }
); );
} }
logoutApp() {
this.appService.ObserverHttpGet("/wisdomgroup/app/logout", null)
.subscribe((res: Response) => {
let data = res.json();
}, error => {
}
);
}
check() { check() {
if (this.passwordInfo.modifyPassword == '' || if (this.passwordInfo.modifyPassword == '' ||
this.passwordInfo.sureModifyPassword == '') { this.passwordInfo.sureModifyPassword == '') {
......
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