Browse Source

正则匹配来替换域名,一劳永逸吧

dongming
mk 8 months ago
parent
commit
25efab8b67
  1. 12
      src/views/dataBoard/IoTPerception/Videosurveillance/cpts/videoDialog.vue

12
src/views/dataBoard/IoTPerception/Videosurveillance/cpts/videoDialog.vue

@ -149,15 +149,15 @@ export default {
},
methods: {
async getVideoUrl(){
let {data,code} = await requestPost('/actual/base/videoMonitoring/getVideoUrl',{monitorCode:this.monitorCode})
if(code === 0){
this.url = data.replace('https://111.34.21.222:12443/',`${window.SITE_CONFIG['liveURL']}`)
this.play()
async getVideoUrl() {
let { data, code } = await requestPost('/actual/base/videoMonitoring/getVideoUrl', { monitorCode: this.monitorCode });
if (code === 0) {
const serverRegex = /^http:\/\/[^\/]+/;
this.url = data.replace(serverRegex, `${window.SITE_CONFIG['liveURL']}`);
this.play();
}
},
create(options) {
console.log('seeee');
options = options || {};
this.jessibuca = new window.Jessibuca(
Object.assign(

Loading…
Cancel
Save