From 8666942a2b6c6d398553895ac3574df77f7f3bd3 Mon Sep 17 00:00:00 2001 From: gongdi <410827992@qq.com> Date: Fri, 26 Nov 2021 17:09:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=8B=E6=B5=A6=E6=99=BA=E6=85=A7=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F=E9=98=B6=E6=AE=B5=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/homePages/menuTop/modelSelect.vue | 12 ++++-------- src/views/screenAdaptation/pages/index.vue | 18 +++++++----------- src/views/screenAdaptation/router/index.js | 12 ++++++------ 3 files changed, 17 insertions(+), 25 deletions(-) diff --git a/src/views/screenAdaptation/pages/homePages/menuTop/modelSelect.vue b/src/views/screenAdaptation/pages/homePages/menuTop/modelSelect.vue index 48591a0..82e3174 100644 --- a/src/views/screenAdaptation/pages/homePages/menuTop/modelSelect.vue +++ b/src/views/screenAdaptation/pages/homePages/menuTop/modelSelect.vue @@ -19,21 +19,18 @@ data(){ return { modelTypes: [ - {id: 1, value: "中心模式"}, - {id: 2, value: "三维模式"}, - {id: 3, value: "导航模式"} + {id: 1, value: "立体校园"}, + {id: 2, value: "中心模式"}, + {id: 3, value: "驾驶舱模式"} ], currentModel: { - id: 1, value: "中心模式" + id: 1, value: "立体校园" } } }, watch:{ $route:{ handler(val,oldval){ - console.log("111路由监听......") - console.log(val);//新路由信息 - console.log(oldval);//老路由信息 let path = val.path; //this.model3DUrl = "https://three-dimensional.obs.myhuaweicloud.com/tech-tools/others/yangpuxuexiaonew/index.html?AccessKeyId=WAFBGJACKDOQZDH1MKZ1&Expires=1668049230&Signature=r4Vs%2BaCdcmsQso6Pq2/luCcJU3U%3D"; //document.getElementById("backIframe").src = "https://three-dimensional.obs.myhuaweicloud.com/tech-tools/others/yangpuxuexiaonew/index.html?AccessKeyId=WAFBGJACKDOQZDH1MKZ1&Expires=1668049230&Signature=r4Vs%2BaCdcmsQso6Pq2/luCcJU3U%3D"; @@ -43,7 +40,6 @@ } }, mounted(){ - console.log("zouzheleme",this.$route.path) this.$emit("modelChange",this.currentModel.id) }, methods: { diff --git a/src/views/screenAdaptation/pages/index.vue b/src/views/screenAdaptation/pages/index.vue index cad6378..0e1d2f3 100644 --- a/src/views/screenAdaptation/pages/index.vue +++ b/src/views/screenAdaptation/pages/index.vue @@ -31,9 +31,6 @@ watch:{ $route:{ handler(val,oldval){ - console.log("路由监听......") - console.log(val);//新路由信息 - console.log(oldval);//老路由信息 let path = val.path; //this.model3DUrl = "https://three-dimensional.obs.myhuaweicloud.com/tech-tools/others/yangpuxuexiaonew/index.html?AccessKeyId=WAFBGJACKDOQZDH1MKZ1&Expires=1668049230&Signature=r4Vs%2BaCdcmsQso6Pq2/luCcJU3U%3D"; //document.getElementById("backIframe").src = "https://three-dimensional.obs.myhuaweicloud.com/tech-tools/others/yangpuxuexiaonew/index.html?AccessKeyId=WAFBGJACKDOQZDH1MKZ1&Expires=1668049230&Signature=r4Vs%2BaCdcmsQso6Pq2/luCcJU3U%3D"; @@ -51,17 +48,17 @@ modelChange: function (modelId) { switch (modelId) { case 1: - //中心模式 + //立体校园 this.changeBackGround(modelId); - this.$router.replace({path:"/dynamic"}); + this.$router.replace({path:"/threeDimensionalSchool"}); break; case 2: - //三维模式 + //中心模式 this.changeBackGround(modelId); - this.$router.replace({path:"/threeDimensionalSchool"}); + this.$router.replace({path:"/dynamic"}); break; case 3: - //导航模式 + //驾驶舱模式 this.changeBackGround(modelId); this.$router.replace({path:"/traditional"}); break; @@ -73,12 +70,11 @@ * 改变div背景图 以及事件穿透属性值 * */ changeBackGround:function (modelId) { - console.log("3d:",modelId) if(modelId !== 3){ if(modelId == 1){ - 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 = "https://three-dimensional.obs.myhuaweicloud.com/tech-tools/others/yangpuxuexiao3D/index.html?AccessKeyId=WAFBGJACKDOQZDH1MKZ1&Expires=1667894500&Signature=mE9wpuN1ImyOz3yMGPwiaI0UPaU%3D"; + }else { + this.model3DUrl = "https://three-dimensional.obs.myhuaweicloud.com/tech-tools/others/yangpuxuexiaonew/index.html?AccessKeyId=WAFBGJACKDOQZDH1MKZ1&Expires=1668049230&Signature=r4Vs%2BaCdcmsQso6Pq2/luCcJU3U%3D"; } this.pointerEvents = "none"; document.getElementById("screenContent").style.backgroundImage = ""; diff --git a/src/views/screenAdaptation/router/index.js b/src/views/screenAdaptation/router/index.js index 8a69b23..337f37c 100644 --- a/src/views/screenAdaptation/router/index.js +++ b/src/views/screenAdaptation/router/index.js @@ -25,18 +25,18 @@ let routes = [ name: 'main', component: Index, children: [ + { + title: "立体校园", + path: "/threeDimensionalSchool", + name: "threeDimensionalSchoolPage", + component: () => import("../pages/homePages/threeDimensionalSchoolModel/threeDimensionalSchoolModel.vue"), + }, { title: "中心模式", path: "/dynamic", name: "dynamicPage", component: () => import("../pages/homePages/dynamicMode/dynamicMode.vue"), }, - { - title: "三维模式", - path: "/threeDimensionalSchool", - name: "threeDimensionalSchoolPage", - component: () => import("../pages/homePages/threeDimensionalSchoolModel/threeDimensionalSchoolModel.vue"), - }, { title: "导航模式", path: "/traditional",