导航栏增加个人信息

pull/30/head
taoshihan1991 4 years ago
parent 0cd10f2211
commit a77fa674a0

@ -71,6 +71,8 @@
data: {
iframeUrl:"",
mailTotal:0,
adminAvator:"",
adminRole:"",
},
methods: {
openIframeUrl(url){
@ -97,6 +99,8 @@
if (data.code != 200) {
window.location.href="/login";
} else {
_this.adminAvator=data.result.avator;
_this.adminRole=data.result.role_name;
_this.iframeUrl = "/chat_main";
}
}

@ -7,6 +7,14 @@
</el-menu-item>
<el-menu-item index="3" v-on:click="openIframeUrl('/chat_main')">聊天</el-menu-item>
<el-menu-item index="4" v-on:click="openIframeUrl('/setting')">设置</el-menu-item>
<el-menu-item index="10" v-on:click="openIframeUrl('/login')">退出</el-menu-item>
<el-submenu style="float: right" index="10">
<template slot="title">
<el-avatar :size="30" :src="adminAvator"></el-avatar>
<span v-html="adminRole"></span>
</template>
<el-menu-item v-on:click="openIframeUrl('/login')">
退出
</el-menu-item>
</el-submenu>
</el-menu>
{{end}}
Loading…
Cancel
Save