wx-program
parent
9a5a3658f4
commit
4a4eba81bf
|
@ -131,6 +131,13 @@
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/videoLive/video-webView",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|
|
@ -163,7 +163,7 @@
|
||||||
toVideoLive(cameraSerialNumber,cameraChannelNumber) {
|
toVideoLive(cameraSerialNumber,cameraChannelNumber) {
|
||||||
if(cameraSerialNumber && cameraChannelNumber){
|
if(cameraSerialNumber && cameraChannelNumber){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/videoLive/videoLive?cameraSerialNumber=' + cameraSerialNumber + '&cameraChannelNumber=' + cameraChannelNumber
|
url: '/pages/videoLive/video-webView?cameraSerialNumber=' + cameraSerialNumber + '&cameraChannelNumber=' + cameraChannelNumber
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
<template>
|
||||||
|
<view class="videoLive">
|
||||||
|
<web-view v-if='src' :src="src"></web-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
token:'',
|
||||||
|
id:'',
|
||||||
|
src:'',
|
||||||
|
userid:'',
|
||||||
|
deviceId:'',
|
||||||
|
cameraSerialNumber :'',
|
||||||
|
cameraChannelNumber:'',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
if(options){
|
||||||
|
this.cameraSerialNumber = options.cameraSerialNumber;
|
||||||
|
this.cameraChannelNumber = options.cameraChannelNumber
|
||||||
|
}
|
||||||
|
let that = this
|
||||||
|
uni.getStorage({
|
||||||
|
key: 'token',
|
||||||
|
success: function(res) {
|
||||||
|
// console.log('res',res);
|
||||||
|
that.token = res.data;
|
||||||
|
uni.getStorage({
|
||||||
|
key:'userid',
|
||||||
|
success:function(res){
|
||||||
|
that.userid = res.data
|
||||||
|
// that.src = `https://portal.lihe-control.com/#/irrigateSet?id=${that.id}&token=${that.token}&userid=${that.userid}&deviceId=${that.deviceId}`
|
||||||
|
that.src = `https://portal.lihe-control.com/#/videoLive?cameraSerialNumber=${that.cameraSerialNumber}&token=${that.token}&userid=${that.userid}&cameraChannelNumber=${that.cameraChannelNumber}`
|
||||||
|
console.log(that.src,11);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail:function(err){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/timeVideo/timeVideo'
|
||||||
|
});
|
||||||
|
uni.showToast({
|
||||||
|
title: "跳转失败!",
|
||||||
|
icon: 'fail',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.videoLive{
|
||||||
|
width: 100%;
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #F5F6FA;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue