1.监管端重点工程显示视频
parent
beeb53f40e
commit
332a6dbc9a
|
@ -109,10 +109,23 @@ 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;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<video id="coursewareVideo" src="https://arqsp.qhdsafety.com:10010/api/v1/stream/start?serial=34020000001110001307&code=34020000001320000004&channel=1&token=&_=1733366514489"
|
<video id="coursewareVideo" :src="src"
|
||||||
controls autoplay="autoplay" style="width: 100%;"></video>
|
controls autoplay="autoplay" style="width: 100%;"></video>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -12,7 +12,8 @@ import {getPlatVideoPlay, loginVideoPlat} from "@/api";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
info: {}
|
info: {},
|
||||||
|
src:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
@ -24,25 +25,17 @@ export default {
|
||||||
this.fnInitVideoPlat()
|
this.fnInitVideoPlat()
|
||||||
},
|
},
|
||||||
async fnInitVideoPlat(){
|
async fnInitVideoPlat(){
|
||||||
// this.src = 'https://arqsp.qhdsafety.com:10010/api/v1/stream/start?serial=34020000001110001307&code=34020000001320000004&channel=1&token=&_=1733366514489'
|
const resData = await getPlatVideoPlay({
|
||||||
// console.log(src)
|
serial: this.info.serial ,
|
||||||
|
code: this.info.code,
|
||||||
|
channel: 1,
|
||||||
|
})
|
||||||
|
this.src =resData.HLS
|
||||||
},
|
},
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue