diff --git a/src/components/cards/MediaCard.vue b/src/components/cards/MediaCard.vue
index 199bb652..87b577e1 100644
--- a/src/components/cards/MediaCard.vue
+++ b/src/components/cards/MediaCard.vue
@@ -390,12 +390,18 @@ function formatAirDate(airDate: string) {
const date = new Date(airDate.replaceAll(/-/g, '/'))
return `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日`
}
+
// 从yyyy-mm-dd中提取年份
function getYear(airDate: string) {
if (!airDate) return ''
const date = new Date(airDate.replaceAll(/-/g, '/'))
return date.getFullYear()
}
+
+// 移除订阅
+function onRemoveSubscribe() {
+ subscribeEditDialog.value = false
+}
@@ -542,12 +548,7 @@ function getYear(airDate: string) {
:subid="subscribeId"
@close="subscribeEditDialog = false"
@save="subscribeEditDialog = false"
- @remove="
- () => {
- subscribeEditDialog = false
- handleCheckSubscribe()
- }
- "
+ @remove="onRemoveSubscribe"
/>
diff --git a/src/components/cards/SubscribeShareCard.vue b/src/components/cards/SubscribeShareCard.vue
index e371305d..c7632733 100644
--- a/src/components/cards/SubscribeShareCard.vue
+++ b/src/components/cards/SubscribeShareCard.vue
@@ -6,6 +6,7 @@ import type { SubscribeShare } from '@/api/types'
import router from '@/router'
import { useToast } from 'vue-toast-notification'
import { useConfirm } from 'vuetify-use-dialog'
+import SubscribeEditDialog from '../dialog/SubscribeEditDialog.vue'
// 输入参数
const props = defineProps({
@@ -24,6 +25,12 @@ const globalSettings: any = inject('globalSettings')
// 图片是否加载完成
const imageLoaded = ref(false)
+// 订阅编辑弹窗
+const subscribeEditDialog = ref(false)
+
+// 订阅ID
+const subscribeId = ref()
+
// 图片加载完成响应
function imageLoadHandler() {
imageLoaded.value = true
@@ -79,6 +86,9 @@ async function forkSubscribe() {
// 订阅状态
if (result.success) {
$toast.success(`${props.media?.share_title} 添加订阅成功!`)
+ // 弹出订阅编辑弹窗
+ subscribeId.value = result.data.id
+ subscribeEditDialog.value = true
} else {
$toast.error(`${props.media?.share_title} 添加订阅失败:${result.message}!`)
}
@@ -153,6 +163,15 @@ async function forkSubscribe() {
+
+