mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 16:56:40 +08:00
fix 减少无效查询
This commit is contained in:
@@ -16,11 +16,6 @@ const props = defineProps({
|
|||||||
height: String,
|
height: String,
|
||||||
})
|
})
|
||||||
|
|
||||||
// 订阅规则
|
|
||||||
const subscribeRules = ref({
|
|
||||||
show_edit_dialog: false,
|
|
||||||
})
|
|
||||||
|
|
||||||
// 提示框
|
// 提示框
|
||||||
const $toast = useToast()
|
const $toast = useToast()
|
||||||
|
|
||||||
@@ -161,9 +156,12 @@ async function addSubscribe(season = 0) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// 弹出订阅编辑弹窗
|
// 弹出订阅编辑弹窗
|
||||||
if (result.success && seasonsSelected.value.length <= 1 && subscribeRules.value.show_edit_dialog) {
|
if (result.success && seasonsSelected.value.length <= 1) {
|
||||||
subscribeId.value = result.data.id
|
const show_edit_dialog = await querySubscribeRules()
|
||||||
subscribeEditDialog.value = true
|
if (show_edit_dialog) {
|
||||||
|
subscribeId.value = result.data.id
|
||||||
|
subscribeEditDialog.value = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
@@ -320,11 +318,12 @@ async function querySubscribeRules() {
|
|||||||
'system/setting/DefaultFilterRules',
|
'system/setting/DefaultFilterRules',
|
||||||
)
|
)
|
||||||
if (result.data?.value)
|
if (result.data?.value)
|
||||||
subscribeRules.value = result.data?.value
|
return result.data.value.show_edit_dialog
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 爱心订阅按钮响应
|
// 爱心订阅按钮响应
|
||||||
@@ -390,7 +389,6 @@ function handleSearch() {
|
|||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
handleCheckSubscribe()
|
handleCheckSubscribe()
|
||||||
handleCheckExists()
|
handleCheckExists()
|
||||||
querySubscribeRules()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 计算图片地址
|
// 计算图片地址
|
||||||
|
|||||||
Reference in New Issue
Block a user