goods.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import request from '@/utils/request.js'
  2. //查询商品列表
  3. export const getGoodsList = (data) => {
  4. return request({
  5. url: '/api/v1/wx/mini/product/query',
  6. method: 'post',
  7. data: data,
  8. type: 'application/json'
  9. })
  10. }
  11. // 查询商品详情
  12. export const getGoodsDetail = (data) => {
  13. return request({
  14. url: '/api/v1/wx/mini/product/detail',
  15. method: 'post',
  16. data: data,
  17. type: 'application/x-www-form-urlencoded'
  18. })
  19. }
  20. // 创建订单
  21. export const getOrderCreate = (data) => {
  22. return request({
  23. url: '/api/v1/wx/mini/order/create',
  24. method: 'post',
  25. data: data,
  26. type: 'application/json'
  27. })
  28. }
  29. // 查询订单详情
  30. export const getOrderDetail = (data) => {
  31. return request({
  32. url: '/api/v1/wx/mini/order/detail',
  33. method: 'post',
  34. data: data,
  35. type: 'application/x-www-form-urlencoded'
  36. })
  37. }
  38. // 查询订单列表
  39. export const getOrderList = (data) => {
  40. return request({
  41. url: '/api/v1/wx/mini/order/query',
  42. method: 'post',
  43. data: data,
  44. type: 'application/json'
  45. })
  46. }
  47. // 取消订单
  48. export const getOrderCancel = (data) => {
  49. return request({
  50. url: '/api/v1/wx/mini/order/cancel',
  51. method: 'post',
  52. data: data,
  53. type: 'application/json'
  54. })
  55. }