个人中心调整

This commit is contained in:
2023-07-07 00:46:14 +08:00
parent 4e38d2fe41
commit 9bf3234398
5 changed files with 57 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div style="display: flex;flex-direction: column;flex-wrap: nowrap" v-show="this.$cookie.get('username')!=null">
<div @click="toUserPage" style="display: flex;flex-direction: row;align-items: center;width: 11vw;justify-content: space-between">
<div style="display: flex;flex-direction: row;align-items: center">
<div style="display: flex;flex-direction: row;align-items: center;width: 11vw;justify-content: space-between">
<div @click="toUserPage" style="display: flex;flex-direction: row;align-items: center">
<el-avatar shape="square" style=" cursor: pointer;background-color: #59A3A4;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)" size="large">{{this.$cookie.get('username')}}</el-avatar>
<div style="margin-left: 5px;display: flex;flex-direction: column;justify-content: space-evenly">
<span style="cursor: pointer;font-weight: bold">{{this.$cookie.get('username')}}</span>
@@ -46,7 +46,6 @@ export default {
signOut(){
this.$cookie.delete('username');
// deletecookie
var that=this;
axios({
method: 'get',
// 请求的地址
@@ -62,9 +61,16 @@ export default {
type: 'success',
offset: 50
});
setTimeout(()=>{
if(this.$route.path!=='/home'){
setTimeout(()=>{
this.$router.push({
path:'/home'
})
},800)
}else {
window.location.reload();
},800)
}
}else{