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

// 登录
export const login = (data) => {
	return request({
		url: '/app/api/v1/user/login',
		data: data,
		method: 'post',
		type: 'application/json'
	})
}
// 用户信息查询
export const getUserInfo = () => {
	return request({
		url: '/app/api/v1/user/user/info/get',
		method: 'post',
		type: 'application/x-www-form-urlencoded'
	})
}
// 巡逻点位签到
export const getPosition = (data) => {
	return request({
		url: '/app/api/v1/user/patrol/position/sign',
		data: data,
		method: 'post',
		type: 'application/json'
	})
}

// 获取巡逻记录
export const getRecordList = (data) => {
	return request({
		url: '/app/api/v1/user/patrol/record/page',
		data: data,
		method: 'post',
		type: 'application/json'
	})
}

// 获取用户需要巡逻的点位
export const getPatrolPosition = (data) => {
	return request({
		url: '/app/api/v1/user/patrol/position/get',
		data: data,
		method: 'post',
		type: 'application/x-www-form-urlencoded'
	})
}

// 查询巡逻点位分页列表
export function getPositionPage(data) {
	return request({
		url: '/app/api/v1/user/patrol/position/page',
		data: data,
		method: 'post',
		type: 'application/json'
	})
}
// 获取用户需要巡逻的点位是否可以签到
export function getCheckPositionSign(data) {
	return request({
		url: '/app/api/v1/user/patrol/position/sign/check',
		data: data,
		method: 'post',
		type: 'application/json'
	})
}