2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: request supports comment.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-05-16 14:28:42 +08:00
|
|
|
const request = require('../utils/request')
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: listComments supports comment.js by holding or executing the list comments 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-05-16 14:28:42 +08:00
|
|
|
listComments(params) {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/comment/list',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* Purpose: deleteComment supports comment.js by holding or executing the delete comment 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-05-16 14:28:42 +08:00
|
|
|
deleteComment(id) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/comment/delete/${id}`,
|
|
|
|
|
method: 'DELETE'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|