comment.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import request from '@/utils/request'
  2. // 查询评论列表
  3. export function listComment(query) {
  4. return request({
  5. url: '/tCommentUser/selectAll',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询评论详细
  11. export function getComment(cId) {
  12. return request({
  13. url: '/system/comment/' + cId,
  14. method: 'get'
  15. })
  16. }
  17. // 新增评论
  18. export function addComment(data) {
  19. return request({
  20. url: '/system/comment',
  21. method: 'post',
  22. data: data
  23. })
  24. }
  25. // 修改评论
  26. export function updateComment(data) {
  27. return request({
  28. url: '/system/comment',
  29. method: 'put',
  30. data: data
  31. })
  32. }
  33. // 删除评论
  34. export function delComment(data) {
  35. return request({
  36. url: '/tCommentUser/delete',
  37. method: 'delete',
  38. data: data
  39. })
  40. }
  41. // 审核评论
  42. export function auditComment(data) {
  43. return request({
  44. url: '/tCommentUser/audit',
  45. method: 'post',
  46. data: data
  47. })
  48. }
  49. // 批量审核评论
  50. export function batchAuditComment(data) {
  51. return request({
  52. url: '/tCommentUser/batchAudit',
  53. method: 'post',
  54. data: data
  55. })
  56. }
  57. // 查询评论状态数量
  58. export function auditStatusCount() {
  59. return request({
  60. url: '/tCommentUser/auditStatusCount',
  61. method: 'get',
  62. })
  63. }