import {
  PROJECT_DETAIL,
  PROJECT_LIST
} from '@constants/project'

import {
  API_ITEMS_DETAIL,
  API_ITEMS_LIST
} from '@constants/api'

import { createAction } from '@utils/redux'


/**
 * 获取楼盘列表
 * @param {*} payload 
 */
export const dispatchProjectList = payload => createAction({
  url: `${API_ITEMS_LIST}`,
  type: PROJECT_LIST,
  payload
})


/**
 * 获取项目信息
 * @param {*} id 
 */
export const dispatchProjectDetail = id => createAction({
  url: `${API_ITEMS_DETAIL}/${id}`,
  type: PROJECT_DETAIL
})
