import request from '@/utils/request'

// api地址
const api = {
	publishDynamic: 'square/add',
	getDynamic: 'square/list',
	dynamicLike: 'square/dynamicLike',
	dynamicDelete: 'square/delete'
}

// 发布动态
export function publishDynamic(param) {
  return request.post(api.publishDynamic, { ...param })
}


// 获取动态列表
export function getDynamic(param) {
  return request.get(api.getDynamic, { ...param })
}

// 动态点赞
export function dynamicLike(param) {
  return request.post(api.dynamicLike, { ...param })
}

// 动态删除
export function deleteDynamic(param) {
  return request.post(api.dynamicDelete, { ...param })
}