import request from '@/utils/request';

export function getStuCampus() {
	return request({
		url: '/survey/itinerary/getStuCampus',
		method: 'get'
	})
}

export function listOwnReturn(query) {
	return request({
		url: '/survey/itinerary/listOwnReturn',
		method: 'get',
		params: query
	})
}

export function stuSchoolUpdate(data) {
	return request({
		url: '/survey/itinerary/stuSchoolUpdate',
		method: 'post',
		data
	})
}

export function stuWillReturnUpdate(data) {
	return request({
		url: '/survey/itinerary/stuWillReturnUpdate',
		method: 'post',
		data
	})
}

export function boolStuOwnReturn(id) {
	return request({
		url: '/survey/itinerary/boolStuOwnReturn/'+id,
		method: 'post',
	})
}

export function stuHomeUpdate(data) {
	return request({
		url: '/survey/itinerary/stuHomeUpdate',
		method: 'post',
		data
	})
}

export function stuGetRecordBySvId(id) {
	return request({
		url: '/survey/itinerary/stuGetRecordBySvId/'+id,
		method: 'get',
	})
}


export function stuLeaveApply(data) {
	return request({
		url: '/survey/itinerary/stuLeaveApply',
		method: 'post',
		data
	})
}

export function listStu(query) {
	return request({
		url: '/survey/survey/listStu',
		method: 'get',
		params: query
	})
}

export function getAddr(wd, jd) {
	return uni.request({
		method: 'get',
		url: "https://api.map.baidu.com/reverse_geocoding/v3/?ak=HUWNwlsBGdZk85kkDkfl3MCYVEqaTey1&output=json&coordtype=wgs84ll&location=" +
			wd + "," + jd
	});
}