feat: 视频预览/数据看板/下载配置 三项业务功能
- 新增视频预览:VideoPlayer 组件、VideoController/DyCollectVideoService/Repository、VideoPageRequestDTO 对应后端改动 - 新增数据看板:workplace/statics.vue、RecordTable、相关 store/http/axios 改动 - 新增下载配置:DownloadConfigService、ConfigController、AppSet.vue、AppConfig - 其他:DyHttpClientService / 同步 Job(Collect, Favorit) / Cookie 表 / CommonService / ServiceExtension 的配套调整 - 仓库卫生:.gitignore 追加 feiniu 过滤;运维脚本归档到 docs/scripts/
This commit is contained in:
@@ -138,6 +138,34 @@ export const useApiStore = defineStore('coreapi', () => {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 清理数据库中文件不存在的视频记录
|
||||
async function VideoCleanup() {
|
||||
return http.request<any, Response<any>>('/api/video/cleanup', 'post_json').then(r => {
|
||||
return r.data;
|
||||
}).finally(() => {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 获取所有视频类型列表
|
||||
async function VideoCategories() {
|
||||
return http.request<any, Response<any>>('/api/video/categories', 'get').then(r => {
|
||||
console.log('VideoCategories 原始响应:', r);
|
||||
// 响应拦截器已经处理了 code === 0 的情况,直接返回 data
|
||||
// 如果 r 本身就是 Response 对象,返回 r.data
|
||||
// 如果 r 已经是 data(拦截器处理后的结果),直接返回
|
||||
if (r && typeof r === 'object' && 'code' in r && 'data' in r) {
|
||||
return r.data;
|
||||
}
|
||||
return r;
|
||||
}).catch(err => {
|
||||
console.error('VideoCategories API 错误:', err);
|
||||
throw err;
|
||||
}).finally(() => {
|
||||
|
||||
});
|
||||
}
|
||||
//cookies
|
||||
async function CookiePageList(param: object) {
|
||||
return http.request<any, Response<any>>('/api/config/paged', 'post_json', param).then(r => {
|
||||
@@ -163,6 +191,15 @@ export const useApiStore = defineStore('coreapi', () => {
|
||||
});
|
||||
}
|
||||
|
||||
// 删除指定作者的所有视频数据
|
||||
async function DeleteAuthorVideos(authorName: string) {
|
||||
return http.request<any, Response<any>>('/api/video/delete-author', 'post_json', { authorName }).then(r => {
|
||||
return r.data;
|
||||
}).finally(() => {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
deleteCookie,
|
||||
UpdateConfig,
|
||||
@@ -176,6 +213,9 @@ export const useApiStore = defineStore('coreapi', () => {
|
||||
StartJobNow,
|
||||
VideoStatics,
|
||||
VideoPageList,
|
||||
CookiePageList
|
||||
VideoCategories,
|
||||
VideoCleanup,
|
||||
CookiePageList,
|
||||
DeleteAuthorVideos
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user