diff --git a/App.vue b/App.vue index df56531..f182423 100644 --- a/App.vue +++ b/App.vue @@ -1,8 +1,20 @@ \ No newline at end of file diff --git a/pages.json b/pages.json index c448225..2241a6e 100644 --- a/pages.json +++ b/pages.json @@ -14,8 +14,8 @@ "style": { "navigationBarTitleText": "地块", "navigationStyle": "custom", - "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", + "enablePullDownRefresh": true, + "navigationBarBackgroundColor": "#35D190", "navigationBarTextStyle": "black" } }, { @@ -40,8 +40,8 @@ "style": { "navigationBarTitleText": "种植详情", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { @@ -49,8 +49,8 @@ "style": { "navigationBarTitleText": "添加收获信息", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { @@ -58,8 +58,8 @@ "style": { "navigationBarTitleText": "添加虫害防治信息", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { @@ -67,8 +67,8 @@ "style": { "navigationBarTitleText": "添加灌溉信息", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { @@ -76,8 +76,8 @@ "style": { "navigationBarTitleText": "添加除草信息", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { @@ -85,8 +85,8 @@ "style": { "navigationBarTitleText": "添加施肥信息", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { @@ -94,8 +94,8 @@ "style": { "navigationBarTitleText": "添加种植信息", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { @@ -104,8 +104,8 @@ "navigationStyle": "custom", "navigationBarTitleText": "苗情监测", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { @@ -114,8 +114,8 @@ "navigationStyle": "custom", "navigationBarTitleText": "苗情监测", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { @@ -123,8 +123,8 @@ "style": { "navigationBarTitleText": "添加土地信息", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { @@ -132,8 +132,8 @@ "style": { "navigationBarTitleText": "选择位置", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { @@ -150,16 +150,16 @@ "style": { "navigationBarTitleText": "溯源结果", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { "path": "pages/husbandryForm/detail", "style": { "navigationBarTitleText": "操作详情", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { @@ -167,8 +167,8 @@ "style": { "navigationBarTitleText": "密码修改", "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#F4F4F4", - "navigationBarTextStyle": "black" + "navigationBarBackgroundColor": "#35D190", + "navigationBarTextStyle": "white" } }, { diff --git a/pages/Login/login.vue b/pages/Login/login.vue index 0cc7d33..d1c0b4f 100644 --- a/pages/Login/login.vue +++ b/pages/Login/login.vue @@ -82,7 +82,7 @@ placeholder="请输入验证码" border="surround" v-model="formData.code"> - 获取验证码 {{countDown}}s @@ -196,10 +196,12 @@ } .input-card { - width: 700rpx; + width: 680rpx; + margin: 0 auto; box-sizing: border-box; border-radius: 20rpx; overflow: hidden; + box-shadow: 0.5rpx 0.5rpx 200rpx 0.5rpx rgba(0, 0, 0, 0.1); .card-head { background-color: #fff; @@ -409,7 +411,7 @@ account: "", password: "", code: '', - scene: "1", + scene: "2", terminal: '' }) diff --git a/pages/Login/resgier.vue b/pages/Login/resgier.vue index d5d15f3..b8a01fc 100644 --- a/pages/Login/resgier.vue +++ b/pages/Login/resgier.vue @@ -40,7 +40,7 @@ placeholder="请输入验证码" border="surround" v-model="formData.verify_code"> - 获取验证码 {{countDown}}s diff --git a/pages/addLand/addLand.vue b/pages/addLand/addLand.vue index c330a92..8d181e7 100644 --- a/pages/addLand/addLand.vue +++ b/pages/addLand/addLand.vue @@ -43,11 +43,15 @@ suffix-icon-style="color: #b6b6b6;" border="none" v-model="county_name" readonly style="pointer-events: none;"> - - + + - + + @@ -59,7 +63,7 @@ - + @@ -72,8 +76,8 @@ - - + + 点击上传图片 @@ -566,8 +570,10 @@ .code-img { background-color: #F4F4F4; - height: 350.47rpx; + height: 340.47rpx; position: relative; + width: 680rpx; + margin: 0 auto; .carime-icon { position: absolute; diff --git a/pages/husbandryForm/Pest.vue b/pages/husbandryForm/Pest.vue index ae0d453..59eb69a 100644 --- a/pages/husbandryForm/Pest.vue +++ b/pages/husbandryForm/Pest.vue @@ -70,8 +70,8 @@ - - + + 点击上传图片 diff --git a/pages/husbandryForm/fertilize.vue b/pages/husbandryForm/fertilize.vue index 675f288..35335a0 100644 --- a/pages/husbandryForm/fertilize.vue +++ b/pages/husbandryForm/fertilize.vue @@ -72,8 +72,8 @@ - - + + 点击上传图片 diff --git a/pages/husbandryForm/harvest.vue b/pages/husbandryForm/harvest.vue index f228ba1..765e75b 100644 --- a/pages/husbandryForm/harvest.vue +++ b/pages/husbandryForm/harvest.vue @@ -45,8 +45,8 @@ - - + + 点击上传图片 diff --git a/pages/husbandryForm/irrigate.vue b/pages/husbandryForm/irrigate.vue index ba93a56..10a4118 100644 --- a/pages/husbandryForm/irrigate.vue +++ b/pages/husbandryForm/irrigate.vue @@ -65,8 +65,8 @@ - - + + 点击上传图片 diff --git a/pages/husbandryForm/sow.vue b/pages/husbandryForm/sow.vue index 01aee06..003b016 100644 --- a/pages/husbandryForm/sow.vue +++ b/pages/husbandryForm/sow.vue @@ -48,8 +48,8 @@ - - + + 点击上传图片 @@ -75,7 +75,7 @@ @confirm="dateConfirmfn" :formatter="formatter" @cancel="show=false"> - 完成添加 + 添加 diff --git a/pages/husbandryForm/weeding.vue b/pages/husbandryForm/weeding.vue index 1596b96..06125c3 100644 --- a/pages/husbandryForm/weeding.vue +++ b/pages/husbandryForm/weeding.vue @@ -73,8 +73,8 @@ - - + + 点击上传图片 diff --git a/pages/index/massif.vue b/pages/index/massif.vue index 2882920..9e15f77 100644 --- a/pages/index/massif.vue +++ b/pages/index/massif.vue @@ -90,7 +90,8 @@ 苗情检测视频 - + + 刷新时间:{{getNowTimeFn()}} @@ -122,7 +123,7 @@ {{item.name}} + style="font-size: 28rpx;margin-top: 10rpx;font-weight: bold;"> {{ item.num?item.num+item.unit:'--' }} @@ -150,7 +151,7 @@ {{item.name}} + style="font-size: 28rpx;margin-top: 10rpx;font-weight: bold;"> {{item.num+item.unit}} {{ item.num?item.num+item.unit:'--' }} @@ -289,7 +290,8 @@ import { onLoad, onShow, - onHide + onHide, + onPullDownRefresh } from "@dcloudio/uni-app" import Myindex from '@/components/return/index.vue'; @@ -392,7 +394,7 @@ } }) - + const userInfo = ref("") const dataobj = reactive({}) const tdId = ref('') const palntId = ref('') @@ -416,7 +418,7 @@ } const goLive = () => { uni.navigateTo({ - url: '/pages/live/live?url=' + video_url.value + url: `/pages/live/live?url=${video_url.value }&user=${userInfo.value.master_phone}&device=${userInfo.value.device_id} ` }) } const show = ref(false) @@ -454,14 +456,14 @@ }, { icon: "WD1", - name: "温度", + name: "环境温度", num: 0, unit: "℃", status: 0, }, { icon: "SD", - name: "湿度", + name: "环境湿度", num: 0, unit: "%RH", status: 0, @@ -506,6 +508,7 @@ return `/static/main/index/${icon}.png` } const video_url = ref() + let scoketData = "" //列表获取 const getlist = () => { lindexist({ @@ -513,18 +516,12 @@ }).then((res) => { if (res.code == 1) { - - - - + userInfo.value = res.data + scoketData = { + username: userInfo.value.master_phone, + device: 'lihai_lot_walnutpi_dev_' + userInfo.value.device_id + } video_url.value = res.data.video_url - - // if (res.data.user_id == 23) { - // video_url.value = - // 'http://rtsp.lihaink.cn/live/lihai_lot_walnutpi_dev_4.live.mp4?secret=YwDtp2llj80HA19JhMXL4Po99nsMAyNT' - // } - // video_url=res.data. - threshold = res.data?.monitor?.threshold || "" if (Object.keys(res.data).length > 0) { getlist3(res.data.id) @@ -594,6 +591,11 @@ }).then((res) => { if (res.code == 1) { + + + + + tdId.value = res.data[0]?.id || '' getlist() if (res.data.length > 0) { @@ -655,9 +657,6 @@ showModal.value = false equipmentId.value = '' } - - - //绑定产品 const biproduct = () => { if (equipmentId.value) { @@ -737,6 +736,35 @@ const u = (name) => { return `/static/main/index/${name}.png` } + + + setTimeout(() => { + uni.connectSocket({ + url: 'ws://60.204.152.17:8765' + }); + uni.onSocketOpen(function(res) { + console.log(scoketData); + + uni.sendSocketMessage({ + data: JSON.stringify(scoketData) + }); + + }); + uni.onSocketError(function(res) { + console.log('WebSocket连接打开失败,请检查!'); + }); + uni.onSocketClose(function(res) { + console.log('WebSocket 已关闭!'); + }); + + }, 5000) + + + onPullDownRefresh(() => { + getlist1() + getlist2() + uni.stopPullDownRefresh() + }) \ No newline at end of file diff --git a/pages/landDetail/index.vue b/pages/landDetail/index.vue index 89283e7..53e4e16 100644 --- a/pages/landDetail/index.vue +++ b/pages/landDetail/index.vue @@ -13,8 +13,7 @@ - + width="100%" height="500rpx" @click="goLive" v-if="videoUrl"> - + @@ -96,13 +95,7 @@ - - - - - - @@ -111,12 +104,7 @@ - - - - - @@ -125,6 +113,9 @@ \ No newline at end of file diff --git a/static/main/index/login_ad.png b/static/main/index/login_ad.png new file mode 100644 index 0000000..fd6ae28 Binary files /dev/null and b/static/main/index/login_ad.png differ diff --git a/static/main/index/sj.png b/static/main/index/sj.png new file mode 100644 index 0000000..101f709 Binary files /dev/null and b/static/main/index/sj.png differ diff --git a/static/main/index/upload.png b/static/main/index/upload.png new file mode 100644 index 0000000..43d0f7b Binary files /dev/null and b/static/main/index/upload.png differ diff --git a/static/main/index/wo.png b/static/main/index/wo.png new file mode 100644 index 0000000..ae60e7d Binary files /dev/null and b/static/main/index/wo.png differ diff --git a/static/main/index/wxz.png b/static/main/index/wxz.png new file mode 100644 index 0000000..fd6ae28 Binary files /dev/null and b/static/main/index/wxz.png differ diff --git a/static/tabs-icon/Task-a.png b/static/tabs-icon/Task-a.png deleted file mode 100644 index 51af40f..0000000 Binary files a/static/tabs-icon/Task-a.png and /dev/null differ diff --git a/static/tabs-icon/Task.png b/static/tabs-icon/Task.png deleted file mode 100644 index 0317dd0..0000000 Binary files a/static/tabs-icon/Task.png and /dev/null differ diff --git a/static/tabs-icon/approval-a.png b/static/tabs-icon/approval-a.png deleted file mode 100644 index 40166ff..0000000 Binary files a/static/tabs-icon/approval-a.png and /dev/null differ diff --git a/static/tabs-icon/approval.png b/static/tabs-icon/approval.png deleted file mode 100644 index 757d0b9..0000000 Binary files a/static/tabs-icon/approval.png and /dev/null differ diff --git a/static/tabs-icon/home-a.png b/static/tabs-icon/home-a.png deleted file mode 100644 index 3c4e256..0000000 Binary files a/static/tabs-icon/home-a.png and /dev/null differ diff --git a/static/tabs-icon/home.png b/static/tabs-icon/home.png deleted file mode 100644 index c3aeff2..0000000 Binary files a/static/tabs-icon/home.png and /dev/null differ diff --git a/static/tabs-icon/manager-a.png b/static/tabs-icon/manager-a.png deleted file mode 100644 index b805033..0000000 Binary files a/static/tabs-icon/manager-a.png and /dev/null differ diff --git a/static/tabs-icon/manager.png b/static/tabs-icon/manager.png deleted file mode 100644 index 4553a34..0000000 Binary files a/static/tabs-icon/manager.png and /dev/null differ diff --git a/static/tabs-icon/my-a.png b/static/tabs-icon/my-a.png deleted file mode 100644 index e70365d..0000000 Binary files a/static/tabs-icon/my-a.png and /dev/null differ diff --git a/static/tabs-icon/my.png b/static/tabs-icon/my.png deleted file mode 100644 index a22aaf3..0000000 Binary files a/static/tabs-icon/my.png and /dev/null differ