goods.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import request from '@/services/http.request.js'
  2. /* 获取商品列表 */
  3. export function fetchProductList(params) {
  4. return request({
  5. url: '/product/list',
  6. method: 'GET',
  7. params
  8. })
  9. }
  10. /* 查询商品详情 */
  11. export function fetchProductDetail(params) {
  12. return request({
  13. url: '/product/details',
  14. method: 'GET',
  15. params
  16. })
  17. }
  18. /* 获取商品搜索记录 */
  19. export function fetchProductSearchHistory(params) {
  20. return request({
  21. url: '/product/search/history',
  22. method: 'GET',
  23. params
  24. })
  25. }
  26. /* 清除商品搜索记录 */
  27. export function clearProductSearchHistory(params) {
  28. return request({
  29. url: '/product/delete/history',
  30. method: 'GET',
  31. params
  32. })
  33. }
  34. /* 活动专区(分销者) */
  35. export function fetchProductActivityAreaList(params) {
  36. return request({
  37. url: '/product/activity/list',
  38. method: 'GET',
  39. params
  40. })
  41. }
  42. /* 活动商品列表(分销者) */
  43. export function fetchProductActivityDetail(params) {
  44. return request({
  45. url: '/product/activity/details',
  46. method: 'GET',
  47. params
  48. })
  49. }
  50. /* 获取一级商品分类列表 */
  51. export function fetchProductTypeFirst(params) {
  52. return request({
  53. url: '/product/classify',
  54. method: 'GET',
  55. params
  56. })
  57. }
  58. /* 获取二级商品分类列表 */
  59. export function fetchProductTypeSecond(params) {
  60. return request({
  61. url: '/product/type/second',
  62. method: 'GET',
  63. params
  64. })
  65. }