order.js 1.6 KB

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