import request from '@/utils/request'

const api = {
    uploadImg: '/UploadPicture',
    uploadAvatar: '/uploadAvatar'
}

export function uploadImg(parameter) {
    return request({
        url: api.uploadImg,
        headers: { 'Content-Type': 'multipart/form-data' },
        method: 'post',
        data: parameter
    })
}

export function uploadAvatar(parameter) {
    return request({
        url: api.uploadAvatar,
        headers: { 'Content-Type': 'multipart/form-data' },
        method: 'post',
        data: parameter
    })
}