diff --git a/src/api/index.js b/src/api/index.js
index e42abeb..b68a15b 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -8,7 +8,7 @@ export default {
logins: `${host}users/users/user/login`, //登录
verification: `${host}users/users/user/captcha`,// 验证码图片
- isClient: `${host}users/users/user/isClient`,// 验证码图片
+ isClient: `${host}users/users/user/isClient`,// 是否为客户
// 权限管理
getUserRolesPermissionMenu: `${host}users/user-role/getUserRolesPermissionMenu`,
diff --git a/src/pages/account/login/index.vue b/src/pages/account/login/index.vue
index 0625407..481069b 100644
--- a/src/pages/account/login/index.vue
+++ b/src/pages/account/login/index.vue
@@ -123,9 +123,6 @@ export default {
this.loginForm.distinguish = Number(this.activeName);
this.$post(this.api.logins, this.loginForm).then(res => {
util.local.set(Setting.tokenKey, res.data.token, Setting.tokenExpires);
- let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : "/index";
- this.$router.replace(redirect);
- util.successMsg("登录成功");
this.queryCustomer();
}).catch(res => {
if (res && res.status == 30001) {
@@ -141,8 +138,11 @@ export default {
},
queryCustomer() { // 查询是否是客户
this.$get(this.api.isClient).then(res => {
+ util.successMsg("登录成功");
this.setCustomer(res.customer);
this.setCustomerName(res.customerName);
+ let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : "/index";
+ this.$router.replace(redirect);
}).catch(res => {});
},
phoneCountdown() {
diff --git a/src/pages/assessment/add/index.vue b/src/pages/assessment/add/index.vue
index c2f478b..f7f37d1 100644
--- a/src/pages/assessment/add/index.vue
+++ b/src/pages/assessment/add/index.vue
@@ -140,7 +140,9 @@
v-model.trim="filterClassName"
class="inline-input m-b-20"
clearable
- >
+ >
+