import request from "@/utils/request"; import {host} from "@/config/host"; /** * 获取我的宠物列表 * @param page * @returns {Promise | Promise} */ export function getMyPets(page) { return request({ url: `${host}/user/pet-list`, method: 'post', data: { page: page, limit: 10 } }) } /** * 宠物详情 * @param id * @returns {Promise | Promise} */ export function getDetail(id){ return request({ url:`${host}/user/pet-info`, method: 'post', data:{ id } }) } /** * 喂养档案 * @param pet_id * @returns {Promise} */ export function feedLog(pet_id){ return request({ url:'pet/feed-info', method:'post', data:{ pet_id } }) } /** * 新增/修改宠物 * @param data * @returns {Promise} */ export function editPet(data){ return request({ url:'user/pet-upinfo', method:'post', data:data }) } /** * 删除宠物 * @param id * @returns {Promise | Promise} */ export function delPet(id){ return request({ url:'user/pet-delete', method:'post', data:{ id:id } }) }