import { frontRequest } from '~/composables/frontRequest'


export function itemPageApi(data: any) {
	return frontRequest.get("/api/item/page",{params:data})
}

/**
 * 查看详情
 * @param id
 */
export function itemInfoApi(id: number) {
	return frontRequest.get(`/api/item/${id}`)
}
/**
 * 购买
 */
export function buyItemApi(data: any) {
	return frontRequest.post(`/api/order`,data)
}

/**
 * 用户修改订单
 */
export function updateOrderItemApi(data: any) {
	return frontRequest.put(`/api/order`,data)
}


/**
 * 购买列表
 */
export function buyPageApi(data: any) {
	return frontRequest.get(`/api/order/page`,{params:data})
}
