|
@@ -974,17 +974,18 @@ export default {
|
|
|
* 微信登入—返回数据
|
|
* 微信登入—返回数据
|
|
|
*/
|
|
*/
|
|
|
wxLoginBack(res) {
|
|
wxLoginBack(res) {
|
|
|
- // if (res.data.full_info) {
|
|
|
|
|
- localStorage.setItem("user_account", res.data.user_account);
|
|
|
|
|
- localStorage.setItem("token", res.data.token);
|
|
|
|
|
- this.$tools.setUuid(new Date().valueOf() + "");
|
|
|
|
|
|
|
+ localStorage.setItem("user_account", res.data.user_account);
|
|
|
|
|
+ localStorage.setItem("token", res.data.token);
|
|
|
|
|
+ this.$tools.setUuid(new Date().valueOf() + "");
|
|
|
|
|
+ if (res.data.full_info) {
|
|
|
|
|
+
|
|
|
this.getInfo();
|
|
this.getInfo();
|
|
|
- // } else {
|
|
|
|
|
|
|
+ } else {
|
|
|
this.user_account = res.data.user_account;
|
|
this.user_account = res.data.user_account;
|
|
|
this.token = res.data.token;
|
|
this.token = res.data.token;
|
|
|
- // this.islogin = false;
|
|
|
|
|
- // this.state = 4;
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ this.islogin = false;
|
|
|
|
|
+ this.state = 4;
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 账号密码登录
|
|
* 账号密码登录
|
|
@@ -1001,18 +1002,19 @@ export default {
|
|
|
this.$request
|
|
this.$request
|
|
|
.login(loginForm)
|
|
.login(loginForm)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
- // if (res.data.full_info) {
|
|
|
|
|
- localStorage.setItem("user_account", res.data.user_account);
|
|
|
|
|
- localStorage.setItem("token", res.data.token);
|
|
|
|
|
- this.$tools.setUuid(new Date().valueOf() + "");
|
|
|
|
|
|
|
+ localStorage.setItem("user_account", res.data.user_account);
|
|
|
|
|
+ localStorage.setItem("token", res.data.token);
|
|
|
|
|
+ this.$tools.setUuid(new Date().valueOf() + "");
|
|
|
|
|
+ if (res.data.full_info) {
|
|
|
|
|
+
|
|
|
this.getInfo();
|
|
this.getInfo();
|
|
|
- // } else {
|
|
|
|
|
|
|
+ } else {
|
|
|
this.user_account = res.data.user_account;
|
|
this.user_account = res.data.user_account;
|
|
|
this.token = res.data.token;
|
|
this.token = res.data.token;
|
|
|
console.log(this.token);
|
|
console.log(this.token);
|
|
|
- // this.islogin = false;
|
|
|
|
|
- // this.state = 4;
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ this.islogin = false;
|
|
|
|
|
+ this.state = 4;
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
|
this.islogin = false;
|
|
this.islogin = false;
|
|
@@ -1110,17 +1112,18 @@ export default {
|
|
|
this.$request
|
|
this.$request
|
|
|
.loginSms(this.loginSmsForm)
|
|
.loginSms(this.loginSmsForm)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
- // if (res.data.full_info) {
|
|
|
|
|
- localStorage.setItem("user_account", res.data.user_account);
|
|
|
|
|
- localStorage.setItem("token", res.data.token);
|
|
|
|
|
- this.$tools.setUuid(new Date().valueOf() + "");
|
|
|
|
|
|
|
+ localStorage.setItem("user_account", res.data.user_account);
|
|
|
|
|
+ localStorage.setItem("token", res.data.token);
|
|
|
|
|
+ this.$tools.setUuid(new Date().valueOf() + "");
|
|
|
|
|
+ if (res.data.full_info) {
|
|
|
|
|
+
|
|
|
this.getInfo();
|
|
this.getInfo();
|
|
|
- // } else {
|
|
|
|
|
|
|
+ } else {
|
|
|
this.user_account = res.data.user_account;
|
|
this.user_account = res.data.user_account;
|
|
|
this.token = res.data.token;
|
|
this.token = res.data.token;
|
|
|
- // this.isloginSms = false;
|
|
|
|
|
- // this.state = 4;
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ this.isloginSms = false;
|
|
|
|
|
+ this.state = 4;
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
|
this.isloginSms = false;
|
|
this.isloginSms = false;
|
|
@@ -1233,11 +1236,12 @@ export default {
|
|
|
this.$request
|
|
this.$request
|
|
|
.login(loginForm)
|
|
.login(loginForm)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
|
|
+ localStorage.setItem("user_account", res.data.user_account);
|
|
|
|
|
+ localStorage.setItem("token", res.data.token);
|
|
|
|
|
+ this.$tools.setUuid(new Date().valueOf() + "");
|
|
|
if (res.data.full_info) {
|
|
if (res.data.full_info) {
|
|
|
//信息完善,获取用户信息
|
|
//信息完善,获取用户信息
|
|
|
- localStorage.setItem("user_account", res.data.user_account);
|
|
|
|
|
- localStorage.setItem("token", res.data.token);
|
|
|
|
|
- this.$tools.setUuid(new Date().valueOf() + "");
|
|
|
|
|
|
|
+
|
|
|
this.getInfo();
|
|
this.getInfo();
|
|
|
} else {
|
|
} else {
|
|
|
//不完善,跳转完善信息页面
|
|
//不完善,跳转完善信息页面
|
|
@@ -1279,7 +1283,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
nextBind() {
|
|
nextBind() {
|
|
|
- this.state = 1;
|
|
|
|
|
|
|
+ // this.state = 1;
|
|
|
|
|
+ this.getInfo();
|
|
|
this.user_account = "";
|
|
this.user_account = "";
|
|
|
this.token = "";
|
|
this.token = "";
|
|
|
},
|
|
},
|