diff --git a/src/components/dialog/SearchBarDialog.vue b/src/components/dialog/SearchBarDialog.vue
index 5cbf418d..80e2e2ee 100644
--- a/src/components/dialog/SearchBarDialog.vue
+++ b/src/components/dialog/SearchBarDialog.vue
@@ -298,6 +298,19 @@ function searchHistory() {
emit('close')
}
+// 跳转到订阅分享页面
+function searchSubscribeShares() {
+ if (!searchWord.value) return
+ saveRecentSearches(searchWord.value)
+ router.push({
+ path: '/subscribe-share',
+ query: {
+ keyword: searchWord.value,
+ },
+ })
+ emit('close')
+}
+
// 跳转插件页面
function showPlugin(pluginId: string) {
router.push({
@@ -484,6 +497,37 @@ onMounted(() => {
+
+
+
+
+
+
+
+
+ {{ t('subscribe.searchShares') }}
+
+ {{ t('common.search') }} {{ searchWord }}
+ {{ t('dialog.searchBar.subscribeShareSearch') }}
+
+
+
+
+
+
+
+
+import SubscribeShareView from '@/views/subscribe/SubscribeShareView.vue'
+// 从路由参数中获取搜索关键字
+const route = useRoute()
+const keyword = route.query.keyword as string
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/index.ts b/src/router/index.ts
index 2a49061d..6f80c363 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -69,6 +69,14 @@ const router = createRouter({
subType: '电视剧',
},
},
+ {
+ path: '/subscribe-share',
+ component: () => import('../pages/subscribe-share.vue'),
+ meta: {
+ keepAlive: true,
+ requiresAuth: true,
+ },
+ },
{
path: '/workflow',
component: () => import('../pages/workflow.vue'),
diff --git a/src/views/subscribe/SubscribeShareView.vue b/src/views/subscribe/SubscribeShareView.vue
index 6f2f8adc..e14d2b6f 100644
--- a/src/views/subscribe/SubscribeShareView.vue
+++ b/src/views/subscribe/SubscribeShareView.vue
@@ -28,6 +28,18 @@ const page = ref(1)
// 搜索关键字
const keyword = ref(props.keyword)
+// 监听 props.keyword 变化
+watch(
+ () => props.keyword,
+ newKeyword => {
+ keyword.value = newKeyword || ''
+ // 重置页码和数据
+ page.value = 1
+ dataList.value = []
+ isRefreshed.value = false
+ },
+)
+
// 是否加载中
const loading = ref(false)