- {{ customer ? customerName : userName }}
+ {{ customerName || userName }}
- 个人中心
+ 个人中心
修改密码
@@ -58,6 +58,7 @@ export default {
])
},
mounted() {
+ console.log(33, this.customer, this.userName)
this.getSystemDetail();
this.getUserDetail();
},
diff --git a/src/pages/account/login/index.vue b/src/pages/account/login/index.vue
index c9de844..bdf557c 100644
--- a/src/pages/account/login/index.vue
+++ b/src/pages/account/login/index.vue
@@ -131,13 +131,16 @@ export default {
if (res && res.status == 30001) {
this.phoneVisible = true;
}
- this.getVerImg();
- this.loginForm.code = "";
+ this.getVerImg()
+ this.loginForm.code = ''
util.local.set(Setting.tokenKey, res.data.token, Setting.tokenExpires);
this.SET_FROM(false)
this.getRole()
this.queryCustomer()
- }).catch(res => {})
+ }).catch(res => {
+ this.getVerImg()
+ this.loginForm.code = ''
+ })
} else {
return util.errorMsg("请检查表单数据");
}
@@ -153,7 +156,7 @@ export default {
this.$get(this.api.isClient).then(res => {
util.successMsg("登录成功");
this.setCustomer(res.customer);
- this.setCustomerName(res.customerName);
+ res.customerName && this.setCustomerName(res.customerName);
// let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : "/index";
this.$router.replace('/index');
}).catch(res => {});
diff --git a/src/pages/project/add/index.vue b/src/pages/project/add/index.vue
index a41741a..a808c55 100644
--- a/src/pages/project/add/index.vue
+++ b/src/pages/project/add/index.vue
@@ -102,21 +102,21 @@