import {
	myRequest
} from '@/utils/request.js'

// 移动端登录
export const loginReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/home/mobileLogin',
		method: 'post',
		data
	})
}

// 根据token获取用户信息
export const getInfoByTokenReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/welcomeStudent/queryStudentByToken',
		data
	})
}

// 提交信息采集
export const submitInfoReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/welcomeStudent/infoCollection',
		method: 'post',
		data
	})
}

// 获取勾选到达时间段
export const getArriveTimeListReq = async () => {
	return await myRequest({
		url: '/welcome/api/welcomeArriveSetting/queryArriveTimes'
	})
}

// 获取校区数据
export const getSchoolListDataReq = async () => {
	return await myRequest({
		url: '/welcome/api/welcome-build/schoolGroup'
	})
}

// 获取当前用户访客记录
export const getVisitorRecordReq = async () => {
	return await myRequest({
		url: '/welcome/api/visitor'
	})
}

// 新增访客记录
export const addVisitorRecordReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/visitor',
		method: 'post',
		data
	})
}

// 删除访客记录
export const deleteVisitorRecordReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/visitor',
		method: 'delete',
		data
	})
}

// 获取楼栋分组
export const getBuildGroupReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/welcomeBed/hBuildGroup',
		data
	})
}

// 获取寝室分组
export const getDormGroupReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/welcomeBed/hDormitoryGroup',
		data
	})
}

// 获取床位分组
export const getBedGroupReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/welcomeBed/hBedGroup',
		data
	})
}

// 提交床铺信息
export const postSubmitBedInfoReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/welcomeBed/submit',
		method: "post",
		data
	})
}

// 宿舍详情
export const getBedDetailsReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/welcomeBed/bedDetails',
		data
	})
}

// 判断是否选择了床位
export const isSelectReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/welcomeBed/isCheck',
		data
	})
}


// 获取省分组
export const getProvinceGroupReq = async () => {
	return await myRequest({
		url: '/welcome/api/welcomeCity/getProvinceLevel'
	})
}

// 获取市分组
export const getCityGroupReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/welcomeCity/getCityLevel',
		data
	})
}

// 获取区分组
export const getDistrictGroupReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/welcomeCity/getDistrictLevel',
		data
	})
}

// 根据录取号获取支付信息
export const getStudentPayInfo = async (data) => {
	return await myRequest({
		url: '/welcome/api/welcomeStudent/queryStudentInfo',
		data
	})
}

// 获取设置数据
export const getSettingsInfoReq = async (data) => {
	return await myRequest({
		url: '/welcome/api/systemSetting/querySettings',
		data
	})
}