order.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. // 获得支付后的订单条件2 实际用的
  20. getByStatus2: (id) => {
  21. return request({
  22. url: '/trade/order/getPayOrderByStatus2',
  23. method: 'GET',
  24. params: { id }
  25. });
  26. },
  27. // 富友微信jsapi支付成功
  28. getFuYouPayOrderByStatus: (payOrderNo) => {
  29. return request({
  30. url: '/trade/order/getFuYouPayOrderByStatus',
  31. method: 'GET',
  32. params: { payOrderNo }
  33. });
  34. },
  35. getPayOrder: (tradeOrderId) => {
  36. return request({
  37. url: '/trade/order/getPayOrder',
  38. method: 'GET',
  39. params: { tradeOrderId }
  40. });
  41. },
  42. // 提交支付订单
  43. submitOrder: (data) => {
  44. return request({
  45. url: '/pay/order/submit',
  46. method: 'POST',
  47. data
  48. });
  49. },
  50. // 第三方富友支付
  51. fuYouSubmitOrder: (data) => {
  52. return request({
  53. url: '/fuYou/pay/order/submit',
  54. method: 'POST',
  55. data
  56. });
  57. }
  58. };
  59. export default PayOrderApi;