diff --git a/src/api/types.ts b/src/api/types.ts
index 6954a688..dc2e8076 100644
--- a/src/api/types.ts
+++ b/src/api/types.ts
@@ -77,8 +77,8 @@ export interface Subscribe {
// 订阅站点
sites: number[]
- // 是否洗版
- best_version: number
+ // 是否洗版,数字或者boolean
+ best_version: any
// 当前优先级
current_priority: number
diff --git a/src/components/cards/MediaCard.vue b/src/components/cards/MediaCard.vue
index 4f1573a8..00360cd3 100644
--- a/src/components/cards/MediaCard.vue
+++ b/src/components/cards/MediaCard.vue
@@ -1,6 +1,7 @@
@@ -407,133 +262,11 @@ const effectOptions = ref([
/>
-
-
-
-
-
- {}">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 取消
-
-
-
- 确定
-
-
-
-
+ { emit('remove');subscribeEditDialog = false; }"
+ @save="() => { emit('save');subscribeEditDialog = false; }"
+ @close="subscribeEditDialog = false"
+ />
diff --git a/src/components/form/SubscribeEditForm.vue b/src/components/form/SubscribeEditForm.vue
new file mode 100644
index 00000000..0547f4af
--- /dev/null
+++ b/src/components/form/SubscribeEditForm.vue
@@ -0,0 +1,348 @@
+
+
+
+
+
+
+
+ {}">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+ 保存
+
+
+
+
+
diff --git a/src/views/discover/MediaDetailView.vue b/src/views/discover/MediaDetailView.vue
index 3ec0bcf1..530aa1f9 100644
--- a/src/views/discover/MediaDetailView.vue
+++ b/src/views/discover/MediaDetailView.vue
@@ -8,6 +8,7 @@ import NoDataFound from '@/components/NoDataFound.vue'
import { doneNProgress, startNProgress } from '@/api/nprogress'
import { formatSeason } from '@/@core/utils/formatters'
import router from '@/router'
+import SubscribeEditForm from '@/components/form/SubscribeEditForm.vue'
// 输入参数
const mediaProps = defineProps({
@@ -21,6 +22,9 @@ const $toast = useToast()
// 媒体详情
const mediaDetail = ref({} as MediaInfo)
+// 订阅编辑弹窗
+const subscribeEditDialog = ref(false)
+
// 本地是否存在
const isExists = ref(false)
@@ -39,6 +43,9 @@ const seasonsNotExisted = ref<{ [key: number]: number }>({})
// 各季的订阅状态
const seasonsSubscribed = ref<{ [key: number]: boolean }>({})
+// 订阅编号
+const subscribeId = ref(0)
+
// 调用API查询详情
async function getMediaDetail() {
if (mediaProps.mediaid && mediaProps.type) {
@@ -211,6 +218,12 @@ async function addSubscribe(season = 0) {
result.message,
best_version,
)
+
+ // 显示编辑弹窗
+ if (result.success) {
+ subscribeId.value = result.data.id
+ subscribeEditDialog.value = true
+ }
}
catch (error) {
console.error(error)
@@ -684,6 +697,20 @@ onBeforeMount(() => {
error-title="出错啦!"
error-description="未识别到TMDB媒体信息。"
/>
+
+ {
+ subscribeEditDialog = false;
+ if (mediaDetail.type === '电影')
+ checkMovieSubscribed()
+ else
+ checkSeasonsSubscribed();
+ }"
+ />