mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-27 20:42:52 +00:00
20 lines
426 B
TypeScript
20 lines
426 B
TypeScript
import {Result} from '@/request/Result'
|
|
import {get, post, del, put} from '@/request/index'
|
|
|
|
const prefix = '/oss/file'
|
|
/**
|
|
* 上传图片
|
|
* @param 参数 file:file
|
|
*/
|
|
const postImage: (data: any) => Promise<Result<any>> = (data) => {
|
|
return post(`${prefix}`, data)
|
|
}
|
|
|
|
const getFile: (params: any) => Promise<Result<any>> = (params) => {
|
|
return get(`/oss/get_url` , params)
|
|
}
|
|
export default {
|
|
postImage,
|
|
getFile
|
|
}
|