From d3ab14fc1c635d1b173689040e3bbfd7b0161556 Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Fri, 27 Oct 2023 20:03:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/aquatic.js | 3 + pages/aquatic/detail.vue | 3 +- pages/growRecord/index.vue | 51 +++++++++++--- unpackage/dist/dev/app-plus/app-service.js | 80 ++++++++++++++-------- 4 files changed, 97 insertions(+), 40 deletions(-) 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 + + + }) + }