add avatar
This commit is contained in:
1 parent
8d673aaa34
commit
0329b0f519
6 files changed
+12
-3
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<div v-else class="mt-3 pr-10 float-right">
|
||||
<el-dropdown trigger="click">
|
||||
<img :src="$store.getters.user?.avatar" class="avatar" />
|
||||
<img :src="avatar" class="avatar" />
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="onLogout">{{ $t('common.button.logout') }}</el-dropdown-item>
|
||||
@@ -43,6 +43,15 @@ export default defineComponent({
|
||||
computed: {
|
||||
active() {
|
||||
return this.$route.matched[0].path;
|
||||
},
|
||||
user() {
|
||||
return this.$store.getters.user;
|
||||
},
|
||||
avatar() {
|
||||
if (this.user && this.user.avatar) {
|
||||
return this.user.avatar;
|
||||
}
|
||||
return require('@/assets/images/avatar.png');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
Whitespace-only changes.
@@ -0,0 +1 @@
|
||||
export const ERROR_CODE_UNVERIFIED = 'unverifed';
|
||||
@@ -48,7 +48,6 @@ export default defineComponent({
|
||||
episodes: []
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
id() {
|
||||
return parseInt(this.$route.params.id.toString());
|
||||
|
||||
@@ -35,7 +35,7 @@ httpClient.interceptors.response.use(
|
||||
store.dispatch('resetAuth');
|
||||
router.push('/');
|
||||
}
|
||||
return error;
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user