This commit is contained in:
zmj 2023-12-24 20:53:41 +08:00
parent f0ad4502ee
commit b19a0b310d
35 changed files with 169 additions and 192 deletions

View File

@ -2,7 +2,7 @@
"version" : "1.0", "version" : "1.0",
"configurations" : [ "configurations" : [
{ {
"playground" : "custom", "playground" : "standard",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
}, },
{ {

32
App.vue
View File

@ -1,37 +1,9 @@
<script> <script>
export default { export default {
onLaunch: function() { onLaunch: function() {
let timer = null
uni.$on('close', function(data) {
timer = setTimeout(() => {
// uni.request({
// url: 'https://iot.lihaink.cn/close_stream', //
// });
console.log("关闭定时器")
}, 60000)
})
uni.$on('push', function(data) {
if (timer) {
clearTimeout(timer);
}
// uni.request({
// url: 'https://iot.lihaink.cn/push_stream',
// });
})
}, },
onShow: function() { onShow: function() {
console.log('App Show') console.log('App Show')
@ -40,10 +12,6 @@
onHide: function() { onHide: function() {
console.log('App Hide') console.log('App Hide')
// uni.request({
// url: 'https://iot.lihaink.cn/close_stream',
// });
}, },
} }

View File

@ -1,47 +1,47 @@
{ {
"name" : "种植溯源", "name": "种植溯源",
"appid" : "__UNI__D087881", "appid": "__UNI__D087881",
"description" : "", "description": "",
"versionName" : "1.0.2", "versionName": "1.0.2",
"versionCode" : 102, "versionCode": 102,
"transformPx" : false, "transformPx": false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus": {
"usingComponents" : true, "usingComponents": true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"compatible" : { "compatible": {
"ignoreVersion" : true //trueHBuilderX1.9.0 "ignoreVersion": true //trueHBuilderX1.9.0
}, },
"screenOrientation" : [ "screenOrientation": [
"portrait-primary", "portrait-primary",
"portrait-secondary", "portrait-secondary",
"landscape-primary", "landscape-primary",
"landscape-secondary" "landscape-secondary"
], ],
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
/* */ /* */
"modules" : { "modules": {
"Geolocation" : {}, "Geolocation": {},
"Maps" : {}, "Maps": {},
"LivePusher" : {}, "LivePusher": {},
"VideoPlayer" : {}, "VideoPlayer": {},
"Barcode" : {}, "Barcode": {},
"Camera" : {}, "Camera": {},
"UniMP" : { "UniMP": {
"description" : "uni小程序" "description": "uni小程序"
} }
}, },
/* */ /* */
"distribute" : { "distribute": {
/* android */ /* android */
"android" : { "android": {
"permissions" : [ "permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
@ -60,57 +60,57 @@
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
], ],
"minSdkVersion" : 21 "minSdkVersion": 21
}, },
/* ios */ /* ios */
"ios" : { "ios": {
"dSYMs" : false "dSYMs": false
}, },
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs": {
"ad" : {}, "ad": {},
"geolocation" : { "geolocation": {
"amap" : { "amap": {
"name" : "amapC2GgorTaY", "name": "amapC2GgorTaY",
"__platform__" : [ "ios", "android" ], "__platform__": ["ios", "android"],
"appkey_ios" : "a8c8821159c1781d4ea4651df856b872", "appkey_ios": "a8c8821159c1781d4ea4651df856b872",
"appkey_android" : "a8c8821159c1781d4ea4651df856b872" "appkey_android": "a8c8821159c1781d4ea4651df856b872"
}, },
"system" : { "system": {
"__platform__" : [ "ios", "android" ] "__platform__": ["ios", "android"]
} }
}, },
"maps" : { "maps": {
"amap" : { "amap": {
"name" : "amapC2GgorTaY", "name": "amapC2GgorTaY",
"appkey_ios" : "a8c8821159c1781d4ea4651df856b872", "appkey_ios": "a8c8821159c1781d4ea4651df856b872",
"appkey_android" : "a8c8821159c1781d4ea4651df856b872" "appkey_android": "a8c8821159c1781d4ea4651df856b872"
} }
} }
} }
} }
}, },
/* */ /* */
"quickapp" : {}, "quickapp": {},
/* */ /* */
"mp-weixin" : { "mp-weixin": {
"appid" : "", "appid": "",
"setting" : { "setting": {
"urlCheck" : false "urlCheck": false
}, },
"usingComponents" : true "usingComponents": true
}, },
"mp-alipay" : { "mp-alipay": {
"usingComponents" : true "usingComponents": true
}, },
"mp-baidu" : { "mp-baidu": {
"usingComponents" : true "usingComponents": true
}, },
"mp-toutiao" : { "mp-toutiao": {
"usingComponents" : true "usingComponents": true
}, },
"uniStatistics" : { "uniStatistics": {
"enable" : false "enable": false
}, },
"vueVersion" : "3" "vueVersion": "3"
} }

View File

@ -198,32 +198,33 @@
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
}, },
"tabBar": { "tabBar": {
"color": "#FFFFFF", "color": "#282828",
"selectedColor": "#34D190", "selectedColor": "#0122C7",
"borderStyle": "white", "borderStyle": "white",
"backgroundColor": "#FFFFFF", "backgroundColor": "#ffffff",
"iconWidth": "40px",
"list": [{ "list": [{
"pagePath": "pages/index/massif", "pagePath": "pages/index/massif",
"text": "", "text": "首45",
"iconPath": "static/main/index/sy.png", "iconPath": "static/tabs-icon/home.png",
"selectedIconPath": "static/main/index/sydj.png" "selectedIconPath": "static/tabs-icon/home-a.png"
}, },
{ {
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"text": "", "text": "审1批",
"iconPath": "static/main/index/dk.png", "iconPath": "static/tabs-icon/Task.png",
"selectedIconPath": "static/main/index/dkdj.png" "selectedIconPath": "static/tabs-icon/Task-a.png"
}, },
{ {
"pagePath": "pages/index/personal", "pagePath": "pages/index/personal",
"text": "", "text": "任务",
"iconPath": "static/main/index/wd.png", "iconPath": "static/tabs-icon/approval.png",
"selectedIconPath": "static/main/index/wddj.png" "selectedIconPath": "static/tabs-icon/approval-a.png"
} }
] ]
}, },
"uniIdRouter": {} "uniIdRouter": {}
} }

View File

@ -7,6 +7,9 @@
<Myindex style="float: right;"></Myindex> <Myindex style="float: right;"></Myindex>
<view class="" v-show="false">
<image src="/static/tabs-icon/dk.png"></image>
</view>
<view class="content"> <view class="content">
@ -159,9 +162,6 @@
</view> --> </view> -->
</view> </view>
</view> </view>
<view class="agreement"> <view class="agreement">
<text>登录代表您已经同意</text> <text style="color:#2D94FE ;">服务协议隐私政策</text> <text>登录代表您已经同意</text> <text style="color:#2D94FE ;">服务协议隐私政策</text>
@ -193,6 +193,8 @@
.input-card { .input-card {
width: 700rpx; width: 700rpx;
box-sizing: border-box; box-sizing: border-box;
border-radius: 20rpx;
overflow: hidden;
.card-head { .card-head {
background-color: #fff; background-color: #fff;

View File

@ -99,6 +99,10 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>

View File

@ -62,6 +62,8 @@
<view class="land-info"> <view class="land-info">
<view class="land-area"> <view class="land-area">
土地面积 土地面积
<view class=""> <view class="">
{{dataobj.total_area|| "--"}} {{dataobj.total_area|| "--"}}
</view> </view>
@ -97,7 +99,9 @@
</view> </view>
<view class="live"> <view class="live">
<u--image src="/static/img/viedobg.png" v-if="video_url" width="100%"></u--image> <u--image
src="https://ceshi-worker-task.lihaink.cn/uploads/images/20231223/20231223092144475437017.png"
v-if="video_url" width="100%"></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=""
@ -497,7 +501,7 @@
const bgc = (icon) => { const bgc = (icon) => {
return `/static/main/index/${icon}.png` return `/static/main/index/${icon}.png`
} }
const video_url = ref(5) const video_url = ref()
// //
const getlist = () => { const getlist = () => {
lindexist({ lindexist({
@ -515,7 +519,7 @@
} }
// video_url=res.data. // video_url=res.data.
threshold = res.data.monitor.threshold threshold = res.data?.monitor?.threshold || ""
if (Object.keys(res.data).length > 0) { if (Object.keys(res.data).length > 0) {
getlist3(res.data.id) getlist3(res.data.id)
Object.assign(dataobj, res.data); Object.assign(dataobj, res.data);
@ -584,7 +588,7 @@
}).then((res) => { }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
tdId.value = res.data[0].id tdId.value = res.data[0]?.id || ''
getlist() getlist()
if (res.data.length > 0) { if (res.data.length > 0) {
columns.splice(0, columns.length, ...res.data.map((step, index) => { columns.splice(0, columns.length, ...res.data.map((step, index) => {

View File

@ -12,8 +12,8 @@
</view> </view>
</view> </view>
<view class="video" style="position: relative;"> <view class="video" style="position: relative;">
<u--image src="/static/img/viedobg.png" width="100%" height="300rpx" @click="goLive" <u--image src="https://ceshi-worker-task.lihaink.cn/uploads/images/20231223/20231223092144475437017.png"
v-if="videoUrl"></u--image> width="100%" height="300rpx" @click="goLive" v-if="videoUrl"></u--image>
<u--image src="/static/main/index/k.png" width="100%" height="300rpx" v-else></u--image> <u--image src="/static/main/index/k.png" width="100%" height="300rpx" v-else></u--image>
<view class="" <view class=""
@ -144,7 +144,6 @@
onShow onShow
} from "@dcloudio/uni-app" } from "@dcloudio/uni-app"
const videoUrl = ref('') const videoUrl = ref('')
console.log(videoUrl.value)
const goLive = () => { const goLive = () => {
uni.navigateTo({ uni.navigateTo({
@ -223,10 +222,9 @@
}).then((res) => { }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
console.log(res.data)
if (res.data.user_id == 23) { if (res.data.user_id == 23) {
videoUrl.value = // videoUrl.value =
'http://rtsp.lihaink.cn/live/lihai_lot_walnutpi_dev_4.live.mp4?secret=YwDtp2llj80HA19JhMXL4Po99nsMAyNT' // 'http://rtsp.lihaink.cn/live/lihai_lot_walnutpi_dev_4.live.mp4?secret=YwDtp2llj80HA19JhMXL4Po99nsMAyNT'
} }
console.log(videoUrl.value) console.log(videoUrl.value)
// videoUrl.value=res.data. // videoUrl.value=res.data.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 772 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1016 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/tabs-icon/Task-a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

BIN
static/tabs-icon/Task.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

View File

Before

Width:  |  Height:  |  Size: 1023 B

After

Width:  |  Height:  |  Size: 1023 B

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
static/tabs-icon/home-a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

BIN
static/tabs-icon/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/tabs-icon/my-a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
static/tabs-icon/my.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -123,7 +123,7 @@
}, },
"allowsInlineMediaPlayback": true, "allowsInlineMediaPlayback": true,
"safearea": { "safearea": {
"background": "#FFFFFF", "background": "#ffffff",
"bottom": { "bottom": {
"offset": "auto" "offset": "auto"
} }
@ -144,33 +144,33 @@
}, },
"tabBar": { "tabBar": {
"position": "bottom", "position": "bottom",
"color": "#FFFFFF", "color": "#282828",
"selectedColor": "#34D190", "selectedColor": "#0122C7",
"borderStyle": "rgba(255,255,255,0.4)", "borderStyle": "rgba(255,255,255,0.4)",
"blurEffect": "none", "blurEffect": "none",
"fontSize": "10px", "fontSize": "10px",
"iconWidth": "40px", "iconWidth": "24px",
"spacing": "3px", "spacing": "3px",
"height": "50px", "height": "50px",
"backgroundColor": "#FFFFFF", "backgroundColor": "#ffffff",
"list": [ "list": [
{ {
"pagePath": "pages/index/massif", "pagePath": "pages/index/massif",
"text": "", "text": "首页",
"iconPath": "/static/main/index/sy.png", "iconPath": "/static/tabs-icon/home.png",
"selectedIconPath": "/static/main/index/sydj.png" "selectedIconPath": "/static/tabs-icon/home-a.png"
}, },
{ {
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"text": "", "text": "审批",
"iconPath": "/static/main/index/dk.png", "iconPath": "/static/tabs-icon/Task.png",
"selectedIconPath": "/static/main/index/dkdj.png" "selectedIconPath": "/static/tabs-icon/Task-a.png"
}, },
{ {
"pagePath": "pages/index/personal", "pagePath": "pages/index/personal",
"text": "", "text": "任务",
"iconPath": "/static/main/index/wd.png", "iconPath": "/static/tabs-icon/approval.png",
"selectedIconPath": "/static/main/index/wddj.png" "selectedIconPath": "/static/tabs-icon/approval-a.png"
} }
], ],
"selectedIndex": 0, "selectedIndex": 0,