You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import request from "@/utils/request";
|
|
|
|
import {host} from "@/config/host";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取我的宠物列表
|
|
|
|
* @param page
|
|
|
|
* @returns {Promise | Promise<unknown>}
|
|
|
|
*/
|
|
|
|
export function getMyPets(page) {
|
|
|
|
return request({
|
|
|
|
url: `${host}/user/pet-list`,
|
|
|
|
method: 'post',
|
|
|
|
data: {
|
|
|
|
page: page,
|
|
|
|
limit: 10
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 宠物详情
|
|
|
|
* @param id
|
|
|
|
* @returns {Promise | Promise<unknown>}
|
|
|
|
*/
|
|
|
|
export function getDetail(id){
|
|
|
|
return request({
|
|
|
|
url:`${host}/user/pet-info`,
|
|
|
|
method: 'post',
|
|
|
|
data:{
|
|
|
|
id
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 喂养档案
|
|
|
|
* @param pet_id
|
|
|
|
* @returns {Promise<unknown>}
|
|
|
|
*/
|
|
|
|
export function feedLog(pet_id){
|
|
|
|
return request({
|
|
|
|
url:'pet/feed-info',
|
|
|
|
method:'post',
|
|
|
|
data:{
|
|
|
|
pet_id
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|