diff --git a/src/api/basic/common.ts b/src/api/basic/common.ts index 35573e4..be1a155 100644 --- a/src/api/basic/common.ts +++ b/src/api/basic/common.ts @@ -6,6 +6,7 @@ import {ContentTypeEnum} from "@/enums/httpEnum"; enum Api { UploadXlsx = '/v2/common/upload/excel', ExportXlsx = '/v2/common/export/excel', + UploadOss = '/v2/common/uploadOss', } export interface UploadFileParams { @@ -40,4 +41,21 @@ export function exportXlsx(type: string, mode: ErrorMessageMode = 'notice') { errorMessageMode: mode, }, ); +} + +export function uploadOss(params: UploadFileParams, mode: ErrorMessageMode = 'notice') { + return defHttp.post( + { + url: Api.UploadOss, + params, + headers: { + 'Content-type': ContentTypeEnum.FORM_DATA, + // @ts-ignore + ignoreCancelToken: true, + }, + }, + { + errorMessageMode: mode, + }, + ); } \ No newline at end of file diff --git a/src/views/product/info/components/ProductInfoModal.vue b/src/views/product/info/components/ProductInfoModal.vue index c808bea..2f5a8de 100644 --- a/src/views/product/info/components/ProductInfoModal.vue +++ b/src/views/product/info/components/ProductInfoModal.vue @@ -273,24 +273,24 @@ 最低安全库存-批量 最高安全库存-批量 - - -