order.js 738 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import request from '@/sheep/request';
  2. const PayOrderApi = {
  3. // 获得支付订单
  4. getOrder: (id) => {
  5. return request({
  6. url: '/pay/order/get',
  7. method: 'GET',
  8. params: { id }
  9. });
  10. },
  11. // 获得支付后的订单条件
  12. getByStatus: (id) => {
  13. return request({
  14. url: '/trade/order/getPayOrderByStatus',
  15. method: 'GET',
  16. params: { id }
  17. });
  18. },
  19. getPayOrder: (tradeOrderId) => {
  20. return request({
  21. url: '/trade/order/getPayOrder',
  22. method: 'GET',
  23. params: { tradeOrderId }
  24. });
  25. },
  26. // 提交支付订单
  27. submitOrder: (data) => {
  28. return request({
  29. url: '/pay/order/submit',
  30. method: 'POST',
  31. data
  32. });
  33. }
  34. };
  35. export default PayOrderApi;