mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-28 03:39:46 +08:00
remove console
This commit is contained in:
@@ -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}`, {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -40,12 +40,11 @@ async function fetchData() {
|
||||
|
||||
// 加载时获取数据
|
||||
onMounted(() => {
|
||||
fetchData(); // 异步操作,不阻塞导航
|
||||
fetchData();
|
||||
});
|
||||
onActivated(() => {
|
||||
console.log("组件被激活");
|
||||
if (dataList.value.length == 0) {
|
||||
fetchData(); // 异步操作,不阻塞导航
|
||||
fetchData();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user