comment.js 678 B

123456789101112131415161718192021222324252627
  1. import request from "@/utils/request.js";
  2. // 获得商品的评价统计
  3. export function getCommentStatistics(spuId) {
  4. return request.get('app-api/product/comment/statistics', {
  5. spuId
  6. }, {
  7. noAuth: true // TODO 芋艿:后续要做调整
  8. });
  9. }
  10. // 获得最近的 n 条商品评价
  11. export function getCommentList(spuId, count) {
  12. return request.get('app-api/product/comment/list', {
  13. spuId,
  14. count
  15. }, {
  16. noAuth: true // TODO 芋艿:后续要做调整
  17. });
  18. }
  19. // 获得商品评价分页
  20. export function getCommentPage(data) {
  21. return request.get('app-api/product/comment/page', data, {
  22. noAuth: true // TODO 芋艿:后续要做调整
  23. });
  24. }