洋浦学校项目阶段代码提交

init
gongdi 4 years ago
parent e164578578
commit ec5a5f7020

@ -24,11 +24,20 @@
load3DModel:false,//3D
model3DUrl:"",//3D
pointerEvents:"auto",
env:getEnv()
env:getEnv(),
modelId:1,
}
},
mounted(){
this.cancelLoading();
window.addEventListener('message',(event)=>{
this.listen3DEvent(event)
})
},
beforeDestroy(){
window.removeEventListener('message',(event)=>{
this.listen3DEvent(event)
},true);
},
watch:{
$route:{
@ -72,12 +81,13 @@
* 改变div背景图 以及事件穿透属性值
* */
changeBackGround:function (modelId) {
this.modelId = modelId;
if(modelId !== 3){
if(modelId == 1){
//
window.removeEventListener('message',(event)=>{
this.listen3DEvent(event)
})
// window.removeEventListener('message',(event)=>{
// this.listen3DEvent(event)
// })
if(this.env === "development"){
// this.model3DUrl = "https://three-dimensional.obs.myhuaweicloud.com/tech-tools/others/yangpuxuexiao3D/index.html?AccessKeyId=WAFBGJACKDOQZDH1MKZ1&Expires=1667894500&Signature=mE9wpuN1ImyOz3yMGPwiaI0UPaU%3D";
}else {
@ -89,17 +99,11 @@
//this.model3DUrl = "https://three-dimensional.obs.myhuaweicloud.com/tech-tools/others/yangpuxuexiaonew/index.html?AccessKeyId=WAFBGJACKDOQZDH1MKZ1&Expires=1668049230&Signature=r4Vs%2BaCdcmsQso6Pq2/luCcJU3U%3D";
}else {
this.model3DUrl = "./3D/builds-b1/index.html";
window.addEventListener('message',(event)=>{
this.listen3DEvent(event)
})
}
}
this.pointerEvents = "none";
document.getElementById("screenContent").style.backgroundImage = "";
}else {
window.removeEventListener('message',(event)=>{
this.listen3DEvent(event)
})
this.load3DModel = false;
this.model3DUrl = "";
this.pointerEvents = "auto";
@ -110,16 +114,28 @@
if(event.data){
switch (event.data){
case 'click_01':
//
this.$router.push({path:'/adminCenter'});
if(this.modelId === 1){
window.open("https://720yun.com/t/09vkOb1h78b?scene_id=59463132")
}else {
//
this.$router.push({path:'/adminCenter'});
}
break;
case 'click_02':
//
this.$router.push({path:'/serviceCenter'});
if(this.modelId === 1){
window.open("https://720yun.com/t/09vkOb1h78b?scene_id=59463132")
}else {
//
this.$router.push({path:'/serviceCenter'});
}
break;
case 'click_03':
//
this.$router.push({path:'/monitorCenter'});
if(this.modelId === 1){
window.open("https://720yun.com/t/09vkOb1h78b?scene_id=58868837")
}else {
//
this.$router.push({path:'/monitorCenter'});
}
break;
case 'click_04':
//

Loading…
Cancel
Save