|
|
@@ -15,13 +15,15 @@
|
|
|
<div class="slip" :class="{ active: item === active }"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="btn-list" v-if="!isLogin">
|
|
|
+ <div class="btn-list" v-if="isLogin">
|
|
|
<el-dropdown @command="onCommand" style="margin-left: 20px" trigger="click">
|
|
|
<span class="el-dropdown-link">
|
|
|
<img class="img" :src="avatarBox" />
|
|
|
</span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item command="nickname" style="word-break: keep-all">1111 </el-dropdown-item>
|
|
|
+ <el-dropdown-item command="nickname" style="word-break: keep-all"
|
|
|
+ >{{ userInfo.username }}
|
|
|
+ </el-dropdown-item>
|
|
|
<div class="border1"></div>
|
|
|
<el-dropdown-item command="supply" style="word-break: keep-all">去认证 </el-dropdown-item>
|
|
|
<el-dropdown-item command="edit" style="word-break: keep-all">编辑资料 </el-dropdown-item>
|
|
|
@@ -52,8 +54,8 @@ export default {
|
|
|
computed: {
|
|
|
...mapState(['userInfo']),
|
|
|
avatarBox() {
|
|
|
- return this.userInfo
|
|
|
- ? this.userInfo
|
|
|
+ return this.userInfo.avatar
|
|
|
+ ? this.userInfo.avatar
|
|
|
: 'https://zhirongip.oss-cn-hangzhou.aliyuncs.com/image/2021-06-30-17-02-42uzAOUPcw.jpeg';
|
|
|
}
|
|
|
},
|
|
|
@@ -81,7 +83,6 @@ export default {
|
|
|
this.$router.push('/accountdata');
|
|
|
} else if (command === 'logout') {
|
|
|
localStorage.removeItem('webToken');
|
|
|
- this.updateUserInfo(null);
|
|
|
this.$router.push('/');
|
|
|
}
|
|
|
}
|
|
|
@@ -89,10 +90,28 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
+/deep/ .el-dropdown-menu__item {
|
|
|
+ font-weight: bold;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.border1 {
|
|
|
+ margin: 6px 16px;
|
|
|
+ height: 1px;
|
|
|
+ background: #f2f3f5;
|
|
|
+}
|
|
|
.container {
|
|
|
height: 90px;
|
|
|
background: #0f1111;
|
|
|
width: 100%;
|
|
|
+ // /deep/ .el-tabs__nav-scroll {
|
|
|
+ // padding-left: 13px;
|
|
|
+ // }
|
|
|
+ // /deep/ .el-tabs__item {
|
|
|
+ // font-weight: bold;
|
|
|
+ // font-size: 14px;
|
|
|
+ // width: 300px;
|
|
|
+ // }
|
|
|
+
|
|
|
.header {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
@@ -141,6 +160,7 @@ export default {
|
|
|
display: block;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.login {
|
|
|
width: 83px;
|
|
|
height: 30px;
|