Compare commits
2 Commits
cc8ff0d52b
...
4dcbb45f02
Author | SHA1 | Date |
---|---|---|
|
4dcbb45f02 | |
|
332a6dbc9a |
|
@ -121,11 +121,24 @@ export default {
|
|||
this.fnGetData();
|
||||
},
|
||||
fnVideo(video) {
|
||||
const params = this.getUrlParams(video.old)
|
||||
uni.$u.route({
|
||||
url: '/pages/key-project-management/positioning_management/videoView',
|
||||
params: video
|
||||
params: params
|
||||
})
|
||||
}
|
||||
},
|
||||
getUrlParams(url) {
|
||||
const params = {};
|
||||
const paramStr = url.split('?')[1]; // 获取问号后面的参数部分
|
||||
if (paramStr) {
|
||||
const paramArr = paramStr.split('&'); // 将参数字符串分割成键值对数组
|
||||
paramArr.forEach((param) => {
|
||||
const [key, value] = param.split('='); // 将键值对字符串分割成键和值
|
||||
params[key] = value; // 将键值对添加到params对象中
|
||||
});
|
||||
}
|
||||
return params;
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<video id="coursewareVideo" :src="src"
|
||||
controls autoplay="autoplay" style="width: 100%;"></video>
|
||||
<video id="coursewareVideo" :src="src"
|
||||
controls autoplay="autoplay" style="width: 100%;"></video>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -13,7 +13,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
info: {},
|
||||
src: ''
|
||||
src:''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
@ -21,35 +21,21 @@ export default {
|
|||
this.fnInit()
|
||||
},
|
||||
methods: {
|
||||
fnInit() {
|
||||
fnInit(){
|
||||
this.fnInitVideoPlat()
|
||||
},
|
||||
async fnInitVideoPlat() {
|
||||
async fnInitVideoPlat(){
|
||||
const resData = await getPlatVideoPlay({
|
||||
serial: '34020000001110001307',
|
||||
code: '34020000001320000004',
|
||||
serial: this.info.serial ,
|
||||
code: this.info.code,
|
||||
channel: 1,
|
||||
})
|
||||
this.src = resData.HLS
|
||||
// this.src = 'https://arqsp.qhdsafety.com:10010/api/v1/stream/start?serial=34020000001110001307&code=34020000001320000004&channel=1&token=&_=1733366514489'
|
||||
// console.log(src)
|
||||
this.src =resData.HLS
|
||||
},
|
||||
fnBack() {
|
||||
uni.$u.route({
|
||||
type: 'navigateBack'
|
||||
})
|
||||
},
|
||||
getUrlParams(url) {
|
||||
const params = {};
|
||||
const paramStr = url.split('?')[1]; // 获取问号后面的参数部分
|
||||
if (paramStr) {
|
||||
const paramArr = paramStr.split('&'); // 将参数字符串分割成键值对数组
|
||||
paramArr.forEach((param) => {
|
||||
const [key, value] = param.split('='); // 将键值对字符串分割成键和值
|
||||
params[key] = value; // 将键值对添加到params对象中
|
||||
});
|
||||
}
|
||||
return params;
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -58,6 +44,16 @@ export default {
|
|||
<style lang="scss" scoped>
|
||||
.content {
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
padding: 0 20upx;
|
||||
}
|
||||
|
||||
.button {
|
||||
text-align: center;
|
||||
margin-top: 40upx;
|
||||
margin-bottom: 40upx;
|
||||
|
||||
button {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue