mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
fix: fix some console errors when user is logout
This commit is contained in:
@@ -53,6 +53,7 @@ function getAnimeWatchList() {
|
||||
if (code === 0)
|
||||
Object.assign(animeWatchList, list as AnimeItem[])
|
||||
})
|
||||
.catch(() => Object.assign(animeWatchList, []))
|
||||
.finally(() => {
|
||||
isLoading.value = false
|
||||
})
|
||||
@@ -77,7 +78,7 @@ function getRecommendAnimeList() {
|
||||
|
||||
coursor.value = coursor
|
||||
}
|
||||
})
|
||||
}).catch(() => coursor.value = 29)
|
||||
.finally(() => {
|
||||
isLoading.value = false
|
||||
})
|
||||
@@ -107,7 +108,7 @@ function getPopularAnimeList() {
|
||||
</section> -->
|
||||
|
||||
<!-- Your Watchlist -->
|
||||
<section mb-8>
|
||||
<section v-if="getUserID()" mb-8>
|
||||
<div flex justify-between items-end mb-6>
|
||||
<h3 text="3xl $bew-text-1" font="bold">
|
||||
{{ $t('anime.your_watch_list') }}
|
||||
|
||||
@@ -234,10 +234,14 @@ function handleTurnOnWatchHistory() {
|
||||
if (result)
|
||||
setHistoryPauseStatus(false)
|
||||
}
|
||||
|
||||
function jumpToLoginPage() {
|
||||
location.href = 'https://passport.bilibili.com/login'
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div flex="~ col md:row lg:row" gap-4>
|
||||
<div v-if="getCSRF()" flex="~ col md:row lg:row" gap-4>
|
||||
<main w="full md:60% lg:70% xl:75%" order="2 md:1 lg:1" mb-6>
|
||||
<h3 text="3xl $bew-text-1" font-bold mb-6>
|
||||
{{ $t('history.title') }}
|
||||
@@ -516,6 +520,11 @@ function handleTurnOnWatchHistory() {
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
<Empty v-else mt-6 description="Please login first">
|
||||
<Button type="primary" @click="jumpToLoginPage()">
|
||||
Login
|
||||
</Button>
|
||||
</Empty>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user