Commit 803ebe7f authored by wangqinghua's avatar wangqinghua

update

parent 1f304834
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"proxies": [ "proxies": [
{ {
"path": "/wisdomgroup", "path": "/wisdomgroup",
"proxyUrl": "http://218.78.19.169:8081/wisdomgroup" "proxyUrl": "http://bjgdjy.shjcdj.cn/wisdomgroup"
}, },
{ {
"path": "/logistics", "path": "/logistics",
......
...@@ -18,15 +18,14 @@ ...@@ -18,15 +18,14 @@
<ion-content> <ion-content>
<!-- <ion-searchbar (ionInput)="getList()" [(ngModel)]="name" placeholder="姓名、手机号码"></ion-searchbar>--> <div *ngFor="let org of orgList;let i = index;">
<div *ngFor="let org of orgList;let i = index;" >
<div class="item item-border" (click)="getPersonList(org,i)"> <div class="item item-border" (click)="getPersonList(org,i)">
<img src="./assets/imgs/orgn.png" class="contact-img"> <img src="./assets/imgs/orgn.png" class="contact-img">
<span class="contact-title">{{org?.name}}</span> <span class="contact-title">{{org?.name}}</span>
<ion-icon *ngIf="!org.drop" name="ios-arrow-forward"></ion-icon> <ion-icon *ngIf="!org.drop" name="ios-arrow-forward"></ion-icon>
<ion-icon *ngIf="org.drop" name="arrow-down"></ion-icon> <ion-icon *ngIf="org.drop" name="arrow-down"></ion-icon>
</div> </div>
<div *ngIf="org.drop" class="person-list" > <div *ngIf="org.drop" class="person-list">
<div class="ion-item" *ngFor="let item of org?.perList"> <div class="ion-item" *ngFor="let item of org?.perList">
<div class="contact-box"> <div class="contact-box">
<div class="contact-img"> <div class="contact-img">
......
...@@ -101,9 +101,9 @@ export class LoginPage { ...@@ -101,9 +101,9 @@ export class LoginPage {
return this.navCtrl.setRoot(TabsPage, {"user": this.user}); return this.navCtrl.setRoot(TabsPage, {"user": this.user});
} else if (res.code == 201) { } else if (res.code == 201) {
this.commonSer.toast('密码强度低,请修改密码'); this.commonSer.toast('密码强度低,请修改密码');
this.navCtrl.push('ForgetPwdPage'); this.navCtrl.push('ModifyPasswordPage');
} else { } else {
this.appService.alert(res.message); this.appService.alert(res.errmsg);
} }
}, },
(err) => { (err) => {
......
import {Injectable} from "@angular/core";import {HttpClient} from "@angular/common/http";import {Http} from "@angular/http";import {Observable} from "rxjs/Observable";import {AppGlobal} from "../../service/http.service";import {CommonService} from "../../provide/common.service"; @Injectable()export class MineService { constructor( private http: HttpClient, //该请求 将结果转为json private commonSer: CommonService, private https: Http, //该请求不转json ) { } //我的发布 myPublish(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myPublish', data); } //我的收藏 myCollection(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myCollection', data); } //我的审核 appCheckList(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/appCheckList', data); } //退回已审核文章 stuffRecall(params): Observable<any> { return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/stuff/recall/' + params); } //上传头像 imageUpload(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/common/file/image/upload', data); } //获取个人头像 showImgByFileid(data): Observable<any> { return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/common/file/showImgByFileid/' + data); } //支部积分 orgPointList(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/twissignhistory/orgPointList', this.commonSer.toFormData(data)); } //个人排行榜 personPointList(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/twissignhistory/personPointList', this.commonSer.toFormData(data) ); } //个人积分信息 personPointDetail(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/twissignhistory/personPointDetail', this.commonSer.toFormData(data) ); } //查询待审核数量 waitCheckNum(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/waitCheckNum' , data); } //查询我的草稿 myDraft(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myDraft',data); } } import {Injectable} from "@angular/core";import {HttpClient} from "@angular/common/http";import {Http} from "@angular/http";import {Observable} from "rxjs/Observable";import {AppGlobal} from "../../service/http.service";import {CommonService} from "../../provide/common.service"; @Injectable()export class MineService { constructor( private http: HttpClient, //该请求 将结果转为json private commonSer: CommonService, private https: Http, //该请求不转json ) { } //我的发布 myPublish(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myPublish', data); } //我的收藏 myCollection(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myCollection', data); } //我的审核 appCheckList(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/appCheckList', data); } //退回已审核文章 stuffRecall(params): Observable<any> { return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/stuff/recall/' + params); } //上传头像 imageUpload(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/common/file/image/upload', data); } //获取个人头像 showImgByFileid(data): Observable<any> { return this.http.get(AppGlobal.domain + '/wisdomgroup/modules/common/file/showImgByFileid/' + data); } //支部积分 orgPointList(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/twissignhistory/orgPointList', this.commonSer.toFormData(data)); } //个人排行榜 personPointList(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/twissignhistory/personPointList', this.commonSer.toFormData(data)); } //个人积分信息 personPointDetail(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/twissignhistory/personPointDetail', this.commonSer.toFormData(data)); } //查询待审核数量 waitCheckNum(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/waitCheckNum', data); } //查询我的草稿 myDraft(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/modules/stuff/myDraft', data); } //修改默认密码 updateDefaultPassword(data): Observable<any> { return this.http.post(AppGlobal.domain + '/wisdomgroup/manager/updateDefaultPassword', this.commonSer.toFormData(data)); } }
\ No newline at end of file \ No newline at end of file
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
</ion-header> </ion-header>
<ion-content class="content-box"> <ion-content class="content-box">
<div class="pwd-item"> <div class="pwd-item">
<img src="./assets/imgs/icon-phone.png" class="pwd-img">
<input [(ngModel)]="passwordInfo.mobile" class="pwd-content" type="text" required placeholder="手机号码" />
</div>
<div class="pwd-item">
<img src="./assets/imgs/icon-password.png" class="pwd-img"> <img src="./assets/imgs/icon-password.png" class="pwd-img">
<input [(ngModel)]="passwordInfo.formerPassword" class="pwd-content" type="password" required placeholder="原密码" /> <input [(ngModel)]="passwordInfo.formerPassword" class="pwd-content" type="password" required placeholder="原密码" />
</div> </div>
......
...@@ -8,6 +8,7 @@ import {AppService} from '../../../../service/http.service'; ...@@ -8,6 +8,7 @@ import {AppService} from '../../../../service/http.service';
import {LoginPage} from '../../../login/login'; import {LoginPage} from '../../../login/login';
import {MineService} from "../../../mine-pages/mine.service";
@IonicPage() @IonicPage()
@Component({ @Component({
...@@ -18,15 +19,12 @@ export class ModifyPasswordPage { ...@@ -18,15 +19,12 @@ export class ModifyPasswordPage {
myreg = /^(?=[a-zA-Z]+\d+)\w{8,20}$/; myreg = /^(?=[a-zA-Z]+\d+)\w{8,20}$/;
user = {
mobile: '',
password: ''
}
passwordInfo = { passwordInfo = {
mobile: "",
formerPassword: '', formerPassword: '',
modifyPassword: '', modifyPassword: '',
sureModifyPassword: '' sureModifyPassword: ''
} };
constructor(public navCtrl: NavController, constructor(public navCtrl: NavController,
public navParams: NavParams, public navParams: NavParams,
...@@ -34,26 +32,18 @@ export class ModifyPasswordPage { ...@@ -34,26 +32,18 @@ export class ModifyPasswordPage {
public alertCtrl: AlertController, public alertCtrl: AlertController,
private loadingCtrl: LoadingController, private loadingCtrl: LoadingController,
public http: Http, public http: Http,
private mineSer: MineService,
public appService: AppService,) { public appService: AppService,) {
this.storage.get("userLoginInfo").then((value) => {
this.user = value;
});
} }
sureModifyPassword() { sureModifyPassword() {
if (this.passwordInfo.formerPassword == '' || if (this.passwordInfo.formerPassword == '' ||
this.passwordInfo.modifyPassword == '' || this.passwordInfo.modifyPassword == '' ||
this.passwordInfo.mobile == '' ||
this.passwordInfo.sureModifyPassword == '') { this.passwordInfo.sureModifyPassword == '') {
this.appService.popToastView("请输入完整信息!", 'top', 2000); this.appService.popToastView("请输入完整信息!", 'top', 2000);
return; return;
} }
if (this.passwordInfo.formerPassword != '') {
if (this.user.password != this.passwordInfo.formerPassword) {
this.appService.popToastView("原密码输入有误!", 'top', 2000);
return;
}
}
if (!this.myreg.test(this.passwordInfo.modifyPassword)) { if (!this.myreg.test(this.passwordInfo.modifyPassword)) {
this.appService.popToastView('新密码以英文字母开头,同时包含数字,长度8-20位!', 'top', 2000); this.appService.popToastView('新密码以英文字母开头,同时包含数字,长度8-20位!', 'top', 2000);
return false; return false;
...@@ -61,29 +51,22 @@ export class ModifyPasswordPage { ...@@ -61,29 +51,22 @@ export class ModifyPasswordPage {
if (this.passwordInfo.modifyPassword != this.passwordInfo.sureModifyPassword) { if (this.passwordInfo.modifyPassword != this.passwordInfo.sureModifyPassword) {
this.appService.popToastView("两次输入的密码不一致", 'top', 2000); this.appService.popToastView("两次输入的密码不一致", 'top', 2000);
return; return;
} else {
this.appService.ObserverHttpPost("/wisdomgroup/manager/updatePassword", {"password": this.passwordInfo.modifyPassword})
.subscribe((res: Response) => {
this.appService.popToastView("修改成功!", 'top', 2000);
//将缓存中密码密码修改
this.user.password = this.passwordInfo.modifyPassword;
this.storage.set('userLoginInfo', this.user);
//退出后台
this.logoutApp();
//退出到登录页
this.navCtrl.setRoot("LoginPage");
}, error => {
}
);
} }
} const data = {
mobile: this.passwordInfo.mobile,
logoutApp() { oldPassword: this.passwordInfo.formerPassword,
this.appService.ObserverHttpGet("/wisdomgroup/app/logout", null) newPassword: this.passwordInfo.sureModifyPassword
.subscribe((res: Response) => { };
let data = res.json(); this.mineSer.updateDefaultPassword(data).subscribe(
}, error => { (res) => {
if (res.errcode == 1000) {
this.appService.popToastView("修改成功!", 'top', 2000);
this.navCtrl.setRoot("LoginPage");
} else {
this.appService.popToastView(`${res.data}`, 'top', 2000);
} }
); //退出到登录页
}
)
} }
} }
...@@ -14,8 +14,8 @@ export class AppGlobal { ...@@ -14,8 +14,8 @@ export class AppGlobal {
//接口基地址 //接口基地址
// static domain = "http://192.168.2.106:8080"; //正式环境 // static domain = "http://192.168.2.106:8080"; //正式环境
// static domain = "http://61.129.91.113"; //政务云 static domain = "http://bjgdjy.shjcdj.cn"; //政务云
static domain = "http://47.103.33.196:8080"; //阿里云正式地址 // static domain = "http://47.103.33.196:8080"; //阿里云正式地址
// static domain = "http://47.103.35.216:8080"; //阿里云测试地址 // static domain = "http://47.103.35.216:8080"; //阿里云测试地址
// static domain = "http://218.78.19.169:8081"; //天翼云地址 // static domain = "http://218.78.19.169:8081"; //天翼云地址
// static domain = "http://218.78.19.169:8082/"; //天翼测试云地址 // static domain = "http://218.78.19.169:8082/"; //天翼测试云地址
......
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