|
@@ -6,9 +6,7 @@
|
|
class="hamburger-container"
|
|
class="hamburger-container"
|
|
@toggleClick="toggleSideBar"
|
|
@toggleClick="toggleSideBar"
|
|
/>
|
|
/>
|
|
-
|
|
|
|
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
|
|
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
|
|
-
|
|
|
|
<div class="right-menu">
|
|
<div class="right-menu">
|
|
<template v-if="device !== 'mobile'">
|
|
<template v-if="device !== 'mobile'">
|
|
<!-- <search id="header-search" class="right-menu-item" /> -->
|
|
<!-- <search id="header-search" class="right-menu-item" /> -->
|
|
@@ -17,42 +15,13 @@
|
|
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
|
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
|
</template>
|
|
</template>
|
|
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
|
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
|
- <div class="avatar-wrapper">
|
|
|
|
- <img src="https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif" class="user-avatar">
|
|
|
|
- <span>{{ loginAccount || mobile || name }}</span>
|
|
|
|
- <template v-if="userIdentity === 2">
|
|
|
|
- <i v-if="vipInfo.vipStatus !== 3" class="vip-icon " :class="{ close: vipInfo.vipStatus === 0 }" />
|
|
|
|
- <el-button
|
|
|
|
- v-if="vipInfo.vipStatus === 3"
|
|
|
|
- type="primary"
|
|
|
|
- size="mini"
|
|
|
|
- class="vip-button"
|
|
|
|
- @click.stop="toOpenVipPage('open')"
|
|
|
|
- >开通会员</el-button>
|
|
|
|
- <el-button
|
|
|
|
- v-else
|
|
|
|
- type="primary"
|
|
|
|
- size="mini"
|
|
|
|
- class="vip-button xufei"
|
|
|
|
- @click.stop="toOpenVipPage('xufei')"
|
|
|
|
- >续费</el-button>
|
|
|
|
- </template>
|
|
|
|
- <i class="el-icon-caret-bottom" />
|
|
|
|
- </div>
|
|
|
|
- <el-dropdown-menu slot="dropdown" :class="{ user: userIdentity === 2 }">
|
|
|
|
- <template v-if="userIdentity === 2">
|
|
|
|
|
|
+ <!-- 登录用户头像名称 -->
|
|
|
|
+ <avatar-wrapper />
|
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
|
+ <template v-if="isSupplier">
|
|
<el-dropdown-item class="user-info">
|
|
<el-dropdown-item class="user-info">
|
|
- <img src="https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif" class="user-avatar">
|
|
|
|
- <div class="right-content">
|
|
|
|
- <div class="name">
|
|
|
|
- <span>{{ loginAccount || mobile || name }}</span>
|
|
|
|
- <i class="vip-icon " :class="{ close: vipInfo.vipStatus === 0 || vipInfo.vipStatus === 3 }" />
|
|
|
|
- </div>
|
|
|
|
- <div class="info">
|
|
|
|
- <span v-if="vipInfo.endTime" class="time">到期时间:{{ vipInfo.endTime | formatTime }}</span>
|
|
|
|
- <span class="record">购买记录</span>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <!-- 供应商用户信息卡片 -->
|
|
|
|
+ <user-card />
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
<router-link to="/personal/info">
|
|
<router-link to="/personal/info">
|
|
<el-dropdown-item>个人资料</el-dropdown-item>
|
|
<el-dropdown-item>个人资料</el-dropdown-item>
|
|
@@ -63,11 +32,9 @@
|
|
<router-link to="/password/edit">
|
|
<router-link to="/password/edit">
|
|
<el-dropdown-item>修改密码</el-dropdown-item>
|
|
<el-dropdown-item>修改密码</el-dropdown-item>
|
|
</router-link>
|
|
</router-link>
|
|
- <el-dropdown-item v-if="proxyState" divided @click.native="proxyLogout">
|
|
|
|
- 退出代理
|
|
|
|
- </el-dropdown-item>
|
|
|
|
|
|
+ <el-dropdown-item v-if="proxyState" divided @click.native="proxyLogout"> 退出代理 </el-dropdown-item>
|
|
<el-dropdown-item v-else divided @click.native="logout">
|
|
<el-dropdown-item v-else divided @click.native="logout">
|
|
- <span style="display:block;">退出登录</span>
|
|
|
|
|
|
+ <span style="display: block">退出登录</span>
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
@@ -75,7 +42,7 @@
|
|
<el-dropdown-item>修改密码</el-dropdown-item>
|
|
<el-dropdown-item>修改密码</el-dropdown-item>
|
|
</router-link>
|
|
</router-link>
|
|
<el-dropdown-item divided @click.native="logout">
|
|
<el-dropdown-item divided @click.native="logout">
|
|
- <span style="display:block;">退出登录</span>
|
|
|
|
|
|
+ <span style="display: block">退出登录</span>
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
</template>
|
|
</template>
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
@@ -87,52 +54,37 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
-import { formatDate } from '@/utils'
|
|
|
|
|
|
+
|
|
import Breadcrumb from '@/components/Breadcrumb'
|
|
import Breadcrumb from '@/components/Breadcrumb'
|
|
import Hamburger from '@/components/Hamburger'
|
|
import Hamburger from '@/components/Hamburger'
|
|
// import ErrorLog from '@/components/ErrorLog'
|
|
// import ErrorLog from '@/components/ErrorLog'
|
|
import Screenfull from '@/components/Screenfull'
|
|
import Screenfull from '@/components/Screenfull'
|
|
// import Search from '@/components/HeaderSearch'
|
|
// import Search from '@/components/HeaderSearch'
|
|
// import NoticeTodo from './NoticeTodo'
|
|
// import NoticeTodo from './NoticeTodo'
|
|
|
|
+import AvatarWrapper from './AvatarWrapper'
|
|
|
|
+import UserCard from './UserCard'
|
|
import VipTipDialog from './VipTipDialog'
|
|
import VipTipDialog from './VipTipDialog'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- filters: {
|
|
|
|
- formatTime(time) {
|
|
|
|
- if (!time) {
|
|
|
|
- return ''
|
|
|
|
- }
|
|
|
|
- return formatDate(time, 'yyyy-MM-DD HH:mm:ss')
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
components: {
|
|
components: {
|
|
Breadcrumb,
|
|
Breadcrumb,
|
|
Hamburger,
|
|
Hamburger,
|
|
// ErrorLog,
|
|
// ErrorLog,
|
|
Screenfull,
|
|
Screenfull,
|
|
|
|
+ AvatarWrapper,
|
|
|
|
+ UserCard,
|
|
VipTipDialog
|
|
VipTipDialog
|
|
// NoticeTodo
|
|
// NoticeTodo
|
|
// Search
|
|
// Search
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapGetters([
|
|
|
|
- 'sidebar',
|
|
|
|
- 'device',
|
|
|
|
- 'name',
|
|
|
|
- 'userIdentity',
|
|
|
|
- 'openSoket',
|
|
|
|
- 'proxyState',
|
|
|
|
- 'mobile',
|
|
|
|
- 'loginAccount',
|
|
|
|
- 'vipInfo'
|
|
|
|
- ]),
|
|
|
|
- userName() {
|
|
|
|
- return this.name
|
|
|
|
|
|
+ ...mapGetters(['sidebar', 'device', 'userIdentity', 'openSoket', 'proxyState']),
|
|
|
|
+ // isSupplier
|
|
|
|
+ isSupplier() {
|
|
|
|
+ return this.userIdentity === 2
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- created() {
|
|
|
|
- console.log(this.vipInfo)
|
|
|
|
- },
|
|
|
|
methods: {
|
|
methods: {
|
|
toggleSideBar() {
|
|
toggleSideBar() {
|
|
this.$store.dispatch('app/toggleSideBar')
|
|
this.$store.dispatch('app/toggleSideBar')
|
|
@@ -155,92 +107,30 @@ export default {
|
|
this.$store.commit('proxy/CLOSE_PROXY')
|
|
this.$store.commit('proxy/CLOSE_PROXY')
|
|
this.$router.replace('/proxy')
|
|
this.$router.replace('/proxy')
|
|
}, 500)
|
|
}, 500)
|
|
- },
|
|
|
|
- // 去开通/续费会员
|
|
|
|
- toOpenVipPage(type) {
|
|
|
|
- if (type === 'open') {
|
|
|
|
- this.$router.push('/vip/vip-open')
|
|
|
|
- } else {
|
|
|
|
- this.$router.push('/vip/vip-open')
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
|
-.el-dropdown-menu.user >>> .popper__arrow::after {
|
|
|
|
- border-bottom-color: #2c3e50;
|
|
|
|
-}
|
|
|
|
-</style>
|
|
|
|
-
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
-.el-dropdown-menu {
|
|
|
|
- &.user {
|
|
|
|
- padding-top: 0;
|
|
|
|
- width: 280px;
|
|
|
|
- border-radius: 8px;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-.vip-button {
|
|
|
|
- height: 24px;
|
|
|
|
- line-height: 24px;
|
|
|
|
- padding: 0 10px;
|
|
|
|
- margin-left: 4px;
|
|
|
|
-
|
|
|
|
- &.xufei {
|
|
|
|
- background: #ff6d6d;
|
|
|
|
- border-color: #ff6d6d;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-.user-info {
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- align-items: center;
|
|
|
|
- background: #2c3e50;
|
|
|
|
- color: #f1f1f1;
|
|
|
|
- padding-top: 12px;
|
|
|
|
- padding-bottom: 12px;
|
|
|
|
- margin-bottom: 6px;
|
|
|
|
- border-radius: 8px 8px 0 0;
|
|
|
|
- .user-avatar {
|
|
|
|
- width: 48px;
|
|
|
|
- height: 48px;
|
|
|
|
- border-radius: 10px;
|
|
|
|
- }
|
|
|
|
- .right-content {
|
|
|
|
- width: 180px;
|
|
|
|
- .name {
|
|
|
|
- font-size: 20px;
|
|
|
|
- }
|
|
|
|
- .info {
|
|
|
|
- font-size: 12px;
|
|
|
|
- .record {
|
|
|
|
- margin-left: 6px;
|
|
|
|
- text-decoration: underline;
|
|
|
|
- }
|
|
|
|
|
|
+::v-deep {
|
|
|
|
+ .user-info {
|
|
|
|
+ background: #2c3e50;
|
|
|
|
+ border-radius: 4px 4px 0 0;
|
|
|
|
+ &:hover {
|
|
|
|
+ background: #2c3e50;
|
|
|
|
+ color: #f1f1f1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- &:hover {
|
|
|
|
- background: #2c3e50;
|
|
|
|
- color: #f1f1f1;
|
|
|
|
|
|
+ .popper__arrow {
|
|
|
|
+ &::after {
|
|
|
|
+ border-bottom-color: #2c3e50 !important;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-.vip-icon {
|
|
|
|
- display: inline-block;
|
|
|
|
- width: 40px;
|
|
|
|
- height: 32px;
|
|
|
|
- margin: 0 4px;
|
|
|
|
- background: url(~@/assets/img/vip-icon-active.png) no-repeat;
|
|
|
|
- background-size: 40px;
|
|
|
|
- vertical-align: -5px;
|
|
|
|
-
|
|
|
|
- &.close {
|
|
|
|
- background: url(~@/assets/img/vip-icon.png) no-repeat;
|
|
|
|
- }
|
|
|
|
|
|
+.el-dropdown-menu {
|
|
|
|
+ padding-top: 0;
|
|
}
|
|
}
|
|
|
|
|
|
.navbar {
|
|
.navbar {
|
|
@@ -293,37 +183,14 @@ export default {
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
transition: background 0.3s;
|
|
transition: background 0.3s;
|
|
|
|
|
|
- // &:hover {
|
|
|
|
- // background: rgba(0, 0, 0, 0.025);
|
|
|
|
- // }
|
|
|
|
|
|
+ &:hover {
|
|
|
|
+ background: rgba(0, 0, 0, 0.025);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
.avatar-container {
|
|
.avatar-container {
|
|
margin-right: 30px;
|
|
margin-right: 30px;
|
|
-
|
|
|
|
- .avatar-wrapper {
|
|
|
|
- // margin-top: 5px;
|
|
|
|
- position: relative;
|
|
|
|
-
|
|
|
|
- .user-avatar {
|
|
|
|
- cursor: pointer;
|
|
|
|
- width: 40px;
|
|
|
|
- height: 40px;
|
|
|
|
- border-radius: 10px;
|
|
|
|
- vertical-align: middle;
|
|
|
|
- }
|
|
|
|
- span {
|
|
|
|
- margin-left: 10px;
|
|
|
|
- }
|
|
|
|
- .el-icon-caret-bottom {
|
|
|
|
- cursor: pointer;
|
|
|
|
- position: absolute;
|
|
|
|
- right: -20px;
|
|
|
|
- top: 25px;
|
|
|
|
- font-size: 12px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|