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

View File

@@ -59,7 +59,11 @@ const seasonInfos = ref<TmdbSeason[]>([])
// 选中的订阅季
const seasonsSelected = ref<TmdbSeason[]>([])
let abortController: AbortController | null = null;
abortController = new AbortController();
registerAbortController(abortController);
const { signal } = abortController;
// 来源角标字典
const sourceIconDict: { [key: string]: any } = {
themoviedb: tmdbImage,
@@ -226,11 +230,7 @@ async function handleCheckSubscribe() {
// 查询当前媒体是否已入库
async function handleCheckExists() {
try {
let abortController: AbortController | null = null;
abortController = new AbortController();
registerAbortController(abortController);
const { signal } = abortController;
const result: { [key: string]: any } = await api.get('mediaserver/exists', {
params: {
tmdbid: props.media?.tmdb_id,
@@ -251,11 +251,7 @@ async function handleCheckExists() {
// 调用API检查是否已订阅电视剧需要指定季
async function checkSubscribe(season = 0) {
try {
let abortController: AbortController | null = null;
abortController = new AbortController();
registerAbortController(abortController);
const { signal } = abortController;
const mediaid = getMediaId()
const result: Subscribe = await api.get(`subscribe/media/${mediaid}`, {

View File

@@ -52,7 +52,6 @@ async function fetchData({ done }: { done: any }) {
if (!hasScroll()) {
// 加载多次
while (!hasScroll()) {
console.log(hasScroll())
// 设置加载中
loading.value = true
// 请求API
@@ -78,7 +77,6 @@ async function fetchData({ done }: { done: any }) {
} else {
// 加载一次
// 设置加载中
console.log(hasScroll())
loading.value = true
// 请求API

View File

@@ -40,12 +40,11 @@ async function fetchData() {
// 加载时获取数据
onMounted(() => {
fetchData(); // 异步操作,不阻塞导航
fetchData();
});
onActivated(() => {
console.log("组件被激活");
if (dataList.value.length == 0) {
fetchData(); // 异步操作,不阻塞导航
fetchData();
}
});