order.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. import request from '@/utils/request'
  2. import {upFilse} from '@/utils/request'
  3. // 推广人订单
  4. export function recommen(data) {
  5. return request({
  6. url: '/api/spread/order',
  7. method: 'post',
  8. data
  9. });
  10. }
  11. // 订单确认
  12. export function confirm(data) {
  13. return request({
  14. url: '/api/order/confirm',
  15. method: 'post',
  16. data
  17. });
  18. }
  19. // 订单列表
  20. export function orderList(data) {
  21. return request({
  22. url: '/api/order/list',
  23. method: 'get',
  24. data
  25. });
  26. }
  27. // 订单详细
  28. export function orderDetail(data,orderid) {
  29. return request({
  30. url: '/api/order/detail/'+orderid,
  31. method: 'get',
  32. data
  33. });
  34. }
  35. // 取消订单
  36. export function orderCancel(data) {
  37. return request({
  38. url: '/api/order/cancel',
  39. method: 'post',
  40. data
  41. });
  42. }
  43. //提交评论
  44. export function product(data) {
  45. return request({
  46. url: '/api/order/product',
  47. method: 'post',
  48. data
  49. });
  50. }
  51. // 删除订单
  52. export function orderDel(data) {
  53. return request({
  54. url: '/api/order/del',
  55. method: 'get',
  56. data
  57. });
  58. }
  59. // 申请退款
  60. export function refund(data) {
  61. return request({
  62. url: '/api/order/refund/verify',
  63. method: 'post',
  64. data
  65. });
  66. }
  67. // 退款理由列表
  68. export function refundReason(data) {
  69. return request({
  70. url: '/api/order/refund/reason',
  71. method: 'get',
  72. data
  73. });
  74. }
  75. //上传图片
  76. export function upload(data) {
  77. return upFilse({
  78. url: '/api/upload/image',
  79. method: 'post',
  80. data
  81. });
  82. }
  83. //提交评论
  84. export function order_comment(data) {
  85. return request({
  86. url: '/api/order/comment',
  87. method: 'post',
  88. data
  89. });
  90. }
  91. // 确认收货
  92. export function orderTake(data) {
  93. return request({
  94. url: '/api/order/take',
  95. method: 'post',
  96. data
  97. });
  98. }
  99. /**
  100. * 订单详情
  101. * @param string uni
  102. */
  103. export function getOrderDetail(uni){
  104. return request.get('order/detail/'+uni);
  105. }