import request from '../js/request'
import config from '../js/config'

// 上传图片
export const uploadImage = (filePath) => {
    return uni.uploadFile({
        url: config.domain + '/user-boot/user/uploadImage',
        filePath,
        name: 'issuesFile',
        header: {
            Authorization: uni.getStorageSync('access_token'),
        },
    })
}

// 获取图片url
export const getImageUrl = (headSculpture) => {
    return request({
        url: '/user-boot/user/getUrl',
        method: 'post',
        data: {
            headSculpture,
        },
    })
}
