diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 92607ea..289cc1f 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -1,7 +1,7 @@
const install = (Vue, vm) => {
Vue.prototype.$u.http.setConfig({
- baseUrl: 'http://192.168.2.17:3202',
- // baseUrl: 'https://fen.ccttiot.com/prod-api',
+ // baseUrl: 'http://192.168.2.17:3202',
+ baseUrl: 'https://fen.ccttiot.com/prod-api',
loadingText: '努力加载中~',
loadingTime: 800,
// 设置自定义头部content-type
@@ -42,9 +42,9 @@ const install = (Vue, vm) => {
vm.$u.post('/app/auth/wxLogin',data).then(res=>{
uni.setStorageSync('code', res.code);
if (res.code == 10003) {
- uni.navigateTo({
- url:'/pages/login/login'
- })
+ // uni.navigateTo({
+ // url:'/pages/login/login'
+ // })
} else if (res.code == 200) {
uni.setStorageSync('token', res.token);
diff --git a/page_Beehive/Beehive_detail.vue b/page_Beehive/Beehive_detail.vue
index 7d69a8a..9b4f084 100644
--- a/page_Beehive/Beehive_detail.vue
+++ b/page_Beehive/Beehive_detail.vue
@@ -15,7 +15,7 @@
-->
- {{obj.name}}-{{obj.sn}}
+ {{obj.name == undefined ? '--' : obj.name}}-{{obj.sn == undefined ? '--' : obj.sn}}
- {{obj.apiaryAddress}}
+ {{obj.apiaryAddress == undefined ? '--' : obj.apiaryAddress}}
- 多云 {{daily[0].tempMin}}℃ ~ {{daily[0].tempMax}}℃
+ 多云 {{daily[0].tempMin == undefined ? '--' : daily[0].tempMin}}℃ ~ {{daily[0].tempMax == undefined ? '--' : daily[0].tempMax}}℃
- {{daily[0].windDirDay}} {{daily[0].windSpeedDay}}级
+ {{daily[0].windDirDay == undefined ? '--' : daily[0].windDirDay }} {{daily[0].windSpeedDay == undefined ? '--' : daily[0].windSpeedDay}}级
@@ -63,7 +63,7 @@
- 更新于 {{obj.lastOnlineTime}}
+ 更新于 {{obj.lastOnlineTime == undefined ? '--' : obj.lastOnlineTime}}
@@ -86,24 +86,24 @@
- 视频监控
+ 操作日志
- 更好查看蜂场情况
+ 记录蜂箱情况
-
+
- {{obj.name}}-{{obj.sn}}
+ {{obj.name == undefined ? '--' : obj.name}}
{{obj.lastOnlineTime}}
@@ -416,7 +416,7 @@
methods: {
btnvideo(){
uni.navigateTo({
- url:'/pages/Apiary/Apiary_vadio/Apiary_vadio?apiaryId=' + this.obj.apiaryId
+ url:'/page_Beehive/Beehive_log?apiaryId=' + this.obj.apiaryId + ' &name=' + this.obj.apiaryName
})
},
btngd(){
diff --git a/page_user/about.vue b/page_user/about.vue
index 510a290..ef085db 100644
--- a/page_user/about.vue
+++ b/page_user/about.vue
@@ -3,8 +3,8 @@
-
- {{title}}
+
+
@@ -17,16 +17,26 @@
backgroundColor: " #F4FAF8",
},
title: "",
+ type:'',
+ obj:''
}
},
onLoad(option) {
this.title = option.tit
+ this.type = option.type
+ this.getabout()
},
onShow() {
-
+
},
methods: {
-
+ getabout(){
+ this.$u.get(`app/licence/type/${this.type}`).then(res => {
+ if (res.code == 200) {
+ this.obj = res.data
+ }
+ })
+ }
}
}
@@ -34,5 +44,8 @@
\ No newline at end of file
diff --git a/pages/Apiary.vue b/pages/Apiary.vue
index f56dd3d..f087cde 100644
--- a/pages/Apiary.vue
+++ b/pages/Apiary.vue
@@ -64,9 +64,9 @@
pagesum: 1,
list: [],
total: '',
- pagesize:10,
- logoflag:false,
- code:''
+ pagesize: 10,
+ logoflag: false,
+ code: ''
}
},
onLoad() {
@@ -78,29 +78,29 @@
this.ishave()
},
methods: {
- changserch(){
+ changserch() {
let data = {
- pageNum:this.pagesum,
- pageSize:this.pagesize,
- name:this.code,
+ pageNum: this.pagesum,
+ pageSize: this.pagesize,
+ name: this.code,
}
this.$u.get('/farm/apiary/list', data).then(res => {
- if(res.code == 200){
+ if (res.code == 200) {
this.list = []
this.total = res.total
this.list = res.rows
}
})
},
-
+
// 跳转蜂场详情
- btnapiaryxq(id){
+ btnapiaryxq(id) {
uni.navigateTo({
- url:'/pages/Apiary/Apiary_detail?id=' + id
+ url: '/pages/Apiary/Apiary_detail?id=' + id
})
},
loadMore() {
- if (this.list.length < this.total) {
+ if (this.list.length < this.total) {
this.ishave();
} else {
uni.showToast({
@@ -122,25 +122,26 @@
};
this.$u.get('/farm/apiary/list', data).then((res) => {
if (res.code === 200) {
- this.total = res.total
- if(this.total < 1){
- this.logoflag = true
- }else{
- let uniqueIds = new Set(this.list.map(item => item.apiaryId))
- let uniqueRows = res.rows.filter(row => !uniqueIds.has(row.apiaryId))
- uniqueRows.forEach(row => uniqueIds.add(row.apiaryId))
- this.list = this.list.concat(uniqueRows)
- this.pagesum++
- this.logoflag = false
+ this.total = res.total;
+ if (this.total < 1) {
+ this.logoflag = true;
+ } else {
+ if(this.pagesum > 1){
+ this.list = this.list.concat(res.rows)
+ }else{
+ this.list = res.rows
+ }
+ this.pagesum++;
+ this.logoflag = false;
+ // console.log(this.list);
}
- // console.log(this.logoflag);
} else {
this.logoflag = true
- // console.log(this.logoflag);
}
})
},
+
}
}
diff --git a/pages/Apiary/AddApiary.vue b/pages/Apiary/AddApiary.vue
index 8d9fc1c..0a59e55 100644
--- a/pages/Apiary/AddApiary.vue
+++ b/pages/Apiary/AddApiary.vue
@@ -11,7 +11,9 @@
placeholder-class="my-placeholder" />
-
+
+
+
具体位置
@@ -280,6 +282,7 @@
this.form.province = province
this.form.city = city
this.form.county = district
+ // console.log(this.form);
} else {
console.log('地址格式不匹配或无法提取省市区信息');
}
diff --git a/pages/Apiary/Apiary_detail.vue b/pages/Apiary/Apiary_detail.vue
index 0a507b6..739fd21 100644
--- a/pages/Apiary/Apiary_detail.vue
+++ b/pages/Apiary/Apiary_detail.vue
@@ -19,13 +19,13 @@
- {{daily[0].tempMax}} ℃
+ {{daily[0].tempMax == undefined ? '--' : daily[0].tempMax}} ℃
- {{daily[0].humidity}} %
+ {{daily[0].humidity == undefined ? '--' : daily[0].humidity}} %
- 在线:{{apiaryobj.onlineBeehiveCount}}
+ 在线:{{apiaryobj.onlineBeehiveCount == undefined ? '--' : apiaryobj.onlineBeehiveCount}}
- 离线:{{apiaryobj.offlineBeehiveCount}}
+ 离线:{{apiaryobj.offlineBeehiveCount == undefined ? '--' : apiaryobj.offlineBeehiveCount}}
@@ -71,7 +71,7 @@
具体位置
-
+
视频监控
@@ -177,7 +177,7 @@
bgc: {
backgroundColor: " #F4FAF8",
},
- title: "福鼎蜂场",
+ title: "蜂场详情",
latitude: '',
longitude: '',
isMap: false,
@@ -196,9 +196,8 @@
covers: [],
dzcode:'',
polygons: [{
- //多边形的坐标数组
points: [],
- fillColor: "#cbdde9",
+ fillColor:'#cbdde954',
strokeColor: "#78addd",
strokeWidth: 1,
zIndex: 1,
@@ -224,6 +223,12 @@
url:'/pages/Apiary/early_Set ?apiaryId=' + this.apiaryId
})
},
+ //跳转视频监控
+ btnship(){
+ uni.navigateTo({
+ url:'/pages/Apiary/Apiary_vadio/Apiary_vadio?apiaryId=' + this.apiaryId
+ })
+ },
// 跳转预警记录
btnyj(){
uni.navigateTo({
diff --git a/pages/Apiary/Apiary_vadio/Apiary_vadio.vue b/pages/Apiary/Apiary_vadio/Apiary_vadio.vue
index 8738ec4..b75494f 100644
--- a/pages/Apiary/Apiary_vadio/Apiary_vadio.vue
+++ b/pages/Apiary/Apiary_vadio/Apiary_vadio.vue
@@ -9,19 +9,21 @@
-
+
当前还没有添加视频监控哦
-
+
添加视频监控
-
+
+ 添加视频监控
+
@@ -34,42 +36,42 @@
backgroundColor: " #F4FAF8",
},
title: "视频监控",
- apiaryId:'',
- list:[],
- pagesum:1,
- pagesize:10,
- flag:true,
- total:''
+ apiaryId: '',
+ list: [],
+ pagesum: 1,
+ pagesize: 10,
+ flag: true,
+ total: ''
}
},
onLoad(option) {
- this.apiaryId = option.apiaryId
+ this.apiaryId = option.apiaryId
},
onShow() {
- this.getlist()
+ this.getlist()
},
methods: {
- getlist(){
+ getlist() {
let data = {
- pageNum:this.pagesum,
- pageSize:this.pagesize,
- apiaryId:this.apiaryId
+ pageNum: this.pagesum,
+ pageSize: this.pagesize,
+ apiaryId: this.apiaryId
}
- this.$u.get(`/farm/video/list`,data).then(res => {
- if(res.code == 200){
+ this.$u.get(`/farm/video/list`, data).then(res => {
+ if (res.code == 200) {
this.total = res.total
- if(this.total >= 1){
+ if (this.total >= 1) {
this.list = res.rows
this.flag = true
- }else{
+ } else {
this.flag = false
}
}
})
},
- addApiary(){
+ addApiary() {
uni.navigateTo({
- url:'/pages/Apiary/addVadio?apiaryId=' + this.apiaryId
+ url: '/pages/Apiary/addVadio?apiaryId=' + this.apiaryId
})
}
@@ -85,23 +87,27 @@
.page {
// position: relative;
width: 750rpx;
- .listvideo{
+
+ .listvideo {
padding: 0 34rpx;
box-sizing: border-box;
margin-top: 56rpx;
- .list_item{
+
+ .list_item {
width: 682rpx;
height: 388rpx;
border-radius: 28rpx 28rpx 28rpx 28rpx;
overflow: hidden;
margin-top: 20rpx;
- video{
+
+ video {
width: 100%;
height: 100%;
}
}
}
- .btn{
+
+ .btn {
margin: 86rpx auto;
display: flex;
align-items: center;
@@ -114,17 +120,18 @@
font-size: 36rpx;
color: #FFFFFF;
}
+
.no_cont {
margin: 152rpx auto 0;
width: 432rpx;
-
+
.img {
image {
width: 432rpx;
height: 432rpx;
}
}
-
+
.txt {
margin-top: 50rpx;
width: 100%;
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 4e05897..344516d 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -24,7 +24,7 @@
-
+
@@ -95,8 +95,8 @@
-
+
@@ -159,7 +159,7 @@
暂未登录,去登录
-
+
@@ -216,10 +216,10 @@
onShow() {
this.getuserinfo()
-
+
setTimeout(() => {
-
-
+
+
}, 1500);
const now = new Date();
const previousDay = new Date(now)
@@ -238,9 +238,9 @@
methods: {
// 点击跳转登录页
- btnlogo(){
+ btnlogo() {
uni.navigateTo({
- url:'/pages/login/login'
+ url: '/pages/login/login'
})
},
// 未登录调静默获取token
@@ -261,8 +261,8 @@
taht.getchartData3()
taht.getchartData4()
taht.gettj()
- taht.getyj()
- }else if(res.code == 10003){
+ taht.getyj()
+ } else if (res.code == 10003) {
taht.logoflag = true
}
// console.log(res,10003);
@@ -271,32 +271,35 @@
},
})
},
- getuserinfo(){
+ getuserinfo() {
this.$u.get(`/app/user/userInfo`).then(res => {
if (res.code == 200) {
- if(res.data.type==1){
- this.ishave()
+ if (res.data.type == 1) {
+ this.logoflag = false
+ this.ishave()
this.getchartData3()
this.getchartData4()
this.gettj()
- this.getyj()
- }else{
-
-
+ this.getyj()
+ } else {
+
+
// uni.navigateTo({
// url:
// })
}
- }else{
- setTimeout(()=>{
- let code= uni.getStorageSync('code');
- console.log(code,'codecodecode');
- if(code==200){
+ }else if(res.code == 401){
+ this.jmlogin()
+ } else {
+ setTimeout(() => {
+ let code = uni.getStorageSync('code');
+ console.log(code, 'codecodecode');
+ if (code == 200) {
this.getuserinfo()
- }else{
- this.logoflag = true
+ } else {
+
}
- },500)
+ }, 500)
}
})
},
@@ -552,11 +555,10 @@
//重量
initChart3(canvas, width, height, canvasDpr) {
let that = this
-
const option = {
grid: {
- left: '2%',
- right: '10%',
+ left: '4%',
+ right: '4%',
bottom: '3%',
top: '4%',
containLabel: true
@@ -584,7 +586,6 @@
show: false,
},
// data: that.chartday,
- // data: that.numdata.map(item => item.date)
},
yAxis: {
show: true,
@@ -653,12 +654,12 @@
height: height,
devicePixelRatio: canvasDpr
})
-
option.series[0].data = that.chartData3
canvas.setChart(chart)
chart.setOption(option)
return chart
},
+
// 获取设备详情
}
diff --git a/pages/map.vue b/pages/map.vue
index d6ff781..0d7628f 100644
--- a/pages/map.vue
+++ b/pages/map.vue
@@ -1,11 +1,11 @@
-
+
-
+ :show-location='true' :markers="covers" @markertap="handleMarkerTap">
+
@@ -17,40 +17,154 @@
蜂箱
{{listmaps.length}}
-
+
+
+
+
+
+
+
+ {{fxobj.name == undefined ? '--' : fxobj.name}}
+ 已认养
+
+
+ x
+
+
+
+ 设备编号:{{fxobj.sn == undefined ? '--' : fxobj.sn}}
+
+
+ {{fxobj.apiaryAddress == undefined ? '--' : fxobj.apiaryAddress}}
+
+
+ {{daily[0].textDay == undefined ? '--' : daily[0].textDay}} {{daily[0].tempMin == undefined ? '--' : daily[0].tempMin}}℃ ~ {{daily[0].tempMax == undefined ? '--' : daily[0].tempMax}}℃
+ {{daily[0].windDirDay == undefined ? '--' : daily[0].windDirDay}} {{nowtqobj.windScale == undefined ? '--' : nowtqobj.windScale}}级
+
+
+
+ {{listfz}}
+
+
+ {{listmy}}
+
+
+
+
+ 箱内温度:{{fxobj.innerTemperature == undefined ? '--' : fxobj.innerTemperature}}℃
+
+
+ 箱内湿度:{{fxobj.innerHumidity == undefined ? '--' : fxobj.innerHumidity}}%
+
+
+ 蜂箱重量:{{fxobj.totalYield == undefined ? '--' : fxobj.totalYield}}g
+
+
+ 二氧化碳浓度:{{fxobj.innerCo2 == undefined ? '--' : fxobj.innerCo2}}ppm
+
+
+ 进出量(日):{{fxobj.ioCountDay == undefined ? '--' : fxobj.ioCountDay}}只
+
+
+ 频率:{{fxobj.volume == undefined ? '--' : fxobj.volume}}
+
+
+
+ 立即查看
+
+
+
+
+
+
+
+ {{fcobj.name == undefined ? '--' : fcobj.name}}
+ 已认养
+
+
+ x
+
+
+
+ {{fcobj.address == undefined ? '--' : fcobj.address}}
+
+
+ {{daily[0].textDay == undefined ? '--' : daily[0].textDay}} {{daily[0].tempMin == undefined ? '--' : daily[0].tempMin}}℃ ~ {{daily[0].tempMax == undefined ? '--' : daily[0].tempMax}}℃
+ {{daily[0].windDirDay == undefined ? '--' : daily[0].windDirDay}} {{nowtqobj.windScale == undefined ? '--' : nowtqobj.windScale}}级
+
+
+
+ {{listfz}}
+
+
+ {{listmy}}
+
+
+ {{fcobj.beehiveCount == undefined ? '--' : fcobj.beehiveCount}}箱
+
+
+
+
+ 当前温度:{{nowtqobj.temp == undefined ? '--' : nowtqobj.temp}}℃
+
+
+ 当前湿度:{{nowtqobj.humidity == undefined ? '--' : nowtqobj.humidity}}%
+
+
+ 在线数:{{fcobj.beehiveCount == undefined ? '--' : fcobj.beehiveCount}}箱
+
+
+
+ 立即查看
+
+
+
-