index.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. import request from '../utils/request.js';
  2. import requestWhite from '../utils/requestWhite.js';
  3. import Qs from 'qs';
  4. export function scanCode(res) {
  5. // res="jp_team51_charge_id:A_11111"
  6. var str1 = res.slice(0,19);
  7. var str2 = res.slice(20,21);
  8. var id = res.slice(22);
  9. if(str == 'jp_team51_charge_id') {
  10. if(str == 'A') {
  11. uni.navigateTo({
  12. url: '/pages/searchPile/stationAndPile/stationDetails?id=' + id
  13. })
  14. }
  15. }
  16. }
  17. export function activityInfoList(data) {
  18. return requestWhite({
  19. method: 'post',
  20. data: data,
  21. url: '/mobile/activityInfo/activityInfoList'
  22. })
  23. }
  24. export function test(data) {
  25. return request({
  26. method: 'post',
  27. data: data,
  28. url: '/test/post'
  29. })
  30. }
  31. export function chargingData(data) {
  32. return request({
  33. method: 'post',
  34. data: data,
  35. url: '/mobile/charging/chargingData'
  36. })
  37. }
  38. export function marketingData(data) {
  39. return request({
  40. method: 'post',
  41. data: data,
  42. url: '/mobile/charging/marketingData'
  43. })
  44. }
  45. export function findChargeData(data) {
  46. return request({
  47. method: 'get',
  48. data: data,
  49. url: '/mobile/regUser/findChargeData'
  50. })
  51. }
  52. export function personalCenter(data) {
  53. return request({
  54. method: 'post',
  55. data: data,
  56. url: '/mobile/regUser/personalCenter'
  57. })
  58. }
  59. export function logout(data) {
  60. return request({
  61. method: 'get',
  62. data: data,
  63. url: '/mobile/regUser/logout'
  64. })
  65. }
  66. export function stopCharging(data) {
  67. return request({
  68. method: 'post',
  69. data: data,
  70. url: '/mobile/command/stopCharging'
  71. })
  72. }
  73. export function startCharging(data) {
  74. return request({
  75. method: 'post',
  76. data: data,
  77. url: '/mobile/command/startCharging'
  78. })
  79. }
  80. export function accountRecordData(data) {
  81. return request({
  82. method: 'post',
  83. data: data,
  84. url: '/mobile/accountRecord/accountRecordData'
  85. })
  86. }
  87. export function accountDetail(id) {
  88. return request({
  89. method: 'get',
  90. url: '/mobile/accountRecord/accountDetail?id='+id
  91. })
  92. }
  93. export function chargingRecordData(data) {
  94. return request({
  95. method: 'post',
  96. data: data,
  97. url: '/mobile/chargingRecord/chargingRecordData'
  98. })
  99. }
  100. export function chargingDetail(id) {
  101. return request({
  102. method: 'get',
  103. url: '/mobile/chargingRecord/chargingDetail?id='+id
  104. })
  105. }
  106. export function passengerMessageNoReadNum(data) {
  107. return request({
  108. url: '/mobile/passengerApi/passengerMessageNoReadNum',
  109. data:data,
  110. method: 'post',
  111. })
  112. }
  113. export function chargingDeviceData(data) {
  114. return request({
  115. method: 'post',
  116. data: data,
  117. url: '/mobile/charging/chargingDeviceData'
  118. })
  119. }