From b30ab32f44186d51ec296b38dde1b306ecb57c97 Mon Sep 17 00:00:00 2001 From: jia <1451658316@qq.com> Date: Mon, 27 Nov 2023 18:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/file.js | 17 +- api/upload.js | 7 +- components/plant/landInfo.vue | 25 +- config/app.js | 5 +- main.js | 17 +- node_modules/.vite/deps/_metadata.json | 6 +- pages.json | 39 +-- pages/Login/login.vue | 31 ++- pages/addLand/addLand.vue | 19 +- pages/husbandryForm/Pest.vue | 12 +- pages/husbandryForm/fertilize.vue | 45 +++- pages/husbandryForm/harvest.vue | 31 ++- pages/husbandryForm/irrigate.vue | 80 +++--- pages/husbandryForm/sow.vue | 18 +- pages/husbandryForm/weeding.vue | 29 ++- pages/index/index.vue | 50 +++- pages/index/massif.vue | 347 ++++++++++++++++++------- pages/index/personal.vue | 67 +++-- pages/landDetail/index.vue | 160 ++++++++---- pages/landDetail/tudi.vue | 151 ++++++++--- static/img/ADL.png | Bin 0 -> 3888 bytes static/img/AHL.png | Bin 0 -> 3888 bytes static/img/AQHL.png | Bin 0 -> 2364 bytes static/img/CKGD.png | Bin 0 -> 1294 bytes static/img/CO2.png | Bin 0 -> 2534 bytes static/img/CTPH.png | Bin 0 -> 1990 bytes static/img/CTWD.png | Bin 0 -> 1873 bytes static/img/DJSC.png | Bin 0 -> 1792 bytes static/img/zw.png | Bin 0 -> 5720 bytes static/tabber/a.png | Bin 957 -> 1016 bytes static/tabber/b-b.png | Bin 1712 -> 695 bytes static/tabber/b.png | Bin 1696 -> 1095 bytes static/tabber/c-a.png | Bin 1712 -> 999 bytes static/tabber/c.png | Bin 1696 -> 1482 bytes store/index.js | 25 ++ store/userInfo.js | 15 -- utils/http.js | 17 +- utils/syhttp.js | 7 +- 38 files changed, 847 insertions(+), 373 deletions(-) create mode 100644 static/img/ADL.png create mode 100644 static/img/AHL.png create mode 100644 static/img/AQHL.png create mode 100644 static/img/CKGD.png create mode 100644 static/img/CO2.png create mode 100644 static/img/CTPH.png create mode 100644 static/img/CTWD.png create mode 100644 static/img/DJSC.png create mode 100644 static/img/zw.png create mode 100644 store/index.js delete mode 100644 store/userInfo.js diff --git a/api/file.js b/api/file.js index e527b01..01e33ea 100644 --- a/api/file.js +++ b/api/file.js @@ -24,22 +24,25 @@ export const addland = (data) => syhttp.post('/land/add', data) export const plantlist = (data) => syhttp.get('/plant/list', data) //新增种植 export const addplant = (data) => syhttp.post('/plant/add', data) + +//种植详情 +export const plantdetail = (data) => syhttp.get('/plant/detail', data) + //操作列表 export const actionlist = (data) => syhttp.get('/action/list', data) //添加操作 export const addaction = (data) => syhttp.post('/action/add', data) + //添加操作 -export const binddevice = (data) => syhttp.post('/device/bind', data) +export const binddevice = (data) => syhttp.post('/land/bind', data) //首页 export const lindexist = (data) => syhttp.get('/index/index', data) +//产品列表 +export const landproduct = (data) => syhttp.get('/land/product', data) - - - - - - +//绑定产品 +export const bindproduct = (data) => syhttp.post('/land/bind', data) diff --git a/api/upload.js b/api/upload.js index 41e9505..bbea5a2 100644 --- a/api/upload.js +++ b/api/upload.js @@ -2,11 +2,12 @@ // let baseUrl = 'https://ceshi.excellentkk.cn/api'; // import store from '../store'; import { config } from '@/config/app'; +import store from "@/store/index.js" let header = {}; -console.log(config) -if (uni.getStorageSync('SY_TOKEN')){ - header.token = uni.getStorageSync('SY_TOKEN'); + +if (store.state.userInfo){ + header.token = store.state.userInfo.token; } function uploads(src, type) { diff --git a/components/plant/landInfo.vue b/components/plant/landInfo.vue index 937c46d..6ca7c33 100644 --- a/components/plant/landInfo.vue +++ b/components/plant/landInfo.vue @@ -5,17 +5,25 @@ {{info.title}} 号土地 - - 溯源码: {{}} - + - 当前种植: {{info.residual_area}}亩 + 当前种植: {{info.total_area-info.residual_area}}亩 + + + + 种植品种: {{info.kind}} + @@ -55,6 +63,13 @@ info: Object, }) + + const perviewFn = (url) => { + console.log(url) + uni.previewImage({ + urls: [url] + }) + }