
export default prefix => {
  return {
    
    // 获取当前小区的所有公告
    listAnnouncement: {
      url: `${prefix}/tpAnnouncement`,
      method: 'post',
      action: 'admin.announcement.post'
    },

    // 添加公告
    addAnnouncement: {
      url: `${prefix}/addAnnouncement`,
      method: 'post',
      action: 'admin.announcement.add'
    },

    // 根据id查询公告
    announcementById: {
      url: `${prefix}/announcementById`,
      method: 'post',
      action: 'admin.announcement.detail'
    },

    // 修改公告
    updateannouncement: {
      url: `${prefix}/updateAnnouncement`,
      method: 'post',
      action: 'admin.announcement.update'
    },

    // 批量删除(data)里面是单子字段的多个id
    deleteAnnouncement: {
      url: `${prefix}/deleteAnnouncement`,
      method: 'post',
      action: 'admin.announcement.delete'
    },

    // 联系方式
    getTelList: {
      url: `${prefix}/announcement-tels`,
      method: 'get',
      action: 'admin.announcement-tel.get'
    },

    saveTel: {
      url: `${prefix}/announcement-tel/add`,
      method: 'post',
      action: 'admin.announcement-tel.post'
    },

    updateTel: {
      url: `${prefix}/announcement-tel/update`,
      method: 'put',
      action: 'admin.announcement-tel.put'
    },

    deleteTel: {
      url: `${prefix}/announcement-tel/delete`,
      method: 'post',
      action: 'admin.announcement-tel.delete'
    },

    messageEvent: {
      list: {
        url: `${prefix}/tpMessageEvent`,
        method: 'get',
        action: 'admin.tpMessageEvent.url'
      },
      save: {
        url: `${prefix}/tpMessageEvent`,
        method: 'post',
        action: 'admin.tpMessageEvent.post'
      },
      update: {
        url: `${prefix}/tpMessageEvent/:id`,
        method: 'put',
        action: 'admin.tpMessageEvent.put'
      },
      delete: {
        url: `${prefix}/tpMessageEvent/:id`,
        method: 'delete',
        action: 'admin.tpMessageEvent.delete'
      },
      get: {
        url: `${prefix}/tpMessageEvent/:id`,
        method: 'get',
        action: 'admin.tpMessageEvent.get'
      },
    }

  }
}
