-
-
-
404
-
网络错误
-
没有权限
+
+
404
+
+ 网络错误
-
+
+ 没有权限
+
+
@@ -21,10 +23,16 @@
font-size: 50px;
}
-
+
diff --git a/src/views/UserPage.vue b/src/views/UserPage.vue
index 8d8f69b..c1b94a7 100644
--- a/src/views/UserPage.vue
+++ b/src/views/UserPage.vue
@@ -59,7 +59,7 @@ const userStore = useUserStore();
const initialized = ref(false);
const userInfo = ref
();
const isSelf = computed(() =>
- userStore.userInfo === null ? false : userStore.userInfo.id === userInfo.value?.id
+ userStore.userInfo === null ? false : userStore.userInfo.id === userInfo.value?.id,
);
const route = useRoute();
const id = route.params.id as string | undefined;
@@ -72,7 +72,7 @@ watch(
() => userStore.userInfo,
(info) => {
userInfo.value = info ?? undefined;
- }
+ },
);
onBeforeMount(async () => {
if (id == undefined) {
@@ -81,14 +81,18 @@ onBeforeMount(async () => {
} else {
try {
const userInfoResponse = userInfoResponseSchema.parse(
- (await axiosInstance.get(`/api/user/info/${id}`)).data
+ (await axiosInstance.get(`/api/user/info/${id}`)).data,
);
if (userInfoResponse.type === 'error') {
return;
}
userInfo.value = userInfoResponse.data;
- if (!userInfo.value.avatar) { /* empty */ }
- } catch (e) { /* empty */ } finally {
+ if (!userInfo.value.avatar) {
+ /* empty */
+ }
+ } catch (e) {
+ /* empty */
+ } finally {
initialized.value = true;
}
}