diff --git a/Yi.Bbs.Vue3/src/assets/common/icons/login.svg b/Yi.Bbs.Vue3/src/assets/common/icons/login.svg
new file mode 100644
index 00000000..7801fe4b
--- /dev/null
+++ b/Yi.Bbs.Vue3/src/assets/common/icons/login.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Yi.Bbs.Vue3/src/components/AvatarInfo.vue b/Yi.Bbs.Vue3/src/components/AvatarInfo.vue
index b2fc999f..8c7f0a74 100644
--- a/Yi.Bbs.Vue3/src/components/AvatarInfo.vue
+++ b/Yi.Bbs.Vue3/src/components/AvatarInfo.vue
@@ -96,7 +96,7 @@ const Init = () => {
userInfo.nick = userStore.name;
userInfo.role = userStore.role;
userInfo.id = userStore.id;
- iconUrl.value = iconUrlHandler(userInfo.icon);
+ iconUrl.value = userInfo.icon;
}
};
@@ -134,7 +134,8 @@ const Init = () => {
}
.el-avatar {
- margin-right: 1.2rem;
+ margin-right: 1rem;
+ --el-avatar-bg-color: none;
}
.remarks {
diff --git a/Yi.Bbs.Vue3/src/layout/AppHeader.vue b/Yi.Bbs.Vue3/src/layout/AppHeader.vue
index c4029c3e..457e3e88 100644
--- a/Yi.Bbs.Vue3/src/layout/AppHeader.vue
+++ b/Yi.Bbs.Vue3/src/layout/AppHeader.vue
@@ -51,13 +51,16 @@
-
+
进入个人中心
其他
登出
+
+ 去登录
+
@@ -69,6 +72,9 @@ import { ref } from "vue";
import { useRouter } from "vue-router";
import useUserStore from "@/stores/user.js";
import useConfigStore from "@/stores/config";
+import useAuths from "@/hooks/useAuths";
+
+const { getToken } = useAuths();
const configStore = useConfigStore();
const router = useRouter();
const userStore = useUserStore();
@@ -99,12 +105,16 @@ const enterIndex = () => {
const enterProfile = () => {
router.push("/profile");
};
-
+const toLogin = () => {
+ router.push("/login");
+};
const search = () => {
var routerPer = { path: `/discuss`, query: { q: searchText.value } };
searchText.value = "";
router.push(routerPer);
};
+
+const isLogin = getToken("AccessToken") ? true : false;