-
+
{{ item.title }}
@@ -29,12 +26,12 @@ function jumpTab(tab: string) {
-
+
-
+
diff --git a/src/router/index.ts b/src/router/index.ts
index a832dc83..4c7ecc12 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -23,6 +23,7 @@ const router = createRouter({
path: '/dashboard',
component: () => import('../pages/dashboard.vue'),
meta: {
+ keepAlive: true,
requiresAuth: true,
},
},
@@ -42,23 +43,28 @@ const router = createRouter({
},
},
{
- path: '/subscribe-movie',
- component: () => import('../pages/subscribe-movie.vue'),
+ path: '/subscribe/movie',
+ component: () => import('../pages/subscribe.vue'),
meta: {
+ keepAlive: true,
requiresAuth: true,
+ subType: '电影',
},
},
{
- path: '/subscribe-tv',
- component: () => import('../pages/subscribe-tv.vue'),
+ path: '/subscribe/tv',
+ component: () => import('../pages/subscribe.vue'),
meta: {
+ keepAlive: true,
requiresAuth: true,
+ subType: '电视剧',
},
},
{
path: '/calendar',
component: () => import('../pages/calendar.vue'),
meta: {
+ keepAlive: true,
requiresAuth: true,
},
},
@@ -80,6 +86,7 @@ const router = createRouter({
path: '/site',
component: () => import('../pages/site.vue'),
meta: {
+ keepAlive: true,
requiresAuth: true,
},
},
@@ -87,6 +94,7 @@ const router = createRouter({
path: '/plugins',
component: () => import('../pages/plugin.vue'),
meta: {
+ keepAlive: true,
requiresAuth: true,
},
},
@@ -120,6 +128,7 @@ const router = createRouter({
component: () => import('../pages/person.vue'),
props: true,
meta: {
+ keepAlive: true,
requiresAuth: true,
},
},
@@ -127,6 +136,7 @@ const router = createRouter({
path: '/media',
component: () => import('../pages/media.vue'),
meta: {
+ keepAlive: true,
requiresAuth: true,
},
},
diff --git a/src/router/menu.ts b/src/router/menu.ts
index 1183426e..a41b89ff 100644
--- a/src/router/menu.ts
+++ b/src/router/menu.ts
@@ -25,7 +25,7 @@ export const SystemNavMenus = [
title: '电影',
full_title: '电影订阅',
icon: 'mdi-movie-open-outline',
- to: '/subscribe-movie?tab=mysub',
+ to: '/subscribe/movie',
header: '订阅',
admin: false,
},
@@ -33,7 +33,7 @@ export const SystemNavMenus = [
title: '电视剧',
full_title: '电视剧订阅',
icon: 'mdi-television',
- to: '/subscribe-tv?tab=mysub',
+ to: '/subscribe/tv',
header: '订阅',
admin: false,
},
@@ -69,7 +69,7 @@ export const SystemNavMenus = [
{
title: '插件',
icon: 'mdi-apps',
- to: '/plugins?tab=installed',
+ to: '/plugins',
header: '系统',
admin: true,
},
@@ -186,12 +186,12 @@ export const SubscribeMovieTabs = [
{
title: '我的订阅',
tab: 'mysub',
- icon: 'mdi-movie-roll',
+ icon: 'mdi-movie-open-outline',
},
{
title: '热门订阅',
tab: 'popular',
- icon: 'mdi-movie-roll',
+ icon: 'mdi-movie-open-outline',
},
]
@@ -200,12 +200,12 @@ export const SubscribeTvTabs = [
{
title: '我的订阅',
tab: 'mysub',
- icon: 'mdi-television-classic',
+ icon: 'mdi-television',
},
{
title: '热门订阅',
tab: 'popular',
- icon: 'mdi-television-classic',
+ icon: 'mdi-television',
},
]
diff --git a/src/views/plugin/PluginCardListView.vue b/src/views/plugin/PluginCardListView.vue
index a367c310..db358a82 100644
--- a/src/views/plugin/PluginCardListView.vue
+++ b/src/views/plugin/PluginCardListView.vue
@@ -8,7 +8,6 @@ import PluginCard from '@/components/cards/PluginCard.vue'
import noImage from '@images/logos/plugin.png'
import { useDisplay } from 'vuetify'
import { isNullOrEmptyObject } from '@/@core/utils'
-import router from '@/router'
import { PluginTabs } from '@/router/menu'
const route = useRoute()
@@ -39,6 +38,9 @@ const sortOptions = [
{ title: '最新发布', value: 'add_time' },
]
+// 加载中
+const loading = ref(false)
+
// 已安装插件列表
const dataList = ref
([])
@@ -198,11 +200,13 @@ const filterPlugins = computed(() => {
// 获取插件列表数据
async function fetchInstalledPlugins() {
try {
+ loading.value = true
dataList.value = await api.get('plugin/', {
params: {
state: 'installed',
},
})
+ loading.value = false
isRefreshed.value = true
} catch (error) {
console.error(error)
@@ -212,6 +216,7 @@ async function fetchInstalledPlugins() {
// 获取未安装插件列表数据
async function fetchUninstalledPlugins() {
try {
+ loading.value = true
uninstalledList.value = await api.get('plugin/', {
params: {
state: 'market',
@@ -227,6 +232,8 @@ async function fetchUninstalledPlugins() {
}
}
}
+ loading.value = false
+ isRefreshed.value = true
// 更新插件市场列表
// 排除已安装且有更新的,上面的问题在于“本地存在未安装的旧版本插件且云端有更新时”不会在插件市场展示
marketList.value = uninstalledList.value.filter(item => !(item.has_update && item.installed))
@@ -312,11 +319,6 @@ function handleRepoUrl(url: string | undefined) {
return url.replace('https://github.com/', '').replace('https://raw.githubusercontent.com/', '')
}
-// 跳转tab
-function jumpTab(tab: string) {
- router.push('/plugins?tab=' + tab)
-}
-
// 加载时获取数据
onBeforeMount(async () => {
await refreshData()
@@ -334,7 +336,7 @@ onBeforeMount(async () => {
-
+
{{ item.title }}
diff --git a/src/views/site/SiteCardListView.vue b/src/views/site/SiteCardListView.vue
index 5f0a4812..35fed872 100644
--- a/src/views/site/SiteCardListView.vue
+++ b/src/views/site/SiteCardListView.vue
@@ -6,6 +6,7 @@ import SiteCard from '@/components/cards/SiteCard.vue'
import NoDataFound from '@/components/NoDataFound.vue'
import SiteAddEditDialog from '@/components/dialog/SiteAddEditDialog.vue'
import { useDisplay } from 'vuetify'
+import { isLength } from 'lodash'
// 显示器宽度
const display = useDisplay()
@@ -21,13 +22,18 @@ const dataList = ref([])
// 是否刷新过
const isRefreshed = ref(false)
+// 是否加载中
+const loading = ref(false)
+
// 新增站点对话框
const siteAddDialog = ref(false)
// 获取站点列表数据
async function fetchData() {
try {
+ loading.value = true
dataList.value = await api.get('site/')
+ loading.value = false
isRefreshed.value = true
} catch (error) {
console.error(error)
@@ -50,6 +56,12 @@ async function savaSitesPriority() {
// 加载时获取数据
onBeforeMount(fetchData)
+
+onActivated(() => {
+ if (!loading.value) {
+ fetchData()
+ }
+})
diff --git a/src/views/subscribe/FullCalendarView.vue b/src/views/subscribe/FullCalendarView.vue
index b78a47e5..063b47ba 100644
--- a/src/views/subscribe/FullCalendarView.vue
+++ b/src/views/subscribe/FullCalendarView.vue
@@ -1,4 +1,4 @@
-
@@ -186,9 +194,10 @@ onMounted(() => {
+
-