diff --git a/api/animal.js b/api/animal.js index 450c674..6655a2d 100644 --- a/api/animal.js +++ b/api/animal.js @@ -15,4 +15,6 @@ export const animalInfoAPI = (data) => syhttp.get('/AnimalBreed/animalInfo', dat // 操作列表 export const animalPicListAPI = (data) => syhttp.get('/AnimalBreed/animalPicList', data) // 上传动物图片 -export const addAnimalPicAPI = (data) => syhttp.post('/AnimalBreed/addAnimalPic', data) \ No newline at end of file +export const addAnimalPicAPI = (data) => syhttp.post('/AnimalBreed/addAnimalPic', data) +// 更新动物饲养状态 +export const animalStatusAPI = (data) => syhttp.post('/AnimalBreed/animalStatus', data) \ No newline at end of file diff --git a/api/aquatic.js b/api/aquatic.js new file mode 100644 index 0000000..700792d --- /dev/null +++ b/api/aquatic.js @@ -0,0 +1,16 @@ +import syhttp from "@/utils/syhttp.js"; + +/** + * 添加水产养殖信息 + */ +export const addFishAPI = (data) => syhttp.post('/FishBreed/addFish', data) +// 用户池塘信息 +export const pondInfoAPI = (data) => syhttp.get('/FishBreed/pondInfo', data) +// 上传图片 +export const addFishPicAPI = (data) => syhttp.post('/FishBreed/addFishPic', data) +// 实时环境监测 +export const pondEnvDataAPI = (data) => syhttp.get('/FishBreed/pondEnvData', data) +// 图片列表 +export const fishPicListAPI = (data) => syhttp.get('/FishBreed/fishPicList', data) +// +// export const fishPicListAPI = (data) => syhttp.get('/FishBreed/fishPicList', data) \ No newline at end of file diff --git a/api/plant.js b/api/plant.js index d8fa439..adab537 100644 --- a/api/plant.js +++ b/api/plant.js @@ -19,4 +19,10 @@ export const setLandCropRipeAPI = (data) => syhttp.get('/LandPlant/setLandCropRi // 种植图片列表 export const landCropPicListAPI = (data) => syhttp.get('/LandPlant/landCropPicList', data) // 种植操作列表 -export const actionsListAPI = (data) => syhttp.get('/user/actions', data) \ No newline at end of file +export const actionsListAPI = (data) => syhttp.get('/user/actions', data) +// 种植操作详情 +export const actionsDetailAPI = (data) => syhttp.get('/user/actionsDetail', data) +// 种植操作详情列表 +export const landCropRecordInfoAPI = (data) => syhttp.get('/LandPlant/landCropRecordInfo', data) +// 检测数据表 +export const landEnvDataChartAPI = (data) => syhttp.get('/LandPlant/landEnvDataChart', data) \ No newline at end of file diff --git a/components/imgCard.vue b/components/imgCard.vue index 99bc1cb..bebc843 100644 --- a/components/imgCard.vue +++ b/components/imgCard.vue @@ -6,7 +6,8 @@ - {{props.text}} + + {{address}} @@ -18,7 +19,16 @@ reactive } from 'vue' import uplodeFn from "@/utils/uplodeImg.js" - + import { + userInfoAPI + } from "@/api/plant.js" + const address = ref("") + userInfoAPI({ + user_id: 307 + }).then(res => { + let userInfo = res.data + address.value = userInfo.area_name + userInfo.street_name + userInfo.village_name + userInfo.brigade_name + }) const props = defineProps({ imgUrl: String, text: String diff --git a/components/index/chick.vue b/components/index/chick.vue index 57f43df..7d2c187 100644 --- a/components/index/chick.vue +++ b/components/index/chick.vue @@ -242,13 +242,13 @@ } }) const actionList = reactive({}) - // actionsAPI({ - // type: 3 - // }).then(res => { - // for (let key in res.data) { - // actionList[key] = (res.data)[key] - // } - // }) + actionsAPI({ + type: 2 + }).then(res => { + for (let key in res.data) { + actionList[key] = (res.data)[key] + } + }) \ No newline at end of file diff --git a/pages/aquatic/detail.vue b/pages/aquatic/detail.vue index 13bd4a2..68d285d 100644 --- a/pages/aquatic/detail.vue +++ b/pages/aquatic/detail.vue @@ -1,19 +1,17 @@