feat:更新上传图片功能
This commit is contained in:
@@ -3,6 +3,18 @@ import { IBlog, IBlogCategory, IBlogComment, IBlogStats, IBlogVisit, INewBlog }
|
||||
|
||||
import { IPageRecord } from '@/types'
|
||||
|
||||
export const uploadBlogImageApi = (md5: string, form: FormData): Promise<string> =>
|
||||
cloudService({
|
||||
url: '/blog-api/blog/file/upload',
|
||||
timeout: 10000,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
},
|
||||
method: 'post',
|
||||
params: { md5 },
|
||||
data: form
|
||||
})
|
||||
|
||||
export const queryBlogApi = (currentPage: number, pageSize: number): Promise<IPageRecord<IBlog>> =>
|
||||
cloudService({
|
||||
url: '/blog-api/blog/all/page',
|
||||
|
||||
Reference in New Issue
Block a user