order.js 3.4 KB

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