import request from '@/utils/request'
import Qs from 'qs';

//联系门卫
export function companyContactsList(params) {
	return request({
		url: '/mobile/companyInfoApi/companyContactsList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//获取报修及投诉列表
export function getRepairAndComplaintList(params) {
	return request({
		url: '/mobile/information/pageList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//获取报修及投诉详情
export function getRepairAndComplaintInfo(id) {
	return request({
		url: '/mobile/information/detail/' + id,
		data: Qs.stringify({}),
		method: 'get',
	})
}

//提交报修及投诉
export function subRepairAndComplaint(params) {
	return request({
		url: '/mobile/information/add',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//物业获取报修及投诉列表
export function getRepairAndComplaintListProperty(params) {
	return request({
		url: '/mobile/information/propertyPageList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//物业回复
export function propertyReback(params) {
	return request({
		url: '/mobile/information/update',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//获取报修及投诉类别
export function getCategoryList(params) {
	return request({
		url: '/mobile/information/categoryList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//撤销报修及投诉
export function delRepairAndComplaint(id) {
	return request({
		url: '/mobile/information/cancel',
		data: Qs.stringify({
			id: id
		}),
		method: 'post',
	})
}
