order.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. import request from '@/utils/request'
  2. import {upFilse} from '@/utils/request'
  3. // 订单确认
  4. export function confirm(data) {
  5. return request({
  6. url: '/api/order/confirm',
  7. method: 'post',
  8. data
  9. });
  10. }
  11. //获取可使用优惠券
  12. export function couponsOrder(data,price,id) {
  13. return request({
  14. url: '/api/coupons/order/'+price+'/'+id,
  15. method: 'get',
  16. data
  17. });
  18. }
  19. //获取优惠券列表
  20. export function getCouponsList(data,types) {
  21. //优惠券状态 0全部 1未使用 2已使用
  22. return request({
  23. url: '/api/coupons/user/'+types,
  24. method: 'get',
  25. data
  26. });
  27. }
  28. // 优惠券详情
  29. export function CouponsDetails(data) {
  30. return request({
  31. url: '/api/coupons/details',
  32. method: 'get',
  33. data
  34. })
  35. }
  36. //提交评论
  37. export function order_comment(data) {
  38. return request({
  39. url: '/api/order/comment',
  40. method: 'post',
  41. data
  42. });
  43. }
  44. //订单产品信息
  45. export function product(data) {
  46. return request({
  47. url: '/api/order/product',
  48. method: 'post',
  49. data
  50. });
  51. }
  52. // 快递查询
  53. export function express(data) {
  54. return request({
  55. url: '/api/order/express',
  56. method: 'get',
  57. data
  58. });
  59. }
  60. //上传图片
  61. export function upload(data) {
  62. return upFilse({
  63. url: '/api/upload/image',
  64. method: 'post',
  65. data
  66. });
  67. }
  68. // 订单列表
  69. export function orderList(data) {
  70. return request({
  71. url: '/api/order/list',
  72. method: 'get',
  73. data
  74. });
  75. }
  76. // 订单详细
  77. export function orderDetail(data,orderid) {
  78. return request({
  79. url: '/api/order/detail/'+orderid,
  80. method: 'get',
  81. data
  82. });
  83. }
  84. // 取消订单
  85. export function orderCancel(data) {
  86. return request({
  87. url: '/api/order/cancel',
  88. method: 'post',
  89. data
  90. });
  91. }
  92. // 删除订单
  93. export function orderDel(data) {
  94. return request({
  95. url: '/api/order/del',
  96. method: 'get',
  97. data
  98. });
  99. }
  100. // 申请退款
  101. export function refund(data) {
  102. return request({
  103. url: '/api/order/refund/verify',
  104. method: 'post',
  105. data
  106. });
  107. }
  108. // 退款理由列表
  109. export function refundReason(data) {
  110. return request({
  111. url: '/api/order/refund/reason',
  112. method: 'get',
  113. data
  114. });
  115. }
  116. // 确认收货
  117. export function orderTake(data) {
  118. return request({
  119. url: '/api/order/take',
  120. method: 'post',
  121. data
  122. });
  123. }
  124. // 订单支付
  125. export function orderPay(data) {
  126. return request({
  127. url: '/api/order/pay',
  128. method: 'post',
  129. data
  130. });
  131. }
  132. // 创建订单
  133. export function createOrderkey(data,key) {
  134. return request({
  135. url: '/api/order/create/'+key,
  136. method: 'post',
  137. data
  138. });
  139. }
  140. // 统计订单金额
  141. export function computedOrderkey(data) {
  142. return request({
  143. url: '/api/order/computed/'+data.orderkey,
  144. method: 'post',
  145. data
  146. });
  147. }
  148. // 优惠券首页门店列表
  149. export function sycoustore(data) {
  150. return request({
  151. url: '/api/sycoustore',
  152. method: 'get',
  153. data
  154. });
  155. }
  156. // 优惠券门店列表
  157. export function coustore(data) {
  158. return request({
  159. url: '/api/coustore',
  160. method: 'get',
  161. data
  162. });
  163. }