api_periphery.js 988 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import $http from "./request/requestConfig"
  2. import {
  3. BASE_URI
  4. } from "../pages/utils/constant.js";
  5. const baseUri = '/smartParkH5Server'
  6. const controller = '/wx/periphery'
  7. export function login(data) {
  8. return $http.post(
  9. '/wx/auth/login_by_app_main?' + qs.stringify(data), {}, {})
  10. }
  11. export function add(data) {
  12. return $http.post(
  13. BASE_URI + controller + '/add',
  14. data, {}
  15. )
  16. }
  17. export function list(data) {
  18. return $http.post(
  19. BASE_URI + controller + '/list',
  20. data, {}
  21. )
  22. }
  23. export function getById(data) {
  24. return $http.post(
  25. BASE_URI + controller + '/getById',
  26. data, {}
  27. )
  28. }
  29. export function edit(data) {
  30. console.log(BASE_URI + controller)
  31. return $http.post(
  32. BASE_URI + controller + '/edit',
  33. data, {}
  34. )
  35. }
  36. export function remove(data) {
  37. return $http.post({
  38. url: BASE_URI + baseUri + controller + '/remove',
  39. method: 'post',
  40. data: data
  41. })
  42. }