From ae550f1941aa485caec5a7afe6c374bb3f56a9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E8=8A=B1=E4=B8=80=E4=B8=96=E6=9C=88?= <1149505133@qq.com> Date: Mon, 5 Aug 2024 22:17:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=89=A9=E8=81=94=E7=BD=91):=20=E9=80=9A?= =?UTF-8?q?=E9=81=93=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/video/video-webview.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pages/video/video-webview.vue b/pages/video/video-webview.vue index 98f96ce..452282e 100644 --- a/pages/video/video-webview.vue +++ b/pages/video/video-webview.vue @@ -1,9 +1,10 @@ @@ -16,7 +17,8 @@ deviceObj:null, channeList:[], webviewHost:'', - webviewUrl:'' + webviewUrl:'', + isChanneShow:false, } }, onLoad(option) { @@ -24,6 +26,7 @@ let configIndex = uni.getStorageSync('configIndex'); this.webviewHost = configList[configIndex].protocol + configList[configIndex].address; this.webviewUrl = configList[configIndex].protocol + configList[configIndex].address + '/video/web/h5/index.html'; + // this.webviewUrl = 'http://192.168.31.39:5501/index.html' console.log("option",option) let deviceObj = JSON.parse(decodeURIComponent(option.deviceObj)); this.deviceObj = deviceObj; @@ -34,6 +37,7 @@ console.log("id",id) this.$api.videoApi.getVideoChannelList({pid: id,page:1,pageSize:999}).then(res => { if(res.code == 0){ + // res.data.list = null; if(res.data.list && res.data.list.length>0){ let channeList = res.data.list||[]; // let arr = channeList.map(item=>{ @@ -46,10 +50,12 @@ this.$nextTick(()=>{ this.$set(this,'channeList',res.data.list); let url = this.webviewHost + '/video/web/h5/index.html?deviceObj=' + encodeURIComponent(JSON.stringify(this.deviceObj)) + '&channeList='+encodeURIComponent(JSON.stringify(channeList)) + // let url = 'http://192.168.31.39:5501/index.html?deviceObj=' + encodeURIComponent(JSON.stringify(this.deviceObj)) + '&channeList='+encodeURIComponent(JSON.stringify(channeList)) this.$set(this,'webviewUrl',url); this.isWebview = true; }) }else{ + this.isChanneShow = true; this.$u.toast('通道为空'); this.$nextTick(()=>{ this.$set(this,'channeList',[])