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

Loading…
Cancel
Save