This commit is contained in:
parent
0c36432c23
commit
cfe4152839
|
@ -9,7 +9,7 @@ let HTTP_REQUEST_URL
|
|||
let HEADER
|
||||
if (env == 'dev') {
|
||||
// BASE_URL = 'http://ceshi-suyuan.lihaink.cn/'
|
||||
BASE_URL = 'http://192.168.1.13:8084/'
|
||||
BASE_URL = 'http://192.168.1.19:8084/'
|
||||
} else if (env = 'prod') {
|
||||
BASE_URL = 'http://ceshi-suyuan.lihaink.cn/'
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name" : "养殖溯源",
|
||||
"appid" : "__UNI__9B6D67A",
|
||||
"appid" : "__UNI__C509A32",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.2",
|
||||
"versionCode" : 102,
|
||||
|
|
|
@ -101,10 +101,10 @@
|
|||
{
|
||||
"path": "pages/live/live",
|
||||
"style": {
|
||||
"navigationBarTitleText": "苗情监测",
|
||||
"navigationBarTitleText": "养殖监测",
|
||||
// "navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#35D190",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"app-plus": {
|
||||
"subNVues": [{
|
||||
|
@ -128,10 +128,10 @@
|
|||
{
|
||||
"path": "pages/live/liveIos",
|
||||
"style": {
|
||||
"navigationBarTitleText": "苗情监测",
|
||||
"navigationBarTitleText": "养殖监测",
|
||||
// "navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#35D190",
|
||||
"navigationBarBackgroundColor": "#feb048",
|
||||
"navigationBarTextStyle": "white",
|
||||
"app-plus": {
|
||||
"subNVues": [{
|
||||
|
|
|
@ -71,18 +71,6 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view v-if="(dataobj.total_area-dataobj.residual_area)==0" @click="palnt(dataobj.id)">
|
||||
<view class="empty-land" style="background-image: url('static/main/index/xzzh.png');">
|
||||
<text></text>
|
||||
<text>去新增》</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="note" v-else>
|
||||
<u--image v-if="columns2[0]&&columns2[0].length>0" @click="showPicker1=true" :src="u('qtj')"
|
||||
click="showPicker1=true" width="170rpx" height="40rpx"
|
||||
style="position: absolute;right: 80rpx;top: 80rpx;"></u--image>
|
||||
</view> -->
|
||||
<view class="live-tit" style="color: #1A1A1A;">
|
||||
<view class="tit" style="">
|
||||
养殖基地监控数据
|
||||
|
@ -93,15 +81,12 @@
|
|||
|
||||
|
||||
</view>
|
||||
<!-- <view class="live">
|
||||
<u--image :src="u('K')" width="100%"></u--image>
|
||||
</view> -->
|
||||
<view class="live">
|
||||
<u--image :src="videoCover" v-if="video_url" width="100%" height="450rpx"></u--image>
|
||||
<u--image :src="u('K')" v-else width="100%"></u--image>
|
||||
|
||||
<view class=""
|
||||
style="width: 100%;height: 100%;background-color: rgba(0, 0, 0, .5);position: absolute;top: 1px;"
|
||||
style="width: 100%;height: 450rpx;background-color: rgba(0, 0, 0, .5);position: absolute;top: 1px;"
|
||||
@click="goLive" v-if="video_url">
|
||||
<u-icon name="play-circle" size="40" color="white" v-if="video_url"
|
||||
style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);"></u-icon>
|
||||
|
@ -255,14 +240,17 @@
|
|||
},
|
||||
|
||||
])
|
||||
|
||||
const userInfo = ref({});
|
||||
onLoad(() => {
|
||||
// console.log(store.state.userInfo)
|
||||
if (!store.state.userInfo) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/Login/login'
|
||||
})
|
||||
|
||||
}
|
||||
}else {
|
||||
userInfo.value = store.state.userInfo;
|
||||
}
|
||||
})
|
||||
const dataobj = ref({})
|
||||
const tdId = ref('')
|
||||
|
@ -288,23 +276,14 @@
|
|||
|
||||
const goLive = () => {
|
||||
let system = uni.getSystemInfoSync().platform;
|
||||
userInfo.value.master_phone = "lihai_lot_land_1"
|
||||
userInfo.value.device_id = "6"
|
||||
uni.navigateTo({
|
||||
url: `/pages/live/${system == 'ios'?'liveIos':'live'}?url=${video_url.value }&user=${userInfo.value.master_phone}&device=${userInfo.value.device_id} `
|
||||
url: `/pages/live/${system == 'ios'?'liveIos':'live'}?url=${video_url.value }&user=${userInfo.value.master_phone}&device=${userInfo.value.device_id}`
|
||||
})
|
||||
}
|
||||
const video_url = ref()
|
||||
|
||||
|
||||
const testUser = () => {
|
||||
if (uni.getStorageSync("SY_USER").mobile == '19130550023' || uni.getStorageSync("SY_USER").mobile ==
|
||||
'19330904744') {
|
||||
video_url.value =
|
||||
"http://rtsp.lihaink.cn/live/lihai_lot_walnutpi_dev_6.live.mp4"
|
||||
userInfo.value.master_phone = "lihai_lot_land_1"
|
||||
userInfo.value.device_id = "6"
|
||||
// console.log("19130550023")
|
||||
}
|
||||
}
|
||||
const show = ref(false)
|
||||
const showLoading = ref(false)
|
||||
const columns = reactive([]);
|
||||
|
@ -409,61 +388,17 @@
|
|||
return farm_types_lists.value.find(item=>item.value==dataobj.value.farm_type)?.name || ''
|
||||
})
|
||||
|
||||
// 监测数据
|
||||
const monitor = ref({});
|
||||
|
||||
//列表获取
|
||||
const getlist = () => {
|
||||
// lindexist({
|
||||
// land_id: tdId.value
|
||||
// }).then((res) => {
|
||||
// if (res.code == 1) {
|
||||
// userInfo.value = res.data
|
||||
// video_url.value = res.data.video_url
|
||||
// testUser()
|
||||
// videoCover.value = userInfo.value.video_cover || "/static/main/index/videoCover.png"
|
||||
// // uni.getStorageSync('SY_VIDEO_POSTS') || "/static/main/index/videoCover.png"
|
||||
// threshold = res.data?.monitor?.threshold || ""
|
||||
// if (Object.keys(res.data).length > 0) {
|
||||
// getlist3(res.data.id)
|
||||
// Object.assign(dataobj, res.data);
|
||||
// if (res.data && res.data.monitor && res.data.monitor.soil_monitor_data) {
|
||||
// soilList[0].num = res.data.monitor.soil_monitor_data.soil_temperature
|
||||
// soilList[1].num = res.data.monitor.soil_monitor_data.soil_moisture
|
||||
// soilList[2].num = res.data.monitor.soil_monitor_data.conductivity
|
||||
// soilList[3].num = res.data.monitor.soil_monitor_data.ph
|
||||
// soilList[4].num = res.data.monitor.soil_monitor_data.n_content
|
||||
// soilList[5].num = res.data.monitor.soil_monitor_data.p_content
|
||||
// soilList[6].num = res.data.monitor.soil_monitor_data.k_content
|
||||
// thresholdFn(soilList[0], threshold.soil_temp_min, threshold.soil_temp_max)
|
||||
// thresholdFn(soilList[1], threshold.soil_mois_min, threshold.soil_mois_max)
|
||||
// thresholdFn(soilList[3], threshold.soil_ph_min, threshold.soil_ph_max)
|
||||
// thresholdFn(soilList[4], threshold.soil_n_content_min, threshold.soil_n_content_max)
|
||||
// thresholdFn(soilList[5], threshold.soil_p_content_min, threshold.soil_p_content_max)
|
||||
// thresholdFn(soilList[6], threshold.soil_k_content_min, threshold.soil_k_content_max)
|
||||
|
||||
// }
|
||||
// if (res.data && res.data.monitor && res.data.monitor.air_monitor_data) {
|
||||
// environmentList[0].num = res.data.monitor.air_monitor_data.wind_speed
|
||||
// environmentList[1].num = res.data.monitor.air_monitor_data.wind_direction
|
||||
// environmentList[2].num = res.data.monitor.air_monitor_data.air_temperature
|
||||
// environmentList[3].num = res.data.monitor.air_monitor_data.air_moisture
|
||||
// environmentList[4].num = res.data.monitor.air_monitor_data.co2_content
|
||||
// environmentList[5].num = res.data.monitor.air_monitor_data.pressure
|
||||
// environmentList[6].num = res.data.monitor.air_monitor_data.rainfall
|
||||
// environmentList[7].num = res.data.monitor.air_monitor_data.light_intensity
|
||||
// thresholdFn(environmentList[0], threshold.wind_speed_min, threshold.wind_speed_max)
|
||||
// // thresholdFn(environmentList[1], threshold.wind_speed_min, threshold.wind_speed_max)
|
||||
// thresholdFn(environmentList[2], threshold.air_temp_min, threshold.air_temp_max)
|
||||
// thresholdFn(environmentList[3], threshold.air_mois_min, threshold.air_mois_max)
|
||||
// thresholdFn(environmentList[4], threshold.air_co2_content_min, threshold
|
||||
// .air_co2_content_max)
|
||||
// thresholdFn(environmentList[5], threshold.ambient_air_pressure_min, threshold
|
||||
// .ambient_air_pressure_max)
|
||||
// // thresholdFn(environmentList[6], threshold.ambient_air_pressure_min, threshold.ambient_air_pressure_max)
|
||||
// // thresholdFn(environmentList[6], threshold.ambient_air_pressure_min, threshold.ambient_air_pressure_max)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
|
||||
lindexist({
|
||||
fence_house_id: houseInfo.value.id
|
||||
}).then(res=>{
|
||||
video_url.value = "http://60.204.152.17:8888/live/xumu_user1.live.mp4"
|
||||
console.log(res);
|
||||
})
|
||||
}
|
||||
|
||||
//绑定产品
|
||||
|
@ -510,6 +445,7 @@
|
|||
store.commit('setHouse', houseInfo.value);
|
||||
show.value = false
|
||||
showLoading.value = true
|
||||
getlist();
|
||||
setTimeout(() => {
|
||||
showLoading.value = false
|
||||
}, 1000)
|
||||
|
@ -714,12 +650,11 @@
|
|||
}
|
||||
|
||||
.live {
|
||||
|
||||
|
||||
width: 100%;
|
||||
height: 447rpx;
|
||||
margin-bottom: 20rpx;
|
||||
// background-color: red;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
Promise.resolve("./pages/live/live.js").then((res) => {
|
||||
Promise.resolve("./pages/live/liveIos.js").then((res) => {
|
||||
res.length;
|
||||
});
|
||||
Promise.resolve("./pages/addPlant/select_address_n.js").then((res) => {
|
||||
res.length;
|
||||
});
|
||||
Promise.resolve("./pages/live/loading.js").then((res) => {
|
||||
res.length;
|
||||
});
|
||||
Promise.resolve("./pages/live/loading.js").then((res) => {
|
||||
res.length;
|
||||
});
|
||||
Promise.resolve("./app.css.js").then(() => {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<div id="app"></div>
|
||||
<script src="uni-app-view.umd.js"></script>
|
||||
|
||||
|
||||
<script src="app-renderjs.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
"iPhone",
|
||||
"iPad"
|
||||
],
|
||||
"id": "__UNI__9B6D67A",
|
||||
"id": "__UNI__C509A32",
|
||||
"name": "养殖溯源",
|
||||
"version": {
|
||||
"name": "1.0.2",
|
||||
|
|
Loading…
Reference in New Issue