chore: save work before switching to dev
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import request from '/@/utils/request';
|
||||
import request, { type RequestOptions } from '/@/utils/request';
|
||||
|
||||
export interface CreationListParams {
|
||||
pageNum: number;
|
||||
@@ -61,28 +61,32 @@ export interface DownloadToFileParams {
|
||||
fileURL: string;
|
||||
}
|
||||
|
||||
export function getCreationList(params: CreationListParams) {
|
||||
// requestOptions 用来声明“这个接口的错误提示由谁负责”。
|
||||
export function getCreationList(params: CreationListParams, requestOptions?: RequestOptions) {
|
||||
return request({
|
||||
url: '/black-deacon/creation/info/list',
|
||||
method: 'get',
|
||||
params,
|
||||
requestOptions,
|
||||
}) as Promise<CreationListResponse>;
|
||||
}
|
||||
|
||||
export function createCreation(data: CreationSubmitParams) {
|
||||
export function createCreation(data: CreationSubmitParams, requestOptions?: RequestOptions) {
|
||||
return request({
|
||||
url: '/black-deacon/creation/info/creation',
|
||||
method: 'post',
|
||||
data,
|
||||
timeout: 0,
|
||||
requestOptions,
|
||||
});
|
||||
}
|
||||
|
||||
export function downloadToFile(data: DownloadToFileParams) {
|
||||
export function downloadToFile(data: DownloadToFileParams, requestOptions?: RequestOptions) {
|
||||
return request({
|
||||
url: '/oss/file/downloadToBrowser',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: 'blob',
|
||||
requestOptions,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user