mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
fix point load
This commit is contained in:
@@ -119,7 +119,6 @@ const historyColumn: DataTableColumns<ResponsePointHisrotyModel> = [
|
|||||||
target: '_blank',
|
target: '_blank',
|
||||||
text: true,
|
text: true,
|
||||||
type: 'info',
|
type: 'info',
|
||||||
secondary: true,
|
|
||||||
},
|
},
|
||||||
() => row.extra.user?.name,
|
() => row.extra.user?.name,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -117,16 +117,13 @@ onMounted(async () => {
|
|||||||
await useAuth.getAuthInfo()
|
await useAuth.getAuthInfo()
|
||||||
isLoading.value = false
|
isLoading.value = false
|
||||||
}
|
}
|
||||||
if (biliAuth.value.id >= 0) {
|
|
||||||
points.value = await getAllPoints()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NLayout>
|
<NLayout>
|
||||||
<NSpin v-if="!biliAuth.id && useAuth.isLoading" :show="useAuth.isLoading" />
|
<NSpin v-if="!biliAuth.id && useAuth.currentToken" :show="useAuth.isLoading" />
|
||||||
<NLayoutContent v-else-if="!useAuth.biliToken && useAuth.biliTokens.length > 0" style="height: 100vh">
|
<NLayoutContent v-else-if="!useAuth.currentToken && useAuth.biliTokens.length > 0" style="height: 100vh">
|
||||||
<NCard title="选择B站账号" embedded>
|
<NCard title="选择B站账号" embedded>
|
||||||
<NList clickable bordered>
|
<NList clickable bordered>
|
||||||
<NListItem v-for="item in useAuth.biliTokens" :key="item.token" @click="switchAuth(item.token)">
|
<NListItem v-for="item in useAuth.biliTokens" :key="item.token" @click="switchAuth(item.token)">
|
||||||
@@ -135,7 +132,7 @@ onMounted(async () => {
|
|||||||
</NList>
|
</NList>
|
||||||
</NCard>
|
</NCard>
|
||||||
</NLayoutContent>
|
</NLayoutContent>
|
||||||
<NLayoutContent v-else-if="!biliAuth.id" style="height: 100vh">
|
<NLayoutContent v-else-if="!useAuth.currentToken" style="height: 100vh">
|
||||||
<NResult status="error" title="你还未进行过B站账户验证" description="请先进行认证" style="padding-top: 64px">
|
<NResult status="error" title="你还未进行过B站账户验证" description="请先进行认证" style="padding-top: 64px">
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<NButton type="primary" @click="$router.push({ name: 'bili-auth' })">去认证</NButton>
|
<NButton type="primary" @click="$router.push({ name: 'bili-auth' })">去认证</NButton>
|
||||||
@@ -163,8 +160,10 @@ onMounted(async () => {
|
|||||||
</NCard>
|
</NCard>
|
||||||
<NDivider />
|
<NDivider />
|
||||||
<NTabs v-if="hash" v-model:value="hash" default-value="points" animated>
|
<NTabs v-if="hash" v-model:value="hash" default-value="points" animated>
|
||||||
<NTabPane name="points" tab="我的积分" display-directive="show:lazy">
|
<NTabPane name="points" tab="我的积分" display-directive="show:lazy" @vue:mounted="getAllPoints()">
|
||||||
<NDivider style="margin-top: 10px" />
|
<NDivider style="margin-top: 10px" />
|
||||||
|
<NButton style="margin-bottom: 10px" @click="getAllPoints()" size="small" type="primary">刷新</NButton>
|
||||||
|
<NDivider />
|
||||||
<NFlex justify="center">
|
<NFlex justify="center">
|
||||||
<NDataTable
|
<NDataTable
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
|
|||||||
Reference in New Issue
Block a user