import $http from "./request/requestConfig" import { BASE_URI } from "../pages/utils/constant.js"; const pubCommunity = '/wx/PubCommunity' const auth = '/wx/homeActivity' const controller = '/wx/periphery' export function list(data) { return $http.post( BASE_URI + auth + '/list', data, {} ) } export function searchAllInfo(data) { return $http.post( BASE_URI + auth + '/searchAllInfo', data, {} ) } export function getCommunityActivityById(id, createdBy) { return $http.post( BASE_URI + auth + '/getCommunityActivityById?id=' + id + '&createdBy=' + createdBy, {}, {} ) } export function clickCollect(data) { return $http.post( BASE_URI + auth + '/clickCollect', data, {} ) } export function listPubCommunity(data) { return $http.post( BASE_URI + pubCommunity + '/listPubCommunity', data, {} ) } export function listPubCommunityByFrameUser(data) { return $http.post( BASE_URI + pubCommunity + '/listPubCommunityByFrameUser', data, {} ) } export function selectStreetCommunityByFrameUser(data) { return $http.post( BASE_URI + pubCommunity + '/selectStreetCommunityByFrameUser', data, {} ) } export function selectCommunityEstateByFrameUser(data) { return $http.post( BASE_URI + pubCommunity + '/selectCommunityEstateByFrameUser', data, {} ) } export function updateRegistration(data) { return $http.post( BASE_URI + auth + '/updateRegistration', data, {} ) } export function updateSignIn(data) { return $http.post( BASE_URI + auth + '/updateSignIn', data, {} ) } export function getListByUserId(data) { return $http.post( BASE_URI + auth + '/getListByUserId', data, {} ) } export function getBmListByUserId(data) { return $http.post( BASE_URI + auth + '/getBmListByUserId', data, {} ) } export function updateSignInEvaluate(data) { return $http.post( BASE_URI + auth + '/updateSignInEvaluate', data, {} ) } export function insertHomeCommunityActivity(data) { return $http.post( BASE_URI + auth + '/insertHomeCommunityActivity', data, {} ) } export function getHomeCommunityActivityIsValid(data) { return $http.post( BASE_URI + auth + '/getHomeCommunityActivityIsValid', data, {} ) } export function getHomeCommunityActivityById(data) { return $http.post( BASE_URI + auth + '/getHomeCommunityActivityById', data, {} ) } export function editHomeCommunityActivity(data) { return $http.post( BASE_URI + auth + '/editHomeCommunityActivity', data, {} ) } export function listHomeCommunityActivity(data) { return $http.post( BASE_URI + auth + '/listHomeCommunityActivity', data, {} ) } export function compareDate(start, end) { const startDate = new Date(start) const endDate = new Date(end) if (startDate.getTime() > endDate.getTime()) { return true } else { return false } }