搜索功能完善
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: nowrap" v-show="this.$cookie.get('username')!=null">
|
||||
<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;width: 11vw;justify-content: space-between">
|
||||
<div style="display: flex;flex-direction: row;align-items: center">
|
||||
<el-avatar shape="square" style=" 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>
|
||||
<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="font-weight: bold">{{this.$cookie.get('username')}}</span>
|
||||
<span style="font-weight: 800;font-size: 13px;color: #3b82f6">Lv.1</span>
|
||||
<span style="cursor: pointer;font-weight: bold">{{this.$cookie.get('username')}}</span>
|
||||
<span style="cursor: pointer;font-weight: 800;font-size: 13px;color: #3b82f6">Lv.1</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,6 +44,7 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
signOut(){
|
||||
this.$cookie.delete('username');
|
||||
// deletecookie
|
||||
var that=this;
|
||||
axios({
|
||||
@@ -54,7 +55,6 @@ export default {
|
||||
params: {
|
||||
}
|
||||
});
|
||||
this.$cookie.delete('username');
|
||||
if(this.$cookie.get('username')===null){
|
||||
Vue.prototype.$notify({
|
||||
title: '成功',
|
||||
@@ -63,10 +63,17 @@ export default {
|
||||
offset: 50
|
||||
});
|
||||
setTimeout(()=>{
|
||||
this.$router.push({
|
||||
path:'/home',
|
||||
})
|
||||
},1000)
|
||||
window.location.reload();
|
||||
},800)
|
||||
|
||||
|
||||
}else{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: ('i', {style: 'color: teal'}, "退出失败!"),
|
||||
type: 'success',
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user