import upload from '@/utils/upload'
import request from '@/utils/request'

// 根据条件查询通告列表
export function getNoticeList(params) {
	return request({
		url: '/busi/notice/appList',
		method: 'get',
		params: params
	})
}


//  查询浏览足迹
export function getHisList(params) {
	return request({
		url: '/busi/notice/appFootprintList',
		method: 'get',
		params: params
	})
}


// 订阅查询通告列表
export function getSubscribeList(params) {
	return request({
		url: '/busi/notice/subscribeList',
		method: 'get',
		params: params
	})
}
// 关注查询通告列表
export function getLoveList(params) {
	return request({
		url: '/busi/notice/loveList',
		method: 'get',
		params: params
	})
}

// 查通告详情
export function getNoticeDetail(params) {
	return request({
		url: '/busi/notice/appGetDetail',
		method: 'get',
		params: params
	})
}

// 浏览通告
export function addView(params) {
	return request({
		url: '/busi/view/addView',
		method: 'post',
		params: params
	})
}

// 关闭通告
export function closeNotice(params) {
	return request({
		url: '/busi/notice/publishTakeDown',
		method: 'post',
		params: params
	})
}
// 博主举报通告主
export function saveReport(data) {
	return request({
		url: '/busi/report/saveReport',
		method: 'post',
		data: data
	})
}

// 我报名查询通告列表
export function myNoticeList(params) {
	return request({
		url: '/busi/notice/myNoticeList',
		method: 'get',
		params: params
	})
}
// 通告主查询通告列表
export function myPublishNoticeList(params) {
	return request({
		url: '/busi/notice/myPublishNoticeList',
		method: 'get',
		params: params
	})
}

// 发布通告
export function saveNotice(data) {
	return request({
		url: '/busi/notice/saveOrUpdate',
		method: 'post',
		data: data
	})
}

// 发布通告
export function publishTakeDown(data) {
	return request({
		url: '/busi/notice/publishTakeDown?noticeId=' + data.noticeId + '&publishTakeDown=' + data
			.publishTakeDown,
		method: 'post'
	})
}

//平台意见反馈
export function uniAddFeedBack(data) {
	return request({
		url: '/busi/feedback/uniAddFeedBack',
		method: 'post',
		data: data
	})
}

// 查询意见反馈列表
export function feedbackList(params) {
	return request({
		url: '/busi/feedback/list',
		method: 'get',
		params: params
	})
}

// 通告查询报名列表
export function reportList(params) {
	return request({
		url: '/busi/notice/reportList',
		method: 'get',
		params: params
	})
}


// 选中当前名片
export function chooseSign(params) {
	return request({
		url: '/busi/sign/chooseSign',
		method: 'post',
		params: params
	})
}

// 获取报名数量
export function getSignNum(params) {
	return request({
		url: '/busi/notice/reportNum',
		method: '',
		params: params
	})
}
// 查询当前登录用户通告
export function queryListByUserId(params) {
	return request({
		url: '/busi/notice/myPublishNoticeList',
		method: 'get',
		params: params
	})
}

export function evaluateAdd(data) {
	return request({
		url: '/busi/evaluate',
		method: 'post',
		data: data
	})
}
