order.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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) {
  13. return request({
  14. url: '/api/coupons/order/'+price,
  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 order_comment(data) {
  30. return request({
  31. url: '/api/order/comment',
  32. method: 'post',
  33. data
  34. });
  35. }
  36. //订单产品信息
  37. export function product(data) {
  38. return request({
  39. url: '/api/order/product',
  40. method: 'post',
  41. data
  42. });
  43. }
  44. // 快递查询
  45. export function express_query(data) {
  46. return request({
  47. url: '/api/order/express_query',
  48. method: 'get',
  49. data
  50. });
  51. }
  52. //上传图片
  53. export function upload(data) {
  54. return upFilse({
  55. url: '/api/upload/image',
  56. method: 'post',
  57. data
  58. });
  59. }
  60. // 订单列表
  61. export function orderList(data) {
  62. return request({
  63. url: '/api/order/list',
  64. method: 'get',
  65. data
  66. });
  67. }
  68. export function dfOrderList(data) {
  69. return request({
  70. url: '/api/paying/lst',
  71. method: 'get',
  72. data
  73. });
  74. }
  75. // 订单详细
  76. export function orderDetail(data,orderid) {
  77. return request({
  78. url: '/api/order/detail/'+orderid,
  79. method: 'get',
  80. data
  81. });
  82. }
  83. // 取消订单
  84. export function orderCancel(data) {
  85. return request({
  86. url: '/api/order/cancel',
  87. method: 'post',
  88. data
  89. });
  90. }
  91. // 删除订单
  92. export function orderDel(data) {
  93. return request({
  94. url: '/api/order/del',
  95. method: 'get',
  96. data
  97. });
  98. }
  99. // 申请退款
  100. export function refund(data) {
  101. return request({
  102. url: '/api/order/refund/verify',
  103. method: 'post',
  104. data
  105. });
  106. }
  107. // 退款理由列表
  108. export function refundReason(data) {
  109. return request({
  110. url: '/api/order/refund/reason',
  111. method: 'get',
  112. data
  113. });
  114. }
  115. // 确认收货
  116. export function orderTake(data) {
  117. return request({
  118. url: '/api/order/take',
  119. method: 'post',
  120. data
  121. });
  122. }
  123. // 订单支付
  124. export function orderPay(data) {
  125. return request({
  126. url: '/api/order/pay',
  127. method: 'post',
  128. data
  129. });
  130. }
  131. // 创建订单
  132. export function createOrderkey(data,key) {
  133. return request({
  134. url: '/api/order/create/'+key,
  135. method: 'post',
  136. data
  137. });
  138. }
  139. // 统计订单金额
  140. export function computedOrderkey(data) {
  141. return request({
  142. url: '/api/order/computed/'+data.orderkey,
  143. method: 'post',
  144. data
  145. });
  146. }
  147. export function storeList(data) {
  148. return request({
  149. url: '/api/store_list',
  150. method: 'get',
  151. data
  152. });
  153. }
  154. export function createPaying(data) {
  155. return request({
  156. url: '/api/paying/pying',
  157. method: 'post',
  158. data
  159. });
  160. }
  161. //paying/pay
  162. export function payingPay(data) {
  163. return request({
  164. url: '/api/paying/pay',
  165. method: 'post',
  166. data
  167. });
  168. }
  169. export function payingInfo(data) {
  170. // paying/info
  171. return request({
  172. url: '/api/paying/info',
  173. method: 'get',
  174. data
  175. });
  176. }