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

init
gongdi 4 years ago
parent e164578578
commit ec5a5f7020

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

Loading…
Cancel
Save