station.js 889 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * 交♂易相关API
  3. */
  4. import { http, Method } from "@/utils/request.js";
  5. import { encodeURL } from "@/api/common";
  6. import api from "../config/api";
  7. /**
  8. * 获取购物车列表
  9. * @param show_type 要显示的类型 all:全部 checked:已选中的
  10. */
  11. export function getStations(params) {
  12. let path = "/mp/v1/geo/geoStationList";
  13. const url = encodeURL(path, params);
  14. return http.request({
  15. url: url,
  16. method: "get",
  17. });
  18. }
  19. /**
  20. * 获取充电站详情
  21. * @param stationId 充电站id
  22. */
  23. export function getStation(stationId) {
  24. return http.request({
  25. url: '/mp/v1/station/' + stationId,
  26. method: Method.GET,
  27. });
  28. }
  29. /**
  30. * 获取充电接口详情
  31. * @param connectorId 充电接口id
  32. */
  33. export function getConnector(params) {
  34. return http.request({
  35. url: '/mp/v1/charge/order/prepareOrderInfo',
  36. method: Method.GET,
  37. params: params,
  38. });
  39. }