user.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. import request from '@/utils/request'
  2. // 订单统计信息
  3. export function orderData(data) {
  4. return request({
  5. url: '/api/order/data',
  6. method: 'get',
  7. data
  8. });
  9. }
  10. // 实名认证
  11. export function real_name(data) {
  12. return request({
  13. url: '/api/real_name',
  14. method: 'post',
  15. data
  16. });
  17. }
  18. // 获取用户信息
  19. export function getUserInfo(data) {
  20. return request({
  21. url: '/api/userinfo',
  22. method: 'get',
  23. data
  24. });
  25. }
  26. // 个人中心页数据
  27. export function getUser(data) {
  28. return request({
  29. url: '/api/user',
  30. method: 'get',
  31. data
  32. });
  33. }
  34. // 用户分享图
  35. export function spreadBanner(data) {
  36. return request({
  37. url: '/api/spread/banner',
  38. method: 'get',
  39. data
  40. });
  41. }
  42. // 获取地址列表
  43. export function getAddressList(data) {
  44. return request({
  45. url: '/api/address/list',
  46. method: 'get',
  47. data
  48. });
  49. }
  50. // 修改地址
  51. export function addressEdit(data) {
  52. return request({
  53. url: '/api/address/edit',
  54. method: 'post',
  55. data
  56. });
  57. }
  58. // 删除地址
  59. export function addressDel(data) {
  60. return request({
  61. url: '/api/address/del',
  62. method: 'post',
  63. data
  64. });
  65. }
  66. // 设为默认地址
  67. export function setAddressDefault(data) {
  68. return request({
  69. url: '/api/address/default/set',
  70. method: 'post',
  71. data
  72. });
  73. }
  74. // 购物车列表
  75. export function getCartList(data) {
  76. return request({
  77. url: '/api/cart/list',
  78. method: 'get',
  79. data
  80. });
  81. }
  82. // 修改购物车数量
  83. export function getCartNum(data) {
  84. return request({
  85. url: '/api/cart/num',
  86. method: 'post',
  87. data
  88. });
  89. }
  90. //删除购物车
  91. export function cartDel(data) {
  92. return request({
  93. url: '/api/cart/del',
  94. method: 'post',
  95. data
  96. });
  97. }
  98. //获取收藏夹列表
  99. export function getcollectList(data) {
  100. return request({
  101. url: '/api/collect/user',
  102. method: 'get',
  103. data
  104. });
  105. }
  106. // 取消收藏
  107. export function delcollect(data) {
  108. return request({
  109. url: '/api/collect/del',
  110. method: 'post',
  111. data
  112. });
  113. }
  114. // 获取我的团队
  115. export function spreadPeople(data) {
  116. return request({
  117. url: '/api/spread/people',
  118. method: 'post',
  119. data
  120. });
  121. }
  122. // 获取我的所有车辆包含被授权车辆
  123. export function mycar(data) {
  124. return request({
  125. url: '/api/car/mycar',
  126. method: 'get',
  127. data
  128. });
  129. }
  130. // 获取我的车辆
  131. export function carList(data) {
  132. return request({
  133. url: '/api/car/lst',
  134. method: 'get',
  135. data
  136. });
  137. }
  138. // 获取授权车辆
  139. export function get_touid_car(data) {
  140. return request({
  141. url: '/api/car/get_touid_car',
  142. method: 'post',
  143. data
  144. });
  145. }
  146. // 获取车辆详情
  147. export function getCarInfo(data) {
  148. return request({
  149. url: '/api/car/info',
  150. method: 'get',
  151. data
  152. });
  153. }
  154. // 获取车辆行程记录列表
  155. export function car_record(data) {
  156. return request({
  157. url: '/api/car/car_record',
  158. method: 'post',
  159. data
  160. });
  161. }
  162. // 获取车辆行程记录详细
  163. export function record_info(data) {
  164. return request({
  165. url: '/api/car/record_info',
  166. method: 'get',
  167. data
  168. });
  169. }
  170. // 车锁开关
  171. export function car_switch(data) {
  172. return request({
  173. url: '/api/car/car_switch',
  174. method: 'post',
  175. data
  176. });
  177. }
  178. // 车辆授权
  179. export function add_auth_car(data) {
  180. return request({
  181. url: '/api/car/add_auth_car',
  182. method: 'post',
  183. data
  184. });
  185. }
  186. // 删除授权
  187. export function del_auth_car(data) {
  188. return request({
  189. url: '/api/car/del_auth_car',
  190. method: 'post',
  191. data
  192. });
  193. }
  194. // 车辆授权列表
  195. export function get_auth(data) {
  196. return request({
  197. url: '/api/car/get_auth',
  198. method: 'post',
  199. data
  200. });
  201. }
  202. // 车辆报修
  203. export function create_question(data) {
  204. return request({
  205. url: '/api/car/create_question',
  206. method: 'post',
  207. data
  208. });
  209. }
  210. // 车辆报修详情
  211. export function question_info(data) {
  212. return request({
  213. url: '/api/car/question_info',
  214. method: 'post',
  215. data
  216. });
  217. }
  218. // 车辆报修历史
  219. export function question(data) {
  220. return request({
  221. url: '/api/car/question',
  222. method: 'post',
  223. data
  224. });
  225. }
  226. // 车辆报修评价
  227. export function question_score(data) {
  228. return request({
  229. url: '/api/car/question_score',
  230. method: 'post',
  231. data
  232. });
  233. }
  234. // 撤销报修
  235. export function cancel_question(data) {
  236. return request({
  237. url: '/api/car/cancel_question',
  238. method: 'get',
  239. data
  240. });
  241. }
  242. // 提前还款
  243. export function prepayment(data) {
  244. return request({
  245. url: '/api/car/prepayment',
  246. method: 'post',
  247. data
  248. });
  249. }
  250. // 提前还款
  251. export function getcar_status(data) {
  252. return request({
  253. url: '/api/car/getcar_status',
  254. method: 'get',
  255. data
  256. });
  257. }