Compare commits
2 Commits
cc8ff0d52b
...
4dcbb45f02
Author | SHA1 | Date |
---|---|---|
|
4dcbb45f02 | |
|
332a6dbc9a |
|
@ -121,11 +121,24 @@ export default {
|
||||||
this.fnGetData();
|
this.fnGetData();
|
||||||
},
|
},
|
||||||
fnVideo(video) {
|
fnVideo(video) {
|
||||||
|
const params = this.getUrlParams(video.old)
|
||||||
uni.$u.route({
|
uni.$u.route({
|
||||||
url: '/pages/key-project-management/positioning_management/videoView',
|
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>
|
</script>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<video id="coursewareVideo" :src="src"
|
<video id="coursewareVideo" :src="src"
|
||||||
controls autoplay="autoplay" style="width: 100%;"></video>
|
controls autoplay="autoplay" style="width: 100%;"></video>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
info: {},
|
info: {},
|
||||||
src: ''
|
src:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
@ -21,35 +21,21 @@ export default {
|
||||||
this.fnInit()
|
this.fnInit()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fnInit() {
|
fnInit(){
|
||||||
this.fnInitVideoPlat()
|
this.fnInitVideoPlat()
|
||||||
},
|
},
|
||||||
async fnInitVideoPlat() {
|
async fnInitVideoPlat(){
|
||||||
const resData = await getPlatVideoPlay({
|
const resData = await getPlatVideoPlay({
|
||||||
serial: '34020000001110001307',
|
serial: this.info.serial ,
|
||||||
code: '34020000001320000004',
|
code: this.info.code,
|
||||||
channel: 1,
|
channel: 1,
|
||||||
})
|
})
|
||||||
this.src = resData.HLS
|
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)
|
|
||||||
},
|
},
|
||||||
fnBack() {
|
fnBack() {
|
||||||
uni.$u.route({
|
uni.$u.route({
|
||||||
type: 'navigateBack'
|
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>
|
<style lang="scss" scoped>
|
||||||
.content {
|
.content {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 20rpx;
|
padding: 0 20upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 40upx;
|
||||||
|
margin-bottom: 40upx;
|
||||||
|
|
||||||
|
button {
|
||||||
|
width: 70%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue