import request from '@/utils/request'


// 获取订单列表
export function getAppOrderList() {
	return request({
		headers: {
			"isToken": true
		},
		url: "/applet/order/getAppOrderList",
		method: 'get'
	})
}

// 获取日订单列表
export function getOrderDateList(params) {
	return request({
		headers: {
			"isToken": true
		},
		url: "/applet/order/myDateList",
		method: 'get',
        params
	})
}

// 根据订单id获取打卡详情
export function orderItemLogGetByOrderId(orderId) {
	return request({
		headers: {
			"isToken": true
		},
		url: "/applet/orderItemLog/getByOrderId/" + orderId,
		method: 'get'
	})
}
// 根据订单id进行打卡
export function orderItemLogAddOrUpdate(data) {
	return request({
		headers: {
			"isToken": true
		},
		url: "/applet/orderItemLog/addOrUpdate",
		method: 'post',
		data
	})
}


// 获取订单中的宠物列表
export function getOrderPetById(orderId) {
	return request({
		headers: {
			"isToken": true
		},
		url: "/applet/order/getOrderPetById/" + orderId,
		method: 'get'
	})
}
// 获取订单的宠物详情
export function getPetById(petId) {
	return request({
		headers: {
			"isToken": true
		},
		url: "/applet/order/getPetById/" + petId,
		method: 'get'
	})
}

// 获取宠物id获取服务档案详情
export function getPetCareByPetId(petId) {
	return request({
		headers: {
			"isToken": true
		},
		url: "/applet/order/getPetCareByPetId/" + petId,
		method: 'get'
	})
}


export default {
	getAppOrderList,
	orderItemLogGetByOrderId,
	orderItemLogAddOrUpdate,
	getOrderPetById,
	getPetById,
	getPetCareByPetId,
    getOrderDateList,
}