shop.js 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import request from "@/utils/request.js";
  2. //积分商品分类
  3. export function getShopType(data) {
  4. return request({
  5. method: 'get',
  6. url: '/product/category/list',
  7. data
  8. });
  9. }
  10. // 积分商品列表
  11. export function getPointShopList(data) {
  12. console.log(data)
  13. // 模拟数据返回
  14. return new Promise((resolve, reject) => {
  15. setTimeout(() => {
  16. const mockData = {
  17. "code": 200,
  18. "msg": "操作成功",
  19. "data": {
  20. "records": [
  21. {
  22. id: 1,
  23. name: '广誉源会员定制玻璃杯1',
  24. pricePoint: '10元+1000积分',
  25. priceMoney: '100',
  26. sales: 10,
  27. productMainImage: 'https://test.baoxianzhanggui.com/nightFragrance/profile/upload/2025/01/03/b43f6087c815cdab8828eb68529d96bc73203b941ab71e-xrpfmn_fw1200webp_20250103175413A002.png'
  28. },
  29. {
  30. id: 2,
  31. name: '广誉源会员定制玻璃杯2',
  32. pricePoint: '10元+1000积分',
  33. priceMoney: '100',
  34. sales: 10,
  35. productMainImage: 'https://test.baoxianzhanggui.com/nightFragrance/profile/upload/2025/01/03/b43f6087c815cdab8828eb68529d96bc73203b941ab71e-xrpfmn_fw1200webp_20250103175413A002.png'
  36. },
  37. {
  38. id: 3,
  39. name: '广誉源会员定制玻璃杯3',
  40. pricePoint: '10元+1000积分',
  41. priceMoney: '100',
  42. sales: 10,
  43. productMainImage: 'https://test.baoxianzhanggui.com/nightFragrance/profile/upload/2025/01/03/b43f6087c815cdab8828eb68529d96bc73203b941ab71e-xrpfmn_fw1200webp_20250103175413A002.png'
  44. },
  45. {
  46. id: 4,
  47. name: '广誉源会员定制玻璃杯',
  48. pricePoint: '10元+1000积分',
  49. priceMoney: '100',
  50. sales: 10,
  51. productMainImage: 'https://test.baoxianzhanggui.com/nightFragrance/profile/upload/2025/01/03/b43f6087c815cdab8828eb68529d96bc73203b941ab71e-xrpfmn_fw1200webp_20250103175413A002.png'
  52. },
  53. {
  54. id: 5,
  55. name: '广誉源会员定制玻璃杯',
  56. pricePoint: '10元+1000积分',
  57. priceMoney: '100',
  58. sales: 10,
  59. productMainImage: 'https://test.baoxianzhanggui.com/nightFragrance/profile/upload/2025/01/03/b43f6087c815cdab8828eb68529d96bc73203b941ab71e-xrpfmn_fw1200webp_20250103175413A002.png'
  60. },
  61. ],
  62. "total": 2,
  63. "size": 10,
  64. "current": 1,
  65. "orders": [],
  66. "optimizeCountSql": true,
  67. "searchCount": true,
  68. "countId": null,
  69. "maxLimit": null,
  70. "pages": 1
  71. }
  72. }
  73. resolve(mockData);
  74. }, 800);
  75. });
  76. // 真实API调用
  77. /*
  78. return request({
  79. method: 'get',
  80. url: '/api/order/v1/wx/getOrder',
  81. data
  82. });
  83. */
  84. }