You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.2 KiB
58 lines
1.2 KiB
<template> |
|
<view class="container"> |
|
<web-view :src="'/hybrid/html/h5player.html?url=' + this.url"></web-view> |
|
</view> |
|
</template> |
|
|
|
<script> |
|
export default { |
|
data() { |
|
return { |
|
url: '', |
|
player: null, |
|
info:{} |
|
} |
|
}, |
|
onLoad(options) { |
|
console.log('options ===>',options.item) |
|
this.info = JSON.parse(options.item) |
|
console.log('info ===>',JSON.parse(this.info.tags)) |
|
if(this.info){ |
|
let val = JSON.parse(this.info.tags); |
|
if(val.cameraIndexCode){ |
|
let params = { |
|
cameraIndexCode:val.cameraIndexCode |
|
} |
|
uni.request({ |
|
url: getApp().globalData.apiUrl + '/alarmInformation/preview', |
|
method: 'GET', |
|
params, |
|
success: (res) => { |
|
console.log('res ===>',res) |
|
if(res.data.code === 0 || res.data.code == 200) { |
|
this.url = res.data.url |
|
} |
|
}, |
|
fail: (err) => { |
|
console.log(err) |
|
} |
|
}) |
|
} |
|
} |
|
// this.url = options.url ? decodeURIComponent(options.url) : |
|
// 'https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv'; |
|
}, |
|
mounted() { |
|
}, |
|
methods: { |
|
} |
|
} |
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
page, |
|
.container { |
|
min-height: 100vh; |
|
background-color: #fff; |
|
} |
|
</style> |