1. 特色方功能迭代(固定价格),固定价格目前统一使用药品id(-102),后期会考虑新增特色方的时候自动添加一个特色方药品
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
2. 退款的时候可以退回分成
This commit is contained in:
@@ -11,6 +11,7 @@ export interface FileGalleryItem {
|
||||
type?: number;
|
||||
type_text?: string;
|
||||
type_icon?: string;
|
||||
group_ids?: number[];
|
||||
created_at?: string;
|
||||
original_name?: string;
|
||||
object_key?: string;
|
||||
@@ -36,6 +37,7 @@ export async function getFileGalleryList(params?: {
|
||||
page_size?: number;
|
||||
pid?: number;
|
||||
type?: number;
|
||||
group_id?: number;
|
||||
keyword?: string;
|
||||
}) {
|
||||
return requestClient.get<{
|
||||
@@ -76,3 +78,13 @@ export async function getFileTypes() {
|
||||
export async function syncFileGalleryFromOss() {
|
||||
return requestClient.post<{ synced: number; skipped: number; scanned: number }>(`${prefix}sync-oss`);
|
||||
}
|
||||
|
||||
/** 文件加入自定义分组 */
|
||||
export async function addFileToGroup(file_id: number, group_id: number) {
|
||||
return requestClient.post<any>(`${prefix}add-to-group`, { file_id, group_id });
|
||||
}
|
||||
|
||||
/** 文件移出自定义分组 */
|
||||
export async function removeFileFromGroup(file_id: number, group_id: number) {
|
||||
return requestClient.post<any>(`${prefix}remove-from-group`, { file_id, group_id });
|
||||
}
|
||||
|
||||
51
apps/web-antd/src/api/core/file-group.ts
Normal file
51
apps/web-antd/src/api/core/file-group.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
const prefix = 'file-group/';
|
||||
|
||||
export interface FileGroupRecord {
|
||||
id: number;
|
||||
name: string;
|
||||
sort: number;
|
||||
created_at?: number;
|
||||
updated_at?: number;
|
||||
}
|
||||
|
||||
export interface FileGroupOptionItem {
|
||||
id: number;
|
||||
name: string;
|
||||
sort: number;
|
||||
}
|
||||
|
||||
/** 分组选项缓存结构 */
|
||||
export interface FileGroupCachePayload {
|
||||
hash: string;
|
||||
items: FileGroupOptionItem[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理端分组列表
|
||||
*/
|
||||
export async function getFileGroupList() {
|
||||
return requestClient.get<FileGroupRecord[]>(`${prefix}list`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 带 hash 的分组选项:无变化时 result 为 0
|
||||
*/
|
||||
export async function getFileGroupOptions(hash?: string) {
|
||||
return requestClient.get<FileGroupOptionItem[] | 0>(`${prefix}options`, {
|
||||
params: hash ? { hash } : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
export async function createFileGroup(data: Partial<FileGroupRecord>) {
|
||||
return requestClient.post<any>(`${prefix}create`, data);
|
||||
}
|
||||
|
||||
export async function updateFileGroup(data: Partial<FileGroupRecord> & { id: number }) {
|
||||
return requestClient.post<any>(`${prefix}update`, data);
|
||||
}
|
||||
|
||||
export async function deleteFileGroup(id: number) {
|
||||
return requestClient.post<any>(`${prefix}delete`, { id });
|
||||
}
|
||||
Reference in New Issue
Block a user