diff --git a/api/aquatic.js b/api/aquatic.js index 700792d..01bfeb7 100644 --- a/api/aquatic.js +++ b/api/aquatic.js @@ -12,5 +12,8 @@ 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 addFishRecordAPI = (data) => syhttp.post('/FishBreed/addFishRecord', data) + // // export const fishPicListAPI = (data) => syhttp.get('/FishBreed/fishPicList', data) \ No newline at end of file diff --git a/pages/aquatic/detail.vue b/pages/aquatic/detail.vue index 64e5287..43c2b1c 100644 --- a/pages/aquatic/detail.vue +++ b/pages/aquatic/detail.vue @@ -20,7 +20,7 @@ {{index}} - + 更新{{index.slice(0,-2)}} @@ -183,7 +183,6 @@ const pond_id = ref(0) const headData = reactive({}) onLoad((option) => { - pondEnvDataAPI({ user_id: 307 }).then(res => { diff --git a/pages/growRecord/index.vue b/pages/growRecord/index.vue index b732e09..cd9df87 100644 --- a/pages/growRecord/index.vue +++ b/pages/growRecord/index.vue @@ -118,7 +118,7 @@ {{item.title}} - @@ -128,8 +128,8 @@ {{item.title}} - + @@ -137,9 +137,12 @@ {{item.title}} - - - + + + + + + @@ -155,7 +158,7 @@ {{item.title}} - + @@ -204,7 +207,8 @@ - + @@ -224,6 +228,12 @@ import { onLoad } from "@dcloudio/uni-app" + + + import { + addFishRecordAPI + } from "@/api/aquatic.js" + import uplodeImg from "@/utils/uplodeImg.js" const options1 = reactive([{ text: '删除' }]) @@ -233,13 +243,15 @@ ], ) const confirmFn = (e) => { showPicker.value = false - console.log(e.value) + formData.select = e.value[0] } const land_id = ref(0) + const pond_id = ref(0) const type = ref(0) const actionData = reactive({}) onLoad((options) => { land_id.value = options.land_id + pond_id.value = options.pond_id actionsListAPI({ type: options.type }).then(res => { @@ -250,10 +262,22 @@ }) const showPop = ref(false) const formData = reactive({ - value: "" + text: "", + select: "", + pic: "", + serch: "" }) const confirm = () => { + // addFishRecordAPI({ + + // }) showPop.value = false + console.log(formData) + + + for (let key in formData) { + formData[key] = '' + } // var key of formData { // } @@ -291,6 +315,13 @@ // console.log(popList) }) } + const updateImgFn = () => { + uplodeImg().then(res => { + formData.pic = res.data.image + + + }) + }