mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 00:36:41 +08:00
remove console
This commit is contained in:
@@ -59,7 +59,11 @@ const seasonInfos = ref<TmdbSeason[]>([])
|
|||||||
|
|
||||||
// 选中的订阅季
|
// 选中的订阅季
|
||||||
const seasonsSelected = ref<TmdbSeason[]>([])
|
const seasonsSelected = ref<TmdbSeason[]>([])
|
||||||
|
let abortController: AbortController | null = null;
|
||||||
|
|
||||||
|
abortController = new AbortController();
|
||||||
|
registerAbortController(abortController);
|
||||||
|
const { signal } = abortController;
|
||||||
// 来源角标字典
|
// 来源角标字典
|
||||||
const sourceIconDict: { [key: string]: any } = {
|
const sourceIconDict: { [key: string]: any } = {
|
||||||
themoviedb: tmdbImage,
|
themoviedb: tmdbImage,
|
||||||
@@ -226,11 +230,7 @@ async function handleCheckSubscribe() {
|
|||||||
// 查询当前媒体是否已入库
|
// 查询当前媒体是否已入库
|
||||||
async function handleCheckExists() {
|
async function handleCheckExists() {
|
||||||
try {
|
try {
|
||||||
let abortController: AbortController | null = null;
|
|
||||||
|
|
||||||
abortController = new AbortController();
|
|
||||||
registerAbortController(abortController);
|
|
||||||
const { signal } = abortController;
|
|
||||||
const result: { [key: string]: any } = await api.get('mediaserver/exists', {
|
const result: { [key: string]: any } = await api.get('mediaserver/exists', {
|
||||||
params: {
|
params: {
|
||||||
tmdbid: props.media?.tmdb_id,
|
tmdbid: props.media?.tmdb_id,
|
||||||
@@ -251,11 +251,7 @@ async function handleCheckExists() {
|
|||||||
// 调用API检查是否已订阅,电视剧需要指定季
|
// 调用API检查是否已订阅,电视剧需要指定季
|
||||||
async function checkSubscribe(season = 0) {
|
async function checkSubscribe(season = 0) {
|
||||||
try {
|
try {
|
||||||
let abortController: AbortController | null = null;
|
|
||||||
|
|
||||||
abortController = new AbortController();
|
|
||||||
registerAbortController(abortController);
|
|
||||||
const { signal } = abortController;
|
|
||||||
const mediaid = getMediaId()
|
const mediaid = getMediaId()
|
||||||
|
|
||||||
const result: Subscribe = await api.get(`subscribe/media/${mediaid}`, {
|
const result: Subscribe = await api.get(`subscribe/media/${mediaid}`, {
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ async function fetchData({ done }: { done: any }) {
|
|||||||
if (!hasScroll()) {
|
if (!hasScroll()) {
|
||||||
// 加载多次
|
// 加载多次
|
||||||
while (!hasScroll()) {
|
while (!hasScroll()) {
|
||||||
console.log(hasScroll())
|
|
||||||
// 设置加载中
|
// 设置加载中
|
||||||
loading.value = true
|
loading.value = true
|
||||||
// 请求API
|
// 请求API
|
||||||
@@ -78,7 +77,6 @@ async function fetchData({ done }: { done: any }) {
|
|||||||
} else {
|
} else {
|
||||||
// 加载一次
|
// 加载一次
|
||||||
// 设置加载中
|
// 设置加载中
|
||||||
console.log(hasScroll())
|
|
||||||
|
|
||||||
loading.value = true
|
loading.value = true
|
||||||
// 请求API
|
// 请求API
|
||||||
|
|||||||
@@ -40,12 +40,11 @@ async function fetchData() {
|
|||||||
|
|
||||||
// 加载时获取数据
|
// 加载时获取数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchData(); // 异步操作,不阻塞导航
|
fetchData();
|
||||||
});
|
});
|
||||||
onActivated(() => {
|
onActivated(() => {
|
||||||
console.log("组件被激活");
|
|
||||||
if (dataList.value.length == 0) {
|
if (dataList.value.length == 0) {
|
||||||
fetchData(); // 异步操作,不阻塞导航
|
fetchData();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user