import request from '@/utils/request'

//发送短信
export function smsSend(data: any) {
    return request.post({ url: '/sms/sendCode', data: data })
}

//发送邮件
export function emailSend(data: any) {
    return request.post({ url: '/sms/sendEmail', data: data })
}

//发送邮件
export function sendEmailNoLogin(data: any) {
    return request.post({ url: '/sms/sendEmailNoLogin', data: data })
}

export function getConfig() {
    return request.get({ url: '/index/config' })
}

export function getCountryCode() {
    return request.get({ url: '/index/countryCode' })
}

export function uploadImage(file: any, token?: string) {
    return request.uploadFile({
        url: '/upload/image',
        filePath: file,
        name: 'file',
        header: {
            token
        },
        fileType: 'image'
    })
}
