remove console

This commit is contained in:
wintsa
2025-01-03 09:56:06 +08:00
parent c11fb54b0b
commit ff1c2a890c
3 changed files with 6 additions and 13 deletions
+4 -8
View File
@@ -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}`, {
-2
View File
@@ -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
+2 -3
View File
@@ -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();
} }
}); });