1. 推广员功能增强
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
This commit is contained in:
29
apps/web-antd/src/api/core/file-gallery.ts
Normal file
29
apps/web-antd/src/api/core/file-gallery.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
const prefix = 'file-gallery/';
|
||||
|
||||
export interface FileGalleryItem {
|
||||
id: number;
|
||||
url: string;
|
||||
file_size: number;
|
||||
file_size_text: string;
|
||||
created_at?: string;
|
||||
original_name?: string;
|
||||
}
|
||||
|
||||
export async function getFileGalleryList(params?: { page?: number; page_size?: number; pid?: number; type?: number }) {
|
||||
return requestClient.get<{
|
||||
items: FileGalleryItem[];
|
||||
total: number;
|
||||
page: number;
|
||||
page_size: number;
|
||||
}>(`${prefix}list`, { params });
|
||||
}
|
||||
|
||||
export async function deleteFileGalleryItem(id: number) {
|
||||
return requestClient.post<any>(`${prefix}delete`, { id });
|
||||
}
|
||||
|
||||
export async function syncFileGalleryFromOss() {
|
||||
return requestClient.post<{ added: number; skipped: number }>(`${prefix}sync-oss`);
|
||||
}
|
||||
@@ -61,7 +61,7 @@ export async function getOssSignature() {
|
||||
/**
|
||||
* OSS 直传成功后登记 xk_file
|
||||
*/
|
||||
export async function registerOssFile(data: { url: string; type?: number; source?: number }) {
|
||||
export async function registerOssFile(data: { url: string; type?: number; source?: number; file_size?: number }) {
|
||||
return requestClient.post('/upload/register-oss-file', data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user