feat(user): 添加用户钱包功能和成员推广弹窗
This commit is contained in:
26
web/src/api/backend/user/wallet.ts
Normal file
26
web/src/api/backend/user/wallet.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
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) {
|
||||
const formData = new FormData()
|
||||
formData.append('id', String(id))
|
||||
formData.append('score', String(score))
|
||||
return createAxios({
|
||||
url: url + 'wallet',
|
||||
method: 'post',
|
||||
data: formData,
|
||||
}, {
|
||||
showSuccessMessage: true,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user