order.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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 couponsOrder(data, price) {
  15. return request({
  16. url: '/api/coupons/order/' + price,
  17. method: 'get',
  18. data
  19. });
  20. }
  21. //获取优惠券列表
  22. export function getCouponsList(data, types) {
  23. //优惠券状态 0全部 1未使用 2已使用
  24. return request({
  25. url: '/api/coupons/user/' + types,
  26. method: 'get',
  27. data
  28. });
  29. }
  30. //提交评论
  31. export function order_comment(data) {
  32. return request({
  33. url: '/api/order/comment',
  34. method: 'post',
  35. data
  36. });
  37. }
  38. //订单产品信息
  39. export function product(data) {
  40. return request({
  41. url: '/api/order/product',
  42. method: 'post',
  43. data
  44. });
  45. }
  46. // 快递查询
  47. export function express_query(data) {
  48. return request({
  49. url: '/api/order/express_query',
  50. method: 'get',
  51. data
  52. });
  53. }
  54. //上传图片
  55. export function upload(data) {
  56. return upFilse({
  57. url: '/api/upload/image',
  58. method: 'post',
  59. data
  60. });
  61. }
  62. // 订单列表
  63. export function orderList(data) {
  64. return request({
  65. url: '/api/order/list',
  66. method: 'get',
  67. data
  68. });
  69. }
  70. // 订单详细
  71. export function orderDetail(data, orderid) {
  72. return request({
  73. url: '/api/order/detail/' + orderid,
  74. method: 'get',
  75. data
  76. });
  77. }
  78. // 取消订单
  79. export function orderCancel(data) {
  80. return request({
  81. url: '/api/order/cancel',
  82. method: 'post',
  83. data
  84. });
  85. }
  86. // 删除订单
  87. export function orderDel(data) {
  88. return request({
  89. url: '/api/order/del',
  90. method: 'get',
  91. data
  92. });
  93. }
  94. // 申请退款
  95. export function refund(data) {
  96. return request({
  97. url: '/api/order/refund/verify',
  98. method: 'post',
  99. data
  100. });
  101. }
  102. // 退款理由列表
  103. export function refundReason(data) {
  104. return request({
  105. url: '/api/order/refund/reason',
  106. method: 'get',
  107. data
  108. });
  109. }
  110. // 确认收货
  111. export function orderTake(data) {
  112. return request({
  113. url: '/api/order/take',
  114. method: 'post',
  115. data
  116. });
  117. }
  118. // 订单支付
  119. export function orderPay(data) {
  120. return request({
  121. url: '/api/order/pay',
  122. method: 'post',
  123. data
  124. });
  125. }
  126. // 创建订单
  127. export function createOrderkey(data, key) {
  128. return request({
  129. url: '/api/order/create/' + key,
  130. method: 'post',
  131. data
  132. });
  133. }
  134. // 统计订单金额
  135. export function computedOrderkey(data) {
  136. return request({
  137. url: '/api/order/computed/' + data.orderkey,
  138. method: 'post',
  139. data
  140. });
  141. }
  142. // 通过审核
  143. export function adopt(data) {
  144. return request({
  145. url: '/api/auction/adopt',
  146. method: 'post',
  147. data
  148. });
  149. }
  150. //买单订单列表
  151. export function user_auction_order(data) {
  152. return request({
  153. url: '/api/auction/user_auction_order',
  154. method: 'get',
  155. data
  156. });
  157. }
  158. //卖单订单列表
  159. export function seller(data) {
  160. return request({
  161. url: '/api/auction/seller',
  162. method: 'get',
  163. data
  164. });
  165. }
  166. // 上传凭证
  167. export function up_image(data) {
  168. return request({
  169. url: '/api/auction/up_image',
  170. method: 'post',
  171. data
  172. });
  173. }
  174. // 修改凭证
  175. export function edit_voucher(data) {
  176. return request({
  177. url: '/api/edit_voucher',
  178. method: 'post',
  179. data
  180. });
  181. }
  182. // 取消挂售
  183. export function cancel(data) {
  184. return request({
  185. url: '/api/auction/cancel',
  186. method: 'post',
  187. data
  188. });
  189. }
  190. //判断是否有新订单
  191. export function untreated(data) {
  192. return request({
  193. url: '/api/auction/untreated',
  194. method: 'get',
  195. data
  196. });
  197. }
  198. //申诉
  199. export function plead(data) {
  200. return request({
  201. url: '/api/auction/plead',
  202. method: 'post',
  203. data
  204. });
  205. }
  206. //撤销申诉
  207. export function revoke(data) {
  208. return request({
  209. url: '/api/auction/revoke',
  210. method: 'post',
  211. data
  212. });
  213. }
  214. // 获取时间
  215. export function time(data) {
  216. return request({
  217. url: '/api/time',
  218. method: 'get',
  219. data
  220. });
  221. }