Skip to content

Commit

Permalink
Fix: bili user info type
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyCreeper committed Dec 9, 2023
1 parent 75fe372 commit f1b3a56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/services/apis/vendor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ export const getBiliBiliAccountInfo = useDefineApi<
},
{
isLogin: boolean;
username: string;
face: string;
isVip: boolean;
info: {
username: string;
face: string;
isVip: boolean;
};
}
>({
url: "/api/vendor/bilibili/me",
Expand Down
6 changes: 3 additions & 3 deletions src/views/user/platforms/bilibili.vue
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,10 @@ onMounted(async () => {
class="rounded-lg dark:bg-zinc-800 w-1/5 max-sm:w-full"
>
<div class="text-center">
<img :src="accountInfo?.face" class="rounded-full mx-auto w-1/2 mb-2" />
<p class="text-lg mb-1">{{ accountInfo?.username }}</p>
<img :src="accountInfo?.info.face" class="rounded-full mx-auto w-1/2 mb-2" />
<p class="text-lg mb-1">{{ accountInfo?.info.username }}</p>
<p
v-if="accountInfo?.isVip"
v-if="accountInfo?.info.isVip"
class="bg-pink-500 rounded-lg text-white text-sm mx-auto w-fit px-2 shadow-sm shadow-pink-400 mb-2"
>
大会员
Expand Down

0 comments on commit f1b3a56

Please sign in to comment.