You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
491 B

import { fetch } from '../../../utils/util';
export type ResponseType = Promise<any>;
export const URL = '/api/image/upload';
/**
* @desc 上传图片
*/
export function request(
options?: WechatMiniprogram.RequestOption,
): ResponseType {
let url = '/api/image/upload';
const fetchOption = Object.assign(
{
url: url,
method: 'POST',
headers: {
'Content-Type': 'multipart/form-data',
},
},
options,
);
return fetch(fetchOption);
}