|
@@ -95,7 +95,7 @@
|
|
if(response.code != 200){
|
|
if(response.code != 200){
|
|
this.text = "*"+response.msg;
|
|
this.text = "*"+response.msg;
|
|
if(response.code == 530){
|
|
if(response.code == 530){
|
|
- this.text = "*用户不存在";
|
|
|
|
|
|
+ this.text = "*"+response.msg;
|
|
}
|
|
}
|
|
}else {
|
|
}else {
|
|
this.text = "";
|
|
this.text = "";
|
|
@@ -144,46 +144,42 @@
|
|
//登录
|
|
//登录
|
|
handleLogin(){
|
|
handleLogin(){
|
|
let self = this;
|
|
let self = this;
|
|
- console.log("0")
|
|
|
|
if(this.checkPhone(this.loginForm.username)&&this.loginForm.password){
|
|
if(this.checkPhone(this.loginForm.username)&&this.loginForm.password){
|
|
this.text = "";
|
|
this.text = "";
|
|
- console.log("1")
|
|
|
|
this.$refs.loginForm.validate(valid => {
|
|
this.$refs.loginForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- console.log("2")
|
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
this.loginForm.authType = 'mobile'
|
|
this.loginForm.authType = 'mobile'
|
|
- console.log("login",this.loginForm);
|
|
|
|
this.$store.dispatch("LoginPhone", this.loginForm).then((res) => {
|
|
this.$store.dispatch("LoginPhone", this.loginForm).then((res) => {
|
|
if(res.code != 200){
|
|
if(res.code != 200){
|
|
this.text = "*"+res.msg;
|
|
this.text = "*"+res.msg;
|
|
if(res.code == 530){
|
|
if(res.code == 530){
|
|
- this.text = "*用户不存在";
|
|
|
|
|
|
+ this.text = "*"+res.msg;
|
|
}else if(res.code == 503){
|
|
}else if(res.code == 503){
|
|
- this.text = "*验证码错误";
|
|
|
|
|
|
+ this.text = "*"+res.msg;
|
|
}
|
|
}
|
|
this.loading = false;
|
|
this.loading = false;
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if(res.data.reset_password){
|
|
|
|
- this.$confirm('账号当前登录密码为默认密码,是否现在修改?', "提示", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
- }).then(function() {
|
|
|
|
- let routeData = JSON.parse(localStorage.getItem("routeData"))
|
|
|
|
- for(let i=0;i<routeData.length;i++){
|
|
|
|
- if(!routeData[i].hidden&&routeData[i].name != 'Https://www.sxitdlc.com'){
|
|
|
|
- store.dispatch('settings/setPageName', routeData[i].meta.title)
|
|
|
|
- self.$store.commit("SET_SIDEBAR_ROUTERS", routeData[i].children);
|
|
|
|
- self.$router.push({ path: '/comprehensive/system/mine' });
|
|
|
|
- break
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }).then(() => {
|
|
|
|
- }).catch(() => {
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ // if(res.data.reset_password){
|
|
|
|
+ // this.$confirm('账号当前登录密码为默认密码,是否现在修改?', "提示", {
|
|
|
|
+ // confirmButtonText: "确定",
|
|
|
|
+ // cancelButtonText: "取消",
|
|
|
|
+ // type: "warning"
|
|
|
|
+ // }).then(function() {
|
|
|
|
+ // let routeData = JSON.parse(localStorage.getItem("routeData"))
|
|
|
|
+ // for(let i=0;i<routeData.length;i++){
|
|
|
|
+ // if(!routeData[i].hidden&&routeData[i].name != 'Https://www.sxitdlc.com'){
|
|
|
|
+ // store.dispatch('settings/setPageName', routeData[i].meta.title)
|
|
|
|
+ // self.$store.commit("SET_SIDEBAR_ROUTERS", routeData[i].children);
|
|
|
|
+ // self.$router.push({ path: '/comprehensive/system/mine' });
|
|
|
|
+ // break
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }).then(() => {
|
|
|
|
+ // }).catch(() => {
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
if(res.data.type){
|
|
if(res.data.type){
|
|
localStorage.setItem('userType',res.data.type)
|
|
localStorage.setItem('userType',res.data.type)
|
|
localStorage.setItem('userId',res.data.user_id)
|
|
localStorage.setItem('userId',res.data.user_id)
|