Commit ead469c4 authored by wangqinghua's avatar wangqinghua

style update

parent 033813bd
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"proxies": [ "proxies": [
{ {
"path": "/wisdomgroup", "path": "/wisdomgroup",
"proxyUrl": "http://47.103.35.216:8080/wisdomgroup" "proxyUrl": "http://192.168.1.49:8080/wisdomgroup"
} }
] ]
} }
...@@ -10,15 +10,15 @@ ...@@ -10,15 +10,15 @@
<ng-container *ngIf="!isSend"> <ng-container *ngIf="!isSend">
<div class="pwd-item"> <div class="pwd-item">
<img src="./assets/imgs/icon-phone-gray.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" (ngModelChange)="nextCheck()" type="text" required placeholder="请输入手机号码" />
<span class="sendCode" (click)="sendCode()">发送验证码</span> <button [disabled]="disabledClick" class="sendCode" (click)="sendCode()">{{verifyText}}</button>
</div> </div>
<div class="pwd-item"> <div class="pwd-item">
<img src="./assets/imgs/icon-password-confirm.png" class="pwd-img"> <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" (ngModelChange)="nextCheck()" type="text" required placeholder="请输入验证码" />
</div> </div>
<div class="modify-btn"> <div class="modify-btn">
<button class="submit-btn submit" (click)="next()">下一步</button> <button [class.next]="nextClick" [disabled]="!nextClick" class="submit-btn submit" (click)="next()">下一步</button>
</div> </div>
</ng-container> </ng-container>
<ng-container *ngIf="isSend"> <ng-container *ngIf="isSend">
......
...@@ -33,7 +33,8 @@ page-forget-pwd { ...@@ -33,7 +33,8 @@ page-forget-pwd {
color: #e42179; color: #e42179;
border: 1px solid #e42179; border: 1px solid #e42179;
border-radius: 3px; border-radius: 3px;
padding: 2px 5px; padding: 7px;
background-color: #fff;
} }
.pwd-img { .pwd-img {
...@@ -42,7 +43,7 @@ page-forget-pwd { ...@@ -42,7 +43,7 @@ page-forget-pwd {
} }
.pwd-content { .pwd-content {
width: 100%; width: 60%;
border: 0; border: 0;
font-size: 16px; font-size: 16px;
} }
...@@ -64,8 +65,12 @@ page-forget-pwd { ...@@ -64,8 +65,12 @@ page-forget-pwd {
} }
.submit { .submit {
border: 1px solid #999999;
background-color: #999999;
margin-top: 50px;
}
button.next{
border: 1px solid #e42417; border: 1px solid #e42417;
background-color: #e42417; background-color: #e42417;
margin-top: 20px;
} }
} }
...@@ -26,6 +26,10 @@ export class ForgetPwdPage { ...@@ -26,6 +26,10 @@ export class ForgetPwdPage {
}; };
isSend = false; isSend = false;
disabledClick = false;
verifyText = '获取验证码';
nextClick = 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) {
...@@ -36,16 +40,46 @@ export class ForgetPwdPage { ...@@ -36,16 +40,46 @@ export class ForgetPwdPage {
//发送验证码 //发送验证码
sendCode() { sendCode() {
if (this.user.phone.length !== 11 || !Number(this.user.phone)) {
this.commonSer.toast('请输入正确的手机号码');
return false;
}
const data = { const data = {
phone: this.user.phone phone: this.user.phone
} };
this.tabSer.sendCode(data).subscribe( this.tabSer.sendCode(data).subscribe(
(res) => { (res) => {
console.log(res); if (res.errcode == 1000) {
this.countTime();
}
} }
) )
} }
nextCheck(){
if(this.user.phone.length > 0 && this.user.code.length > 0){
this.nextClick = true;
}else{
this.nextClick = false;
}
}
//倒计时
countTime() {
let totalTime = 60;
this.disabledClick = true;
this.verifyText = totalTime + 's后重新发送';
let clock = window.setInterval(() => {
totalTime--;
this.verifyText = totalTime + 's后重新发送';
if (totalTime < 0) {
window.clearInterval(clock);
this.verifyText = "重新发送验证码";
this.disabledClick = false;
}
}, 1000)
}
//下一步 //下一步
next() { next() {
this.tabSer.checkCode(this.user).subscribe( this.tabSer.checkCode(this.user).subscribe(
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</ion-item> </ion-item>
<ion-item class="margin-top-10"> <ion-item class="margin-top-10">
<ion-label>报名备注</ion-label> <ion-label>报名备注</ion-label>
<ion-textarea [(ngModel)]="order.Orderbz" class="content-textarea"></ion-textarea> <ion-textarea [(ngModel)]="order.Orderbz"></ion-textarea>
</ion-item> </ion-item>
<button class="submit-btn submit" (click)="condirmAlert()">提交订单</button> <button class="submit-btn submit" (click)="condirmAlert()">提交订单</button>
......
...@@ -191,7 +191,7 @@ export class TabsService { ...@@ -191,7 +191,7 @@ export class TabsService {
//校验验证码 //校验验证码
checkCode(data): Observable<any> { checkCode(data): Observable<any> {
return this.http.post(AppGlobal.domain + '/wisdomgroup/manager/checkCode?',data ); return this.http.post(AppGlobal.domain + '/wisdomgroup/manager/checkCode',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