rent.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. import request from "@/utils/request.js";
  2. /**
  3. * 获取车辆列表
  4. * @param data object
  5. */
  6. export function getCarList(data) {
  7. return request.get(
  8. "v3/rent", data
  9. );
  10. }
  11. /**
  12. * 获取车辆详情
  13. * @param data object
  14. */
  15. export function getCarDetail(data) {
  16. return request.get(
  17. `v3/rent/${data.id}`
  18. );
  19. }
  20. /**
  21. * 创建订单
  22. * @param data object
  23. */
  24. export function postCarCreate(data) {
  25. return request.post(
  26. `v3/rent/create`, data
  27. );
  28. }
  29. /**
  30. * 订单状态查询
  31. * @param data object
  32. */
  33. export function getOrderStatus(id) {
  34. return request.get(
  35. `v3/rentinfo/detail/${id}`
  36. );
  37. }
  38. /**
  39. * 订单列表
  40. * @param data object
  41. */
  42. export function getRentOrder(data) {
  43. return request.get(
  44. `v3/rent/order`, data
  45. );
  46. }
  47. /**
  48. * 订单统计数据
  49. * @param data object
  50. */
  51. export function getRentOrderData(data) {
  52. return request.get(
  53. `v3/rent/order_data`, data
  54. );
  55. }
  56. /**
  57. * 订单详情
  58. * @param data object
  59. */
  60. export function getRentOrderDteail(id) {
  61. return request.get(
  62. `v3/rent/order_detail/${id}`
  63. );
  64. }
  65. /**
  66. * 订单支付
  67. * @param data object
  68. */
  69. export function postRentPay(data) {
  70. return request.post(
  71. `v3/rent/pay`, data
  72. );
  73. }
  74. /**
  75. * 绑定车辆
  76. * @param data object
  77. */
  78. export function rentSetcar(data) {
  79. return request.post(
  80. `v3/rent/setcar`, data
  81. );
  82. }
  83. /**
  84. * 获取我的车辆
  85. * @param data object
  86. * {
  87. * status:unlock开锁,lock关锁,deblock解锁,cushion开坐垫,find寻车
  88. *}
  89. */
  90. export function getMyCar(data) {
  91. return request.get(
  92. `v3/car/my`, data
  93. );
  94. }
  95. /**
  96. * 发送车辆指令
  97. * @param data object
  98. */
  99. export function getLock(data) {
  100. return request.get(
  101. `v3/car/control/${data.type}`, data
  102. );
  103. }
  104. /**
  105. * 车辆控制记录
  106. * @param data object
  107. * {
  108. type:auth授权record行程notice报警record_charge收费position当前车辆信息
  109. }
  110. *
  111. */
  112. export function getOneinfo(data) {
  113. return request.get(
  114. `v3/car/oneinfo/${data.type}`, data
  115. );
  116. }
  117. /**
  118. * 车辆行车记录
  119. * @param data object
  120. */
  121. export function getRouterDetail(data) {
  122. return request.get(
  123. `v3/car/onedetail/${data.type}`, data
  124. );
  125. }
  126. /**
  127. * 车辆授权
  128. * @param data object
  129. */
  130. export function postCarAuth(data) {
  131. return request.post(
  132. `v3/car/auth/0`, data
  133. );
  134. }
  135. /**
  136. * 撤销车辆授权
  137. * @param data object
  138. */
  139. export function deleteCarAuth(data) {
  140. return request.delete(
  141. `v3/car/auth/${data.id}`, data
  142. );
  143. }
  144. /**
  145. * 门店扫码授权
  146. * @param data object
  147. */
  148. export function postSetCarCode(data) {
  149. return request.post(
  150. `store/qrcar`, data
  151. );
  152. }
  153. /**
  154. * 门店车辆
  155. * @param data object
  156. */
  157. export function postStoreCarCode(data) {
  158. return request.post(
  159. `store/car`, data
  160. );
  161. }
  162. /**
  163. * 门店流水
  164. * @param data object
  165. */
  166. export function getStoreBill(data) {
  167. return request.get(
  168. `store/bill`, data
  169. );
  170. }
  171. /**
  172. * 门店信息
  173. * @param data object
  174. */
  175. export function postStoreMy(data) {
  176. return request.get(
  177. `store/my`, data
  178. );
  179. }
  180. /**
  181. * 门店提现
  182. * @param data object
  183. */
  184. export function postStoreCase(data) {
  185. return request.post(
  186. `store/case`, data
  187. );
  188. }
  189. /**
  190. * 出资人库存
  191. * @param data object
  192. */
  193. export function postSponsorCar(data) {
  194. return request.post(
  195. `sponsor/car_stock`, data
  196. );
  197. }
  198. /**
  199. * 出资人流水
  200. * @param data object
  201. */
  202. export function getSponsorbill(data) {
  203. return request.post(
  204. `sponsor/bill`, data
  205. );
  206. }
  207. /**
  208. * 门店申请
  209. * @param data object
  210. */
  211. export function storeApply(data) {
  212. return request.get(
  213. `store/apply`, data
  214. );
  215. }
  216. /**
  217. * 申请详情
  218. * @param data object
  219. */
  220. export function getStoreApplyId(data) {
  221. return request.get(
  222. `v3/store/apply/${data.id}`, data
  223. );
  224. }
  225. /**
  226. * 申请提交
  227. * @param data object
  228. */
  229. export function postStoreApplyId(data) {
  230. return request.post(
  231. `store/apply/${data.id}`, data
  232. );
  233. }
  234. /**
  235. * 申请撤销
  236. * @param data object
  237. */
  238. export function delStoreApplyId(data) {
  239. return request.delete(
  240. `store/apply/${data.id}`, data
  241. );
  242. }