From a5cd191693edaefd57f355ef6aaf69e75dcb535b Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Fri, 29 Oct 2021 18:45:42 +0800
Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/index.js | 2 +-
src/pages/account/login/index.vue | 6 ++--
src/pages/assessment/add/index.vue | 44 +++++++++++++++++++++++++-----
src/pages/system/list/staff.vue | 1 +
src/setting.js | 4 +--
5 files changed, 44 insertions(+), 13 deletions(-)
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
- >
+ >
+