diff --git a/src/components/cards/MediaCard.vue b/src/components/cards/MediaCard.vue
index 3a00a775..7bd8b7f7 100644
--- a/src/components/cards/MediaCard.vue
+++ b/src/components/cards/MediaCard.vue
@@ -323,13 +323,17 @@ const openDetailWindow = () => {
// 开始搜索
const handleSearch = () => {
- router.push(
- `/resource/${
- props.media?.tmdb_id
- ? `tmdb:${props.media?.tmdb_id}`
- : `douban:${props.media?.douban_id}`
- }`
- );
+ router.push({
+ path: "/resource",
+ query: {
+ keyword: `${
+ props.media?.tmdb_id
+ ? `tmdb:${props.media?.tmdb_id}`
+ : `douban:${props.media?.douban_id}`
+ }`,
+ type: props.media?.type,
+ },
+ });
};
// 装载时检查是否已订阅
diff --git a/src/pages/resource.vue b/src/pages/resource.vue
index 81313c6d..462ae0df 100644
--- a/src/pages/resource.vue
+++ b/src/pages/resource.vue
@@ -5,11 +5,13 @@ import TorrentCardListView from "@/views/discover/TorrentCardListView.vue";
const route = useRoute();
// 查询TMDBID或标题
-const keyword = route.params?.keyword?.toString() ?? "";
+const keyword = route.query?.keyword?.toString() ?? "";
+// 查询类型
+const type = route.query?.type?.toString() ?? "";
-
+
diff --git a/src/router/index.ts b/src/router/index.ts
index 981db989..c83a14a3 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -33,14 +33,6 @@ const router = createRouter({
requiresAuth: true,
},
},
- {
- path: 'resource/:keyword+',
- component: () => import('../pages/resource.vue'),
- props: true,
- meta: {
- requiresAuth: true,
- },
- },
{
path: 'subscribe-movie',
component: () => import('../pages/subscribe-movie.vue'),
diff --git a/src/views/discover/TorrentCardListView.vue b/src/views/discover/TorrentCardListView.vue
index dcd7524f..4fa85d9d 100644
--- a/src/views/discover/TorrentCardListView.vue
+++ b/src/views/discover/TorrentCardListView.vue
@@ -1,33 +1,36 @@
-
+
-
+
-
+
-
+
-
+
-
+
{{ progressText }}
-