This commit is contained in:
weipengfei 2024-01-27 17:32:54 +08:00
parent 0c36432c23
commit cfe4152839
9 changed files with 41 additions and 97 deletions

View File

@ -9,7 +9,7 @@ let HTTP_REQUEST_URL
let HEADER let HEADER
if (env == 'dev') { if (env == 'dev') {
// BASE_URL = 'http://ceshi-suyuan.lihaink.cn/' // 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') { } else if (env = 'prod') {
BASE_URL = 'http://ceshi-suyuan.lihaink.cn/' BASE_URL = 'http://ceshi-suyuan.lihaink.cn/'
} }

View File

@ -1,6 +1,6 @@
{ {
"name" : "养殖溯源", "name" : "养殖溯源",
"appid" : "__UNI__9B6D67A", "appid" : "__UNI__C509A32",
"description" : "", "description" : "",
"versionName" : "1.0.2", "versionName" : "1.0.2",
"versionCode" : 102, "versionCode" : 102,

View File

@ -101,10 +101,10 @@
{ {
"path": "pages/live/live", "path": "pages/live/live",
"style": { "style": {
"navigationBarTitleText": "苗情监测", "navigationBarTitleText": "养殖监测",
// "navigationStyle": "custom", // "navigationStyle": "custom",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#35D190", "navigationBarBackgroundColor": "#feb048",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"subNVues": [{ "subNVues": [{
@ -128,10 +128,10 @@
{ {
"path": "pages/live/liveIos", "path": "pages/live/liveIos",
"style": { "style": {
"navigationBarTitleText": "苗情监测", "navigationBarTitleText": "养殖监测",
// "navigationStyle": "custom", // "navigationStyle": "custom",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#35D190", "navigationBarBackgroundColor": "#feb048",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus": { "app-plus": {
"subNVues": [{ "subNVues": [{

View File

@ -71,18 +71,6 @@
</view> </view>
</view> </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="live-tit" style="color: #1A1A1A;">
<view class="tit" style=""> <view class="tit" style="">
养殖基地监控数据 养殖基地监控数据
@ -93,15 +81,12 @@
</view> </view>
<!-- <view class="live">
<u--image :src="u('K')" width="100%"></u--image>
</view> -->
<view class="live"> <view class="live">
<u--image :src="videoCover" v-if="video_url" width="100%" height="450rpx"></u--image> <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> <u--image :src="u('K')" v-else width="100%"></u--image>
<view class="" <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"> @click="goLive" v-if="video_url">
<u-icon name="play-circle" size="40" color="white" 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> style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);"></u-icon>
@ -255,13 +240,16 @@
}, },
]) ])
const userInfo = ref({});
onLoad(() => { onLoad(() => {
// console.log(store.state.userInfo) // console.log(store.state.userInfo)
if (!store.state.userInfo) { if (!store.state.userInfo) {
uni.redirectTo({ uni.redirectTo({
url: '/pages/Login/login' url: '/pages/Login/login'
}) })
}else {
userInfo.value = store.state.userInfo;
} }
}) })
const dataobj = ref({}) const dataobj = ref({})
@ -288,23 +276,14 @@
const goLive = () => { const goLive = () => {
let system = uni.getSystemInfoSync().platform; let system = uni.getSystemInfoSync().platform;
userInfo.value.master_phone = "lihai_lot_land_1"
userInfo.value.device_id = "6"
uni.navigateTo({ 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 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 show = ref(false)
const showLoading = ref(false) const showLoading = ref(false)
const columns = reactive([]); const columns = reactive([]);
@ -409,61 +388,17 @@
return farm_types_lists.value.find(item=>item.value==dataobj.value.farm_type)?.name || '' return farm_types_lists.value.find(item=>item.value==dataobj.value.farm_type)?.name || ''
}) })
//
const monitor = ref({});
// //
const getlist = () => { const getlist = () => {
// lindexist({ lindexist({
// land_id: tdId.value fence_house_id: houseInfo.value.id
// }).then((res) => { }).then(res=>{
// if (res.code == 1) { video_url.value = "http://60.204.152.17:8888/live/xumu_user1.live.mp4"
// userInfo.value = res.data console.log(res);
// 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)
// }
// }
// }
// })
} }
// //
@ -510,6 +445,7 @@
store.commit('setHouse', houseInfo.value); store.commit('setHouse', houseInfo.value);
show.value = false show.value = false
showLoading.value = true showLoading.value = true
getlist();
setTimeout(() => { setTimeout(() => {
showLoading.value = false showLoading.value = false
}, 1000) }, 1000)
@ -714,12 +650,11 @@
} }
.live { .live {
width: 100%; width: 100%;
height: 447rpx; height: 447rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
// background-color: red; // background-color: red;
position: relative;
} }

View File

@ -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; res.length;
}); });
Promise.resolve("./app.css.js").then(() => { Promise.resolve("./app.css.js").then(() => {

View File

@ -17,7 +17,7 @@
<div id="app"></div> <div id="app"></div>
<script src="uni-app-view.umd.js"></script> <script src="uni-app-view.umd.js"></script>
<script src="app-renderjs.js"></script>
</body> </body>
</html> </html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
"iPhone", "iPhone",
"iPad" "iPad"
], ],
"id": "__UNI__9B6D67A", "id": "__UNI__C509A32",
"name": "养殖溯源", "name": "养殖溯源",
"version": { "version": {
"name": "1.0.2", "name": "1.0.2",