import http from '@/utils/request' ; import config from '@/config/index' ; import { BaseResult , Pagination , ResultData , ApiMethodContants } from '../common/types/apiResult.type' ; export interface OssApiResult extends BaseResult { url : string ; size : number ; type : string ; business : string ; userId : string ; userAccount : string ; createDate : string ; } export interface findOssList extends Pagination { startDay ? : string ; endDay ? : string ; } export function getFileList ( params ) { return http . request < ResultData < OssApiResult > > ( { url : `${ config . api . baseUrl }/oss/list` , method : ApiMethodContants . GET , params } ) ; } export function fileUpload ( data ) { return http . request < ResultData < OssApiResult [ ] > > ( { url : `${ config . api . baseUrl }/oss/upload` , method : ApiMethodContants . POST , data } ) ; }