import createAxios from '/@/utils/axios'

export const url = '/admin/user.User/'

export function getWallet(id: string | number) {
    return createAxios({
        url: url + 'wallet',
        method: 'get',
        params: {
            id,
        },
    })
}

export function postWallet(id: string | number, score: string | number, memo: string = '管理员手动调整') {
    const formData = new FormData()
    formData.append('id', String(id))
    formData.append('score', String(score))
    formData.append('memo', String(memo))
    return createAxios({
        url: url + 'wallet',
        method: 'post',
        data: formData,
    }, {
        showSuccessMessage: true,
    })
}
