api_community.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. import $http from "./request/requestConfig"
  2. import {
  3. BASE_URI
  4. } from "../pages/utils/constant.js";
  5. const pubCommunity = '/wx/PubCommunity'
  6. const auth = '/wx/homeActivity'
  7. const controller = '/wx/periphery'
  8. export function list(data) {
  9. return $http.post(
  10. BASE_URI + auth + '/list',
  11. data, {}
  12. )
  13. }
  14. export function searchAllInfo(data) {
  15. return $http.post(
  16. BASE_URI + auth + '/searchAllInfo',
  17. data, {}
  18. )
  19. }
  20. export function getCommunityActivityById(id, createdBy) {
  21. return $http.post(
  22. BASE_URI + auth + '/getCommunityActivityById?id=' + id + '&createdBy=' + createdBy,
  23. {}, {}
  24. )
  25. }
  26. export function clickCollect(data) {
  27. return $http.post(
  28. BASE_URI + auth + '/clickCollect',
  29. data, {}
  30. )
  31. }
  32. export function listPubCommunity(data) {
  33. return $http.post(
  34. BASE_URI + pubCommunity + '/listPubCommunity',
  35. data, {}
  36. )
  37. }
  38. export function listPubCommunityByFrameUser(data) {
  39. return $http.post(
  40. BASE_URI + pubCommunity + '/listPubCommunityByFrameUser',
  41. data, {}
  42. )
  43. }
  44. export function selectStreetCommunityByFrameUser(data) {
  45. return $http.post(
  46. BASE_URI + pubCommunity + '/selectStreetCommunityByFrameUser',
  47. data, {}
  48. )
  49. }
  50. export function selectCommunityEstateByFrameUser(data) {
  51. return $http.post(
  52. BASE_URI + pubCommunity + '/selectCommunityEstateByFrameUser',
  53. data, {}
  54. )
  55. }
  56. export function updateRegistration(data) {
  57. return $http.post(
  58. BASE_URI + auth + '/updateRegistration',
  59. data, {}
  60. )
  61. }
  62. export function updateSignIn(data) {
  63. return $http.post(
  64. BASE_URI + auth + '/updateSignIn',
  65. data, {}
  66. )
  67. }
  68. export function getListByUserId(data) {
  69. return $http.post(
  70. BASE_URI + auth + '/getListByUserId',
  71. data, {}
  72. )
  73. }
  74. export function getBmListByUserId(data) {
  75. return $http.post(
  76. BASE_URI + auth + '/getBmListByUserId',
  77. data, {}
  78. )
  79. }
  80. export function updateSignInEvaluate(data) {
  81. return $http.post(
  82. BASE_URI + auth + '/updateSignInEvaluate',
  83. data, {}
  84. )
  85. }
  86. export function insertHomeCommunityActivity(data) {
  87. return $http.post(
  88. BASE_URI + auth + '/insertHomeCommunityActivity',
  89. data, {}
  90. )
  91. }
  92. export function getHomeCommunityActivityIsValid(data) {
  93. return $http.post(
  94. BASE_URI + auth + '/getHomeCommunityActivityIsValid',
  95. data, {}
  96. )
  97. }
  98. export function getHomeCommunityActivityById(data) {
  99. return $http.post(
  100. BASE_URI + auth + '/getHomeCommunityActivityById',
  101. data, {}
  102. )
  103. }
  104. export function editHomeCommunityActivity(data) {
  105. return $http.post(
  106. BASE_URI + auth + '/editHomeCommunityActivity',
  107. data, {}
  108. )
  109. }
  110. export function listHomeCommunityActivity(data) {
  111. return $http.post(
  112. BASE_URI + auth + '/listHomeCommunityActivity',
  113. data, {}
  114. )
  115. }
  116. export function compareDate(start, end) {
  117. const startDate = new Date(start)
  118. const endDate = new Date(end)
  119. if (startDate.getTime() > endDate.getTime()) {
  120. return true
  121. } else {
  122. return false
  123. }
  124. }