Merge branch 'bjxz-dev' of http://139.9.66.234:18023/dhp/zhgdyunapp into bjxz-dev

This commit is contained in:
Rain_ 2025-04-10 14:06:42 +08:00
commit 929ae76777
3 changed files with 91 additions and 9 deletions

View File

@ -93,11 +93,11 @@ if (process.env.NODE_ENV === 'development') {
} else {
// 生产环境
console.log('生产环境')
Vue.prototype.url_config = 'http://117.146.73.156:9809/'// 中新建项目
Vue.prototype.work_url = 'http://117.146.73.156:19997'// 工作流地址 通用
// Vue.prototype.url_config = 'http://117.146.73.156:9809/'// 中新建项目
// Vue.prototype.work_url = 'http://117.146.73.156:19997'// 工作流地址 通用
// Vue.prototype.url_config = 'http://121.37.106.37:9809/' // 测试环境
// Vue.prototype.url_config = 'http://101.43.164.214:11111/'
// Vue.prototype.work_url = 'http://101.43.164.214:11131'// 工作流地址 通用
Vue.prototype.url_config = 'http://101.43.164.214:11111/'
Vue.prototype.work_url = 'http://101.43.164.214:11131'// 工作流地址 通用
// Vue.prototype.url_config = 'http://10.168.1.105:11111/' // 线上地址
// Vue.prototype.url_config = 'http://10.168.1.104:11111/' // 线上地址
// Vue.prototype.url_config = 'http://47.93.215.234:9809/' // 鞍钢线上地址(弃用)

View File

@ -2,8 +2,8 @@
"name" : "智慧安全", //
"appid" : "__UNI__4AA4101",
"description" : "",
"versionName" : "1.3.6",
"versionCode" : 136,
"versionName" : "1.3.8",
"versionCode" : 138,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -7,7 +7,21 @@
</headers>
<!-- <video class="videoBox" id="myVideo" :custom-cache="false" :src="url" controls autoplay></video> -->
<!-- 外网IP地址访问视频监控 -->
<video class="videoBox" id="myVideo" :custom-cache="false" :src="playUrlFilter" controls autoplay></video>
<view v-show="isYsy && playUrlFilter && accessToken" :style="{width: '100%', height: '225px'}">
<!-- H5环境使用ezuikit -->
<!-- #ifdef H5 -->
<iframe :src="ysyPlayUrl" :style="webviewStyles" frameborder="0" :scrolling="'no'"></iframe>
<!-- #endif -->
<!-- APP环境使用web-view -->
<!-- #ifdef APP-PLUS -->
<web-view
:src="ysyPlayUrl"
:style="webviewStyles"
:webview-styles="webviewConfig"
></web-view>
<!-- #endif -->
</view>
<video v-show="!isYsy" class="videoBox" id="myVideo" :custom-cache="false" :src="playUrlFilter" controls autoplay></video>
<view class="videoName">
{{videoInfo.videoName}}
<button v-if="videoInfo.videoType==3" type="primary" class="changeBtn btn" @click="changeStreamFn">{{streamType==1?'切换到主码流':'切换到子码流'}}</button>
@ -26,7 +40,7 @@
<view class="zoom zoomout" :style="{backgroundImage: typeName == 'ZOOM_OUT' && videoFlag?'url(../../static/videoControlIcon/4.png)':'url(../../static/videoControlIcon/3.png)'}" @click="controlVideoFn(0,0,-0.2,'ZOOM_OUT')"></view>
</view>
</view>
<view class="video-playback" v-if="videoConfig.videoType != 1" @click="toBackList">
<view class="video-playback" v-if="videoConfig && videoConfig.videoType != 1" @click="toBackList">
视频回放
</view>
</view>
@ -45,6 +59,16 @@
videoFlag: false,
typeName: "",
videoConfig:{},
accessToken: "",
webviewStyles: {
height: '225px',
width: '100%'
},
webviewConfig: {
progress: false, //
scalable: false //
},
pageTop: 44
};
},
onLoad(options) {
@ -58,6 +82,11 @@
}
this.getUseProjectVideoConfig();
},
onReady(){
this.$nextTick(() => {
this.setHeight()
})
},
computed: {
playUrlFilter(){
//
@ -69,9 +98,55 @@
// }
// console.log(url);
return this.url
},
isYsy(){
return this.videoInfo?.videoType == 1
},
ysyPlayUrl() {
//
return `https://open.ys7.com/ezopen/h5/iframe?url=${this.playUrlFilter}&template=simple&autoplay=1&accessToken=${this.accessToken}`
}
},
methods:{
setHeight() {
if(!this.isYsy){
return
}
let height = 0; //
let statusbar = 0
uni.getSystemInfo({
//
success: (sysinfo) => {
statusbar = sysinfo.statusBarHeight;
height = sysinfo.windowHeight; // ---(-50)
},
complete: () => {}
});
this.pageTop = statusbar + 44 + 'px'
// #ifdef APP-PLUS
let currentWebview = this.$scope.$getAppWebview(); //web-view
setTimeout(function() {
let wv = currentWebview.children()[0];
wv.setStyle({ //web-viewpx
top: statusbar + 44 , //
height: 225 , //webview
scalable: false, //webview,
position: "static"
})
wv.addEventListener('loaded', (e) => {
console.log('loaded', e)
wv.setStyle({ //web-viewpx
top: statusbar + 44 , //
height: 225 , //webview
scalable: false, //webview,
position: "static"
})
})
}, 100); //
// #endif
},
getUseProjectVideoConfig() {
var that = this
let requestData = {
@ -115,7 +190,9 @@
success(res){
switch (that.videoInfo.videoType){
case 1:
that.url=res.result.videoInfo.hdFlvAddress
// that.url=res.result.videoInfo.hdFlvAddress
that.url=res.result.videoInfo
that.accessToken = res.result.accessToken
break;
default:
that.url=res.result.videoInfo.url
@ -389,4 +466,9 @@
// margin-top: -20px;
// margin-left: -22px;
// }
// web-view
/deep/ web-view {
background-color: #000;
}
</style>