refactor(deps): migrate to nuxt v4

This commit is contained in:
2026-02-10 00:31:04 +08:00
parent f1b9cea060
commit 880b85f75d
88 changed files with 80 additions and 60 deletions

View File

@@ -0,0 +1,30 @@
export const fetchCourseSubtitleUrl = async (
course: resp.gen.CourseGenItem
) => {
const loginState = useLoginState()
try {
const subtitleRecord = await useFetchWrapped<
{
page?: number
perpage?: number
task_id: string
} & AuthedRequest,
BaseResponse<PagedData<resp.gen.CourseSubtitleCreate>>
>('App.Digital_VideoSubtitle.GetList', {
token: loginState.token!,
user_id: loginState.user.id,
task_id: course.task_id,
page: 1,
perpage: 1,
})
if (subtitleRecord.data.items.length !== 1) {
return course.subtitle_url
}
return subtitleRecord.data.items[0].url
} catch (err) {
return course.subtitle_url
}
}