From 459fee332e9759f2b681e9a6249b78c86eeb432e Mon Sep 17 00:00:00 2001
From: "3321822538@qq.com" <3321822538@qq.com>
Date: Tue, 29 Oct 2024 11:13:45 +0800
Subject: [PATCH] =?UTF-8?q?=E8=9C=82=E7=AE=B1=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
page_user/luru.vue | 56 ++-
page_user/luruone.vue | 976 ++++++++++++++++++++++++++++++++++++++++++
page_user/lurutwo.vue | 325 ++++++++++++++
pages/Beehive.vue | 53 ---
4 files changed, 1328 insertions(+), 82 deletions(-)
create mode 100644 page_user/luruone.vue
create mode 100644 page_user/lurutwo.vue
diff --git a/page_user/luru.vue b/page_user/luru.vue
index 6b15dd9..c052317 100644
--- a/page_user/luru.vue
+++ b/page_user/luru.vue
@@ -169,9 +169,6 @@
this.shows = true
},
// 选择型号
-
-
-
btnyc() {
this.titleflag = false
},
@@ -332,32 +329,32 @@
// }
// })
},
- parseCustomData(data) {
- const dataArray = data.split('@');
- const parsedData = {};
- const prefixMap = {
- 'V': 'voltage',
- 'S': 'switchState',
- 'A': 'current',
- 'P': 'power',
- 'M': 'remainingPower',
- 'T': 'setMode',
- 'W': 'temperature'
- };
- // 遍历数组并解析每个字段
- for (let i = 0; i < dataArray.length; i++) {
- const field = dataArray[i];
- for (const prefix in prefixMap) {
- if (field.startsWith(prefix)) {
- const value = field.substring(1);
- const propertyName = prefixMap[prefix];
- parsedData[propertyName] = isNaN(parseFloat(value)) ? value : parseFloat(value);
- break;
- }
- }
- }
- return parsedData;
- },
+ // parseCustomData(data) {
+ // const dataArray = data.split('@');
+ // const parsedData = {};
+ // const prefixMap = {
+ // 'V': 'voltage',
+ // 'S': 'switchState',
+ // 'A': 'current',
+ // 'P': 'power',
+ // 'M': 'remainingPower',
+ // 'T': 'setMode',
+ // 'W': 'temperature'
+ // };
+ // // 遍历数组并解析每个字段
+ // for (let i = 0; i < dataArray.length; i++) {
+ // const field = dataArray[i];
+ // for (const prefix in prefixMap) {
+ // if (field.startsWith(prefix)) {
+ // const value = field.substring(1);
+ // const propertyName = prefixMap[prefix];
+ // parsedData[propertyName] = isNaN(parseFloat(value)) ? value : parseFloat(value);
+ // break;
+ // }
+ // }
+ // }
+ // return parsedData;
+ // },
//4、建立连接
createBLEConnection(e) {
// this.deviceId = e.name
@@ -424,6 +421,7 @@
xBlufi.notifyStartDiscoverBle({
'isStart': false
});
+ uni.hideLoading()
// 判断是否存在设备
if (this.devicesList.length == 0) {
this.tishiflag = true
diff --git a/page_user/luruone.vue b/page_user/luruone.vue
new file mode 100644
index 0000000..24cbb43
--- /dev/null
+++ b/page_user/luruone.vue
@@ -0,0 +1,976 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{banben}}
+
+
+
+ 版本介绍:{{hardwareInfo.instructions}}
+
+
+
+
+
+
+
+
+ 确认录入
+
+
+
+
+
+
+
+ 蓝牙开启
+
+
+ 蓝牙关闭
+
+
+
+
+
+
+
+ 操作提示
+
+
+
+ 该mac号已有绑定sn码是否修改为当前sn码
+
+
+
+
+
+ 取消
+
+
+ 确定
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/page_user/lurutwo.vue b/page_user/lurutwo.vue
new file mode 100644
index 0000000..6260141
--- /dev/null
+++ b/page_user/lurutwo.vue
@@ -0,0 +1,325 @@
+
+
+
+
+ 控制台
+
+
+ 请扫描设备上的二维码
+
+
+
+
+
+
+
+
+ MAC号:{{obj.mac == undefined ? '--' : obj.mac}}
+
+
+
+ 网络:离线 在线
+
+
+
+ 最后在线时间:{{obj.lastOnlineTime == undefined ? '--' : obj.lastOnlineTime}}
+
+
+
+
+
+ 开启蜂鸣
+
+
+
+ 刷新
+
+
+
+ 返回
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/Beehive.vue b/pages/Beehive.vue
index ddf436c..4becb55 100644
--- a/pages/Beehive.vue
+++ b/pages/Beehive.vue
@@ -31,7 +31,6 @@
当前还没有添加蜂箱哦
-
@@ -108,7 +107,6 @@
箱内温度
-
@@ -133,7 +131,6 @@
箱外湿度
-
@@ -178,14 +175,10 @@
-
-
-
-
@@ -259,13 +252,11 @@
this.logoflag = true
}else{
this.logoflag = false
-
if(this.pagesum > 1){
this.fxlist = this.fxlist .concat(res.rows)
}else{
this.fxlist = res.rows
}
-
// let oldSnSet = new Set(this.fxlist.map(item => item.sn));
// let result = this.fxlist
@@ -280,15 +271,8 @@
// result.sort((a, b) => b.onlineStatus - a.onlineStatus) // 1 在前,0 在后
// this.fxlist = result.filter(row => oldSnSet.has(row.sn))
// this.fxlist = result
-
this.pagesum++
}
- }else{
- // uni.showToast({
- // title: res.msg,
- // icon: 'none',
- // duration: 2000
- // })
}
})
},
@@ -296,11 +280,6 @@
if (this.fxlist.length < this.total) {
this.getlist()
} else {
- // uni.showToast({
- // title: '没有更多蜂箱了',
- // icon: 'none',
- // duration: 1000
- // });
this.$refs.uToast.show({
title: '没有更多蜂箱了',
type: 'default',
@@ -329,17 +308,14 @@
}
})
},
-
swiperchange(e) {
this.curtitidx = e.detail.current
- // console.log(e, 'aaaa');
},
addApiary(){
uni.navigateTo({
url:'/page_Beehive/add_Beehive'
})
}
-
}
}
@@ -357,9 +333,7 @@
page {
background-color: #FAFDFD;
}
-
.page {
- // position: relative;
width: 750rpx;
.swiper {
height: 76vh !important;
@@ -368,7 +342,6 @@
.swiper-item {
overflow: scroll;
height: 100%;
-
.card_box {
margin: 0 auto;
padding: 20rpx 24rpx;
@@ -387,7 +360,6 @@
.info_li{
margin-top: 28rpx;
width: 33%;
- // margin-right: 82rpx;
.li_top{
display: flex;
flex-wrap: nowrap;
@@ -475,11 +447,9 @@
}
.top_cont {
padding: 0 38rpx;
-
.tabbar::-webkit-scrollbar {
width: 0 !important;
}
-
.tabbar {
display: flex;
overflow-y: hidden;
@@ -507,10 +477,7 @@
display: none;
}
}
-
}
-
-
.top_box {
margin: 42rpx auto;
display: flex;
@@ -518,7 +485,6 @@
width: 664rpx;
align-items: center;
.search {
-
display: flex;
flex-wrap: nowrap;
align-items: center;
@@ -528,26 +494,17 @@
background: #FFFFFF;
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.15);
border-radius: 20rpx 20rpx 20rpx 20rpx;
-
image {
width: 35.97rpx;
height: 35.97rpx;
}
-
.search_center {
margin-left: 34rpx;
width: 480rpx;
-
.ips {
// 基本样式设置
width: 100%; // 根据需要调整
-
- // border: 1px solid #ccc; // 根据需要调整
-
- // 设置 placeholder 样式
-
}
-
.my-placeholder {
font-weight: 400;
font-size: 32rpx;
@@ -555,27 +512,22 @@
}
}
}
-
.add {
margin-left: 30rpx;
width: 66rpx;
height: 66rpx;
}
}
-
}
-
.no_cont {
margin: 152rpx auto 0;
width: 432rpx;
-
.img {
image {
width: 432rpx;
height: 432rpx;
}
}
-
.txt {
margin-top: 50rpx;
width: 100%;
@@ -585,10 +537,5 @@
color: #808080;
}
}
-
-
-
-
-
}
\ No newline at end of file