import service from '@/service'

export const login = (data) => {
    return service({
        method: 'post',
        url: '/store/login',
        data
    })
}

export const verifyToken = () => {
    return service({
        method: 'post',
        url: '/store/verifyToken',
        data: {}
    })
}

export const getSMSCode = (mobile) => {
    return service({
        method: 'get',
        url: `/store/getSMSCode?mobile=${mobile}`
    })
}

export const verifyEmail = (email,code) => {
    return service({
        method: 'get',
        url: `/accessory/checkMailVerifyCode?email=${email}&code=${code}`
    })
}

export const getEmailCode = (email) => {
    return service({
        method: 'get',
        url: `/accessory/mailVerifyCode?email=${email}`
    })
}

export const loadShopInfo = () => {
    return service({
        method: 'get',
        url: '/store/loadShopInfo',
    })
}
