|
@@ -9,8 +9,14 @@
|
|
|
|
|
|
<template v-if="showSnapshot && currentScene">
|
|
|
<snapshot :showFlash="showFlash"></snapshot>
|
|
|
- <button class="ui-button submit" @click="onClick">将当前视角设为初始画面</button>
|
|
|
+ <button class="ui-button submit set-initial-view" :class="{disable: currentScene.type === '4dkk',}" @click="onClick">将当前视角设为初始画面</button>
|
|
|
</template>
|
|
|
+
|
|
|
+ <div class="btn-4dkk-tip" v-if="currentScene.type ==='4dkk'">
|
|
|
+ <img src="@/assets/images/default/empty-go-4dkk.png" alt="" draggable="false">
|
|
|
+ <div>请前往四维时代个人中心编辑场景~</div>
|
|
|
+ <button class="ui-button submit" @click="onClickGo4dkk">立即前往</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -30,7 +36,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
showFlash: false,
|
|
|
- inter: null
|
|
|
+ inter: null,
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -58,45 +64,45 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
if (newVal.type == '4dkk') {
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- $("#pano").empty();
|
|
|
- window.vrInitFn = () => {
|
|
|
- $waiting.hide()
|
|
|
- __krfn.utils.initHotspot(this.$getKrpano(), newVal && newVal.someData, true);
|
|
|
- __krfn.utils.toggleHotspot(this.$getKrpano(), this.$route.name == "hotspot");
|
|
|
- };
|
|
|
- window.vrViewFn = () => {
|
|
|
- try {
|
|
|
- let tmp = newVal.initVisual;
|
|
|
- this.$getKrpano().set("view.vlookat", tmp.vlookat);
|
|
|
- this.$getKrpano().set("view.hlookat", tmp.hlookat);
|
|
|
- } catch (error) {
|
|
|
- error;
|
|
|
+ $("#pano").empty();
|
|
|
+ } else {
|
|
|
+ $("#pano").empty();
|
|
|
+ window.vrInitFn = () => {
|
|
|
+ $waiting.hide()
|
|
|
+ __krfn.utils.initHotspot(this.$getKrpano(), newVal && newVal.someData, true);
|
|
|
+ __krfn.utils.toggleHotspot(this.$getKrpano(), this.$route.name == "hotspot");
|
|
|
+ };
|
|
|
+ window.vrViewFn = () => {
|
|
|
+ try {
|
|
|
+ let tmp = newVal.initVisual;
|
|
|
+ this.$getKrpano().set("view.vlookat", tmp.vlookat);
|
|
|
+ this.$getKrpano().set("view.hlookat", tmp.hlookat);
|
|
|
+ } catch (error) {
|
|
|
+ error;
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ var settings = {
|
|
|
+ "events[skin_events].onxmlcomplete": "js(window.vrViewFn());",
|
|
|
+ "events[skin_events].onloadcomplete": "js(window.vrInitFn());",
|
|
|
+ };
|
|
|
+
|
|
|
+ if (newVal) {
|
|
|
+ removepano("#pano");
|
|
|
+ $waiting.show();
|
|
|
+ embedpano({
|
|
|
+ // http://oss-xiaoan.oss-cn-shenzhen.aliyuncs.com/720yun_fd_manage/fd720_Va0LrkXW3/vtour/tour.xml
|
|
|
+ // xml: "%HTMLPATH%/static/template/tour.xml",
|
|
|
+ xml: `${this.$cdn}/720yun_fd_manage/${newVal.sceneCode}/vtour/tour.xml`,
|
|
|
+ swf: "%HTMLPATH%/static/template/tour.swf",
|
|
|
+ target: "pano",
|
|
|
+ html5: "auto",
|
|
|
+ mobilescale: 1,
|
|
|
+ vars: settings,
|
|
|
+ webglsettings: { preserveDrawingBuffer: true },
|
|
|
+ passQueryParameters: true,
|
|
|
+ });
|
|
|
}
|
|
|
- };
|
|
|
-
|
|
|
- var settings = {
|
|
|
- "events[skin_events].onxmlcomplete": "js(window.vrViewFn());",
|
|
|
- "events[skin_events].onloadcomplete": "js(window.vrInitFn());",
|
|
|
- };
|
|
|
-
|
|
|
- if (newVal) {
|
|
|
- removepano("#pano");
|
|
|
- $waiting.show();
|
|
|
- embedpano({
|
|
|
- // http://oss-xiaoan.oss-cn-shenzhen.aliyuncs.com/720yun_fd_manage/fd720_Va0LrkXW3/vtour/tour.xml
|
|
|
- // xml: "%HTMLPATH%/static/template/tour.xml",
|
|
|
- xml: `${this.$cdn}/720yun_fd_manage/${newVal.sceneCode}/vtour/tour.xml`,
|
|
|
- swf: "%HTMLPATH%/static/template/tour.swf",
|
|
|
- target: "pano",
|
|
|
- html5: "auto",
|
|
|
- mobilescale: 1,
|
|
|
- vars: settings,
|
|
|
- webglsettings: { preserveDrawingBuffer: true },
|
|
|
- passQueryParameters: true,
|
|
|
- });
|
|
|
}
|
|
|
},
|
|
|
isConfirmingPosi(newVal) {
|
|
@@ -144,13 +150,13 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
addhotspot(param) {
|
|
|
__krfn.utils.addhotspot(this.$getKrpano(), param, true);
|
|
|
this.$store.commit("tags/setIsConfirmingPosi", param.name);
|
|
|
-
|
|
|
+ },
|
|
|
+ onClickGo4dkk() {
|
|
|
+ window.open('/#/')
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
mounted() {
|
|
|
window.__krfn = __krfn;
|
|
@@ -198,7 +204,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .ui-button {
|
|
|
+ button.set-initial-view {
|
|
|
position: absolute;
|
|
|
bottom: 260px;
|
|
|
min-width: 200px;
|
|
@@ -206,5 +212,28 @@ export default {
|
|
|
transform: translateX(-50%);
|
|
|
z-index: 99;
|
|
|
}
|
|
|
+
|
|
|
+ .btn-4dkk-tip {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ z-index: 99;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ > img {
|
|
|
+ width: 120px;
|
|
|
+ }
|
|
|
+ > div {
|
|
|
+ color: #a3a3a3;
|
|
|
+ font-size: 14px;
|
|
|
+ white-space: pre;
|
|
|
+ margin-top: 1em;
|
|
|
+ }
|
|
|
+ > button {
|
|
|
+ margin-top: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|