Commit d259e50f authored by wangqinghua's avatar wangqinghua

忘记密码

parent 6838bed8
...@@ -64,6 +64,6 @@ pages/ app的页面 ...@@ -64,6 +64,6 @@ pages/ app的页面
io.ionic.smart19.starter.test 内部测试的版本id io.ionic.smart19.starter.test 内部测试的版本id
io.ionic.smart19.starter 正式环境的版本id io.ionic.smart19.starter 正式环境的版本id
io.ionic.partyCloud.starter.test 部机关党建云(测试) io.ionic.partyCloud.starter.test 部机关党建云(测试)
io.ionic.partyCloud.starter.test 部机关党建云
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release-key.keystore app-release-unsigned.apk 部机关党建云 jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release-key.keystore app-release-unsigned.apk 部机关党建云
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<ion-content class="content-box"> <ion-content class="content-box">
<ng-container *ngIf="!isSend"> <ng-container *ngIf="!isSend">
<div class="pwd-item"> <div class="pwd-item">
<img src="./assets/imgs/icon-phone.png" class="pwd-img"> <img src="./assets/imgs/icon-phone-gray.png" class="pwd-img">
<input [(ngModel)]="user.phone" class="pwd-content" type="text" required placeholder="请输入手机号码" /> <input [(ngModel)]="user.phone" class="pwd-content" type="text" required placeholder="请输入手机号码" />
<span class="sendCode" (click)="sendCode()">发送验证码</span> <span class="sendCode" (click)="sendCode()">发送验证码</span>
</div> </div>
......
...@@ -3,6 +3,7 @@ import {IonicPage, NavController, NavParams} from 'ionic-angular'; ...@@ -3,6 +3,7 @@ import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {Response} from "@angular/http"; import {Response} from "@angular/http";
import {AppService} from "../../service/http.service"; import {AppService} from "../../service/http.service";
import {TabsService} from "../tabs/tabs.service"; import {TabsService} from "../tabs/tabs.service";
import {CommonService} from "../../provide/common.service";
@IonicPage() @IonicPage()
...@@ -26,18 +27,17 @@ export class ForgetPwdPage { ...@@ -26,18 +27,17 @@ export class ForgetPwdPage {
isSend = false; isSend = false;
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,private commonSer:CommonService,
private appService: AppService, private tabSer: TabsService) { private appService: AppService, private tabSer: TabsService) {
} }
ionViewDidLoad() { ionViewDidLoad() {
console.log('ionViewDidLoad ForgetPwdPage');
} }
//发送验证码 //发送验证码
sendCode() { sendCode() {
const data = { const data = {
phone:this.user.phone phone: this.user.phone
} }
this.tabSer.sendCode(data).subscribe( this.tabSer.sendCode(data).subscribe(
(res) => { (res) => {
...@@ -47,10 +47,14 @@ export class ForgetPwdPage { ...@@ -47,10 +47,14 @@ export class ForgetPwdPage {
} }
//下一步 //下一步
next(){ next() {
this.tabSer.checkCode(this.user).subscribe( this.tabSer.checkCode(this.user).subscribe(
(res)=>{ (res) => {
if(res.errcode == "1000"){
this.isSend = true; this.isSend = true;
}else{
this.commonSer.toast(res.errmsg);
}
} }
) )
} }
...@@ -65,17 +69,14 @@ export class ForgetPwdPage { ...@@ -65,17 +69,14 @@ export class ForgetPwdPage {
}; };
this.tabSer.updatePassword(data).subscribe( this.tabSer.updatePassword(data).subscribe(
(res) => { (res) => {
if(res == 1){
this.commonSer.toast('密码修改成功');
this.navCtrl.pop();
}else{
this.commonSer.toast('密码修改失败');
}
} }
); );
// this.appService.ObserverHttpPost("/wisdomgroup/manager/updatePassword", {"password": this.passwordInfo.modifyPassword})
// .subscribe((res: Response) => {
// this.appService.popToastView("修改成功!", 'top', 2000);
// //退出到登录页
// this.navCtrl.pop();
// }, error => {
// }
// );
} }
check() { check() {
......
...@@ -191,11 +191,11 @@ export class TabsService { ...@@ -191,11 +191,11 @@ export class TabsService {
//校验验证码 //校验验证码
checkCode(data): Observable<any> { checkCode(data): Observable<any> {
return this.http.get(AppGlobal.domain + '/wisdomgroup/manager/checkCode?'+this.commonSer.toQuery(data) ); return this.http.post(AppGlobal.domain + '/wisdomgroup/manager/checkCode?',data );
} }
//修改密码 //修改密码
updatePassword(data): Observable<any> { updatePassword(data): Observable<any> {
return this.http.post(AppGlobal.domain + '/wisdomgroup/manager/updatePassword', data); return this.http.post(AppGlobal.domain + '/wisdomgroup/manager/updatePassword', this.commonSer.toFormData(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