更新缓存版本至v13

This commit is contained in:
jxxghp
2025-09-16 13:14:17 +08:00
parent ebcf5fad71
commit 188f8b3faa
6 changed files with 73 additions and 101 deletions
+3 -3
View File
@@ -2744,9 +2744,9 @@ export default {
firstAirDateAsc: 'First Air Date Ascending', firstAirDateAsc: 'First Air Date Ascending',
voteAverageDesc: 'Vote Average Descending', voteAverageDesc: 'Vote Average Descending',
voteAverageAsc: 'Vote Average Ascending', voteAverageAsc: 'Vote Average Ascending',
time: 'Sort by Time', time: 'Latest',
count: 'Sort by Popularity', count: 'Popular',
rating: 'Sort by Rating', rating: 'Rating',
}, },
genreType: { genreType: {
action: 'Action', action: 'Action',
+3 -3
View File
@@ -2712,9 +2712,9 @@ export default {
firstAirDateAsc: '首播日期升序', firstAirDateAsc: '首播日期升序',
voteAverageDesc: '评分降序', voteAverageDesc: '评分降序',
voteAverageAsc: '评分升序', voteAverageAsc: '评分升序',
time: '按时间排序', time: '最新',
count: '按热度排序', count: '热门',
rating: '评分排序', rating: '评分',
}, },
genreType: { genreType: {
action: '动作', action: '动作',
+3 -3
View File
@@ -2698,9 +2698,9 @@ export default {
firstAirDateAsc: '首播日期升序', firstAirDateAsc: '首播日期升序',
voteAverageDesc: '評分降序', voteAverageDesc: '評分降序',
voteAverageAsc: '評分升序', voteAverageAsc: '評分升序',
time: '按時間排序', time: '最新',
count: '按熱度排序', count: '熱門',
rating: '評分排序', rating: '評分',
}, },
genreType: { genreType: {
action: '動作', action: '動作',
+1 -1
View File
@@ -6,7 +6,7 @@ declare let self: ServiceWorkerGlobalScope & {
} }
// 缓存版本控制 // 缓存版本控制
const CACHE_VERSION = 'v12' const CACHE_VERSION = 'v13'
const CACHE_NAMES = { const CACHE_NAMES = {
appShell: `app-shell-${CACHE_VERSION}`, appShell: `app-shell-${CACHE_VERSION}`,
static: `static-resources-${CACHE_VERSION}`, static: `static-resources-${CACHE_VERSION}`,
+18 -38
View File
@@ -95,13 +95,17 @@ const currentGenreDict = computed(() => {
}) })
// 监听筛选参数变化 // 监听筛选参数变化
watch(filterParams, () => { watch(
filterParams,
() => {
// 重置数据 // 重置数据
dataList.value = [] dataList.value = []
page.value = 1 page.value = 1
isRefreshed.value = false isRefreshed.value = false
currentKey.value++ currentKey.value++
}, { deep: true }) },
{ deep: true },
)
// 拼装参数 // 拼装参数
function getParams() { function getParams() {
@@ -204,28 +208,13 @@ async function fetchData({ done }: { done: any }) {
<VLabel>{{ t('tmdb.sort') }}</VLabel> <VLabel>{{ t('tmdb.sort') }}</VLabel>
</div> </div>
<VChipGroup v-model="filterParams.sort_type"> <VChipGroup v-model="filterParams.sort_type">
<VChip <VChip :color="filterParams.sort_type == 'time' ? 'primary' : ''" filter tile value="time">
:color="filterParams.sort_type == 'time' ? 'primary' : ''"
filter
tile
value="time"
>
{{ t('tmdb.sortType.time') }} {{ t('tmdb.sortType.time') }}
</VChip> </VChip>
<VChip <VChip :color="filterParams.sort_type == 'count' ? 'primary' : ''" filter tile value="count">
:color="filterParams.sort_type == 'count' ? 'primary' : ''"
filter
tile
value="count"
>
{{ t('tmdb.sortType.count') }} {{ t('tmdb.sortType.count') }}
</VChip> </VChip>
<VChip <VChip :color="filterParams.sort_type == 'rating' ? 'primary' : ''" filter tile value="rating">
:color="filterParams.sort_type == 'rating' ? 'primary' : ''"
filter
tile
value="rating"
>
{{ t('tmdb.sortType.rating') }} {{ t('tmdb.sortType.rating') }}
</VChip> </VChip>
</VChipGroup> </VChipGroup>
@@ -251,9 +240,8 @@ async function fetchData({ done }: { done: any }) {
<div class="flex justify-start align-center mb-3"> <div class="flex justify-start align-center mb-3">
<div class="mr-5"> <div class="mr-5">
<VLabel>{{ t('tmdb.rating') }} & {{ t('subscribe.minSubscribers') }}</VLabel> <VLabel>{{ t('tmdb.rating') }}</VLabel>
</div> </div>
<div class="flex align-center">
<VSlider <VSlider
v-model="filterParams.min_rating" v-model="filterParams.min_rating"
thumb-label thumb-label
@@ -262,28 +250,20 @@ async function fetchData({ done }: { done: any }) {
:step="1" :step="1"
class="align-center" class="align-center"
hide-details hide-details
style="width: 200px;"
> >
<template v-slot:append>
<span class="ml-2 text-body-2">- 10</span>
</template>
</VSlider> </VSlider>
<VTextField
v-model="filterParams.min_sub"
variant="outlined"
density="compact"
type="number"
hide-details
single-line
min="1"
style="width: 120px; margin-left: 20px;"
/>
</div>
</div> </div>
</div> </div>
<LoadingBanner v-if="!isRefreshed" class="mt-12" /> <LoadingBanner v-if="!isRefreshed" class="mt-12" />
<VInfiniteScroll mode="intersect" side="end" :items="dataList" class="overflow-visible px-2" @load="fetchData" :key="currentKey"> <VInfiniteScroll
mode="intersect"
side="end"
:items="dataList"
class="overflow-visible px-2"
@load="fetchData"
:key="currentKey"
>
<template #loading /> <template #loading />
<template #empty /> <template #empty />
<div v-if="dataList.length > 0" class="grid gap-4 grid-media-card" tabindex="0"> <div v-if="dataList.length > 0" class="grid gap-4 grid-media-card" tabindex="0">
+17 -25
View File
@@ -102,13 +102,17 @@ watch(
) )
// 监听筛选参数变化 // 监听筛选参数变化
watch(filterParams, () => { watch(
filterParams,
() => {
// 重置数据 // 重置数据
dataList.value = [] dataList.value = []
page.value = 1 page.value = 1
isRefreshed.value = false isRefreshed.value = false
currentKey.value++ currentKey.value++
}, { deep: true }) },
{ deep: true },
)
// 是否加载中 // 是否加载中
const loading = ref(false) const loading = ref(false)
@@ -223,28 +227,13 @@ function removeData(id: number) {
<VLabel>{{ t('tmdb.sort') }}</VLabel> <VLabel>{{ t('tmdb.sort') }}</VLabel>
</div> </div>
<VChipGroup v-model="filterParams.sort_type"> <VChipGroup v-model="filterParams.sort_type">
<VChip <VChip :color="filterParams.sort_type == 'time' ? 'primary' : ''" filter tile value="time">
:color="filterParams.sort_type == 'time' ? 'primary' : ''"
filter
tile
value="time"
>
{{ t('tmdb.sortType.time') }} {{ t('tmdb.sortType.time') }}
</VChip> </VChip>
<VChip <VChip :color="filterParams.sort_type == 'count' ? 'primary' : ''" filter tile value="count">
:color="filterParams.sort_type == 'count' ? 'primary' : ''"
filter
tile
value="count"
>
{{ t('tmdb.sortType.count') }} {{ t('tmdb.sortType.count') }}
</VChip> </VChip>
<VChip <VChip :color="filterParams.sort_type == 'rating' ? 'primary' : ''" filter tile value="rating">
:color="filterParams.sort_type == 'rating' ? 'primary' : ''"
filter
tile
value="rating"
>
{{ t('tmdb.sortType.rating') }} {{ t('tmdb.sortType.rating') }}
</VChip> </VChip>
</VChipGroup> </VChipGroup>
@@ -280,18 +269,21 @@ function removeData(id: number) {
:step="1" :step="1"
class="align-center" class="align-center"
hide-details hide-details
style="width: 200px;"
> >
<template v-slot:append>
<span class="ml-2 text-body-2">- 10</span>
</template>
</VSlider> </VSlider>
</div> </div>
</div> </div>
<VPageContentTitle v-if="keyword" :title="`${t('common.search')}${keyword}`" /> <VPageContentTitle v-if="keyword" :title="`${t('common.search')}${keyword}`" />
<LoadingBanner v-if="!isRefreshed" class="mt-12" /> <LoadingBanner v-if="!isRefreshed" class="mt-12" />
<VInfiniteScroll mode="intersect" side="end" :items="dataList" class="overflow-visible px-2" @load="fetchData" :key="currentKey"> <VInfiniteScroll
mode="intersect"
side="end"
:items="dataList"
class="overflow-visible px-2"
@load="fetchData"
:key="currentKey"
>
<template #loading /> <template #loading />
<template #empty /> <template #empty />
<div v-if="dataList.length > 0" class="grid gap-4 grid-subscribe-card" tabindex="0"> <div v-if="dataList.length > 0" class="grid gap-4 grid-subscribe-card" tabindex="0">