|
@@ -155,10 +155,8 @@
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
let loginParams = {
|
|
let loginParams = {
|
|
|
- phone:this.userName,
|
|
|
|
|
|
|
+ username:this.userName,
|
|
|
passWord:this.password,
|
|
passWord:this.password,
|
|
|
- userType:'2'
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
this.loading=true;
|
|
this.loading=true;
|
|
|
|
|
|
|
@@ -166,11 +164,14 @@
|
|
|
this.loading=false;
|
|
this.loading=false;
|
|
|
if(res.data.success){
|
|
if(res.data.success){
|
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
|
- this.saveClientId()
|
|
|
|
|
|
|
+ // this.saveClientId()
|
|
|
// #endif
|
|
// #endif
|
|
|
// #ifndef APP-PLUS
|
|
// #ifndef APP-PLUS
|
|
|
this.$tip.success('登录成功!')
|
|
this.$tip.success('登录成功!')
|
|
|
- this.$Router.replaceAll({name:'index'})
|
|
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '/pages/index/index'
|
|
|
|
|
+ })
|
|
|
|
|
+ // this.$Router.replaceAll({name:'index'})
|
|
|
// #endif
|
|
// #endif
|
|
|
}else{
|
|
}else{
|
|
|
this.$tip.alert(res.data.message);
|
|
this.$tip.alert(res.data.message);
|
|
@@ -183,15 +184,15 @@
|
|
|
this.loading=false;
|
|
this.loading=false;
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- saveClientId(){
|
|
|
|
|
- var info = plus.push.getClientInfo();
|
|
|
|
|
- var cid = info.clientid;
|
|
|
|
|
- this.$http.get("/sys/user/saveClientId",{params:{clientId:cid}}).then(res=>{
|
|
|
|
|
- console.log("res::saveClientId>",res)
|
|
|
|
|
- this.$tip.success('登录成功!')
|
|
|
|
|
- this.$Router.replaceAll({name:'index'})
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // saveClientId(){
|
|
|
|
|
+ // var info = plus.push.getClientInfo();
|
|
|
|
|
+ // var cid = info.clientid;
|
|
|
|
|
+ // this.$http.get("/sys/user/saveClientId",{params:{clientId:cid}}).then(res=>{
|
|
|
|
|
+ // console.log("res::saveClientId>",res)
|
|
|
|
|
+ // this.$tip.success('登录成功!')
|
|
|
|
|
+ // this.$Router.replaceAll({name:'index'})
|
|
|
|
|
+ // })
|
|
|
|
|
+ // },
|
|
|
changePassword() {
|
|
changePassword() {
|
|
|
this.showPassword = !this.showPassword;
|
|
this.showPassword = !this.showPassword;
|
|
|
},
|
|
},
|
|
@@ -230,6 +231,7 @@
|
|
|
}, 1000);
|
|
}, 1000);
|
|
|
},
|
|
},
|
|
|
onSMSLogin() {
|
|
onSMSLogin() {
|
|
|
|
|
+
|
|
|
let checkPhone = new RegExp(/^[1]([3-9])[0-9]{9}$/);
|
|
let checkPhone = new RegExp(/^[1]([3-9])[0-9]{9}$/);
|
|
|
|
|
|
|
|
if(!this.phoneNo || this.phoneNo.length==0){
|
|
if(!this.phoneNo || this.phoneNo.length==0){
|
|
@@ -244,6 +246,14 @@
|
|
|
this.$tip.toast('请填短信验证码');
|
|
this.$tip.toast('请填短信验证码');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ if(!this.password ){
|
|
|
|
|
+ this.$tip.toast('请输入密码');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(!this.password1 ){
|
|
|
|
|
+ this.$tip.toast('请输入新密码');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if(this.password !== this.password1){
|
|
if(this.password !== this.password1){
|
|
|
this.$tip.toast('请确定密码是否一致');
|
|
this.$tip.toast('请确定密码是否一致');
|
|
|
return;
|
|
return;
|