2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: request supports user.js by holding or executing the request page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
const request = require('../utils/request')
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: listUsers supports user.js by holding or executing the list users page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
listUsers(params) {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/user/list',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: listAllUsers supports user.js by holding or executing the list all users page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
listAllUsers() {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/user/list/all'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: listArtists supports user.js by holding or executing the list artists page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
listArtists(shopId) {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/user/list/artists',
|
|
|
|
|
params: shopId ? { shopId } : undefined
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: createUser supports user.js by holding or executing the create user page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
createUser(data) {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/user/create',
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: updateUser supports user.js by holding or executing the update user page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
updateUser(id, data) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/user/update/${id}`,
|
|
|
|
|
method: 'PUT',
|
|
|
|
|
data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: updateUserStatus supports user.js by holding or executing the update user status page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
updateUserStatus(id, status) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/user/status/${id}`,
|
|
|
|
|
method: 'PUT',
|
|
|
|
|
data: {
|
|
|
|
|
status
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: deleteUser supports user.js by holding or executing the delete user page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
deleteUser(id) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/user/delete/${id}`,
|
|
|
|
|
method: 'DELETE'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: unbindUser supports user.js by holding or executing the unbind user page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
unbindUser(id) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/user/unbind/${id}`,
|
|
|
|
|
method: 'PUT',
|
|
|
|
|
data: {}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: resetPassword supports user.js by holding or executing the reset password page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
resetPassword(id) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/user/reset-password/${id}`,
|
|
|
|
|
method: 'POST'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: getCurrentUserInfo supports user.js by holding or executing the get current user info page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
getCurrentUserInfo() {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/user/info'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: getUserAsset supports user.js by holding or executing the get user asset page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
getUserAsset(id) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/user/${id}/asset`
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: getUserBalanceHistory supports user.js by holding or executing the get user balance history page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
getUserBalanceHistory(id) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/user/${id}/balance/history`
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: changeUserBalance supports user.js by holding or executing the change user balance page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
changeUserBalance(id, data) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/user/${id}/balance/change`,
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: overrideUserVip supports user.js by holding or executing the override user vip page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
overrideUserVip(id, data) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/user/${id}/vip/override`,
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: recalculateUserVip supports user.js by holding or executing the recalculate user vip page or API role.
|
|
|
|
|
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
*/
|
2026-04-20 16:02:57 +08:00
|
|
|
recalculateUserVip(id) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/user/${id}/vip/recalculate`,
|
|
|
|
|
method: 'POST'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|