diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index 00c61f1..bcc8594 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -23,11 +23,9 @@ -
- - - 登录 - +
+ + 登录
@@ -116,6 +114,10 @@ export default { avatar: userInfo.userAvatars, userName: userInfo.userName }) + // 如果没有用户名,说明是客户,那就从客户接口里去取 + userInfo.userName || this.$get(this.api.isClient).then(res => { + res.customerName && this.setInfo({userName: res.customerName}) + }).catch(res => {}) }).catch(err => { }) }, hideSetting() { @@ -131,10 +133,7 @@ export default { } }, toLogin() { - this.$refs.nav.jump({ - index: '/login', - title: '登录' - }) + window.open(this.$router.resolve('/login').href) }, // 跳转到管理员后台 toManager() { @@ -209,7 +208,6 @@ export default { display: flex; justify-content: space-between; align-items: center; - max-width: $max-width; min-width: $min-width; padding: 0 80px 0 10px; margin: 0 auto; diff --git a/src/layouts/home/index.vue b/src/layouts/home/index.vue index 9b496bf..4692c1c 100644 --- a/src/layouts/home/index.vue +++ b/src/layouts/home/index.vue @@ -1,18 +1,10 @@ -