|
|
@ -13,7 +13,7 @@
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-descriptions title="用户信息">
|
|
|
|
<el-descriptions title="用户信息">
|
|
|
|
<el-descriptions-item label="用户名">{{username}}</el-descriptions-item>
|
|
|
|
<el-descriptions-item label="用户名">{{username}} <el-button type="primary" @click="logout" size="mini" round>退出登录</el-button></el-descriptions-item>
|
|
|
|
</el-descriptions>
|
|
|
|
</el-descriptions>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
@ -81,6 +81,10 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
logout() {
|
|
|
|
|
|
|
|
indow.sessionStorage.removeItem('token');
|
|
|
|
|
|
|
|
window.location.href = '/login.html';
|
|
|
|
|
|
|
|
},
|
|
|
|
getUserInfo() {
|
|
|
|
getUserInfo() {
|
|
|
|
axios.post('/account/user-info', {token: window.sessionStorage.getItem('token')})
|
|
|
|
axios.post('/account/user-info', {token: window.sessionStorage.getItem('token')})
|
|
|
|
.then( (response) => {
|
|
|
|
.then( (response) => {
|
|
|
|