|
@@ -9,18 +9,18 @@
|
|
|
<Information v-if="!isshoppingguide" />
|
|
|
<Control />
|
|
|
<teleport v-if="refMiniMap && player.showWidgets" :to="refMiniMap">
|
|
|
- <span :class="{ gudieDisabled: isshoppingguide }" class="button-switch" @click.stop="toggleMap">
|
|
|
+ <span :class="{ gudieDisabled: isshoppingguide && role.value != 'leader' }" class="button-switch" @click.stop="toggleMap">
|
|
|
<ui-icon type="show_map_collect"></ui-icon>
|
|
|
</span>
|
|
|
|
|
|
- <p class="change" :class="{ gudieDisabled: isshoppingguide }" @click="changeMode('dollhouse', $event, 'focus3d')">
|
|
|
+ <p class="change" :class="{ gudieDisabled: isshoppingguide && role.value != 'leader' }" @click="changeMode('dollhouse', $event, 'focus3d')">
|
|
|
<ui-icon type="show_3d_normal"></ui-icon>
|
|
|
3D模型
|
|
|
</p>
|
|
|
</teleport>
|
|
|
<template v-if="refMiniMap && player.showWidgets">
|
|
|
<div
|
|
|
- :class="{ disabled: flying, gudieDisabled: isshoppingguide }"
|
|
|
+ :class="{ disabled: flying, gudieDisabled: isshoppingguide && role.value != 'leader' }"
|
|
|
v-show="mode != 'panorama'"
|
|
|
v-if="controls.showFloorplan && controls.showDollhouse"
|
|
|
class="tab-layer"
|
|
@@ -60,6 +60,7 @@ import Control from "@/components/Controls/Control.Mobile.vue";
|
|
|
import LoadingLogo from "@/components/shared/Loading.vue";
|
|
|
import OpenVideo from "@/components/openVideo/";
|
|
|
import Guide from "@/components/shared/Guide.vue";
|
|
|
+import { Dialog } from "@/global_components/";
|
|
|
|
|
|
import { createApp } from "@/app";
|
|
|
import { ref, onMounted, computed, nextTick, watch } from "vue";
|
|
@@ -109,6 +110,15 @@ const closetagtype = () => {
|
|
|
type: "",
|
|
|
data: {},
|
|
|
});
|
|
|
+
|
|
|
+ if (isshoppingguide.value) {
|
|
|
+ if (role.value == "leader") {
|
|
|
+ socket.value &&
|
|
|
+ socket.value.emit("action", {
|
|
|
+ type: "tagclose",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
const socket = computed(() => store.getters["rtc/socket"]);
|
|
|
|
|
@@ -138,6 +148,10 @@ if (!Cache.get("HIDENVIDEOEXPIRES")) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+if (role.value) {
|
|
|
+ hadVideo.value = true;
|
|
|
+}
|
|
|
+
|
|
|
const show = ref(false);
|
|
|
const dataLoaded = ref(false);
|
|
|
const refMiniMap = ref(null);
|
|
@@ -153,24 +167,15 @@ const resize = () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-// watch(
|
|
|
-// () => hadVideo.value,
|
|
|
-// (val, old) => {
|
|
|
-// if (val) {
|
|
|
-// app.Scene.unlock();
|
|
|
-// }
|
|
|
-// }
|
|
|
-// );
|
|
|
-
|
|
|
watch(
|
|
|
() => isshoppingguide.value,
|
|
|
(val, old) => {
|
|
|
- if (role.value == "leader") {
|
|
|
- return
|
|
|
- }
|
|
|
let $minmap = document.querySelector("[xui_min_map]");
|
|
|
if ($minmap) {
|
|
|
setTimeout(async () => {
|
|
|
+ if (role.value == "leader") {
|
|
|
+ return;
|
|
|
+ }
|
|
|
await nextTick();
|
|
|
if (isshoppingguide.value) {
|
|
|
$minmap.classList.add("gudieDisabled");
|
|
@@ -256,12 +261,27 @@ const onClickTagInfo = (el) => {
|
|
|
type: "goodlist",
|
|
|
data: item,
|
|
|
});
|
|
|
+ guideclicktag(item);
|
|
|
} else if (item.type == "link_scene") {
|
|
|
let sceneFirstView = item.hotContent.sceneFirstView;
|
|
|
window.location.href = jumpNewScene(sceneFirstView);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+const guideclicktag = (tag) => {
|
|
|
+ if (isshoppingguide.value) {
|
|
|
+ if (role.value == "leader") {
|
|
|
+ socket.value &&
|
|
|
+ socket.value.emit("action", {
|
|
|
+ type: "tagclick",
|
|
|
+ data: {
|
|
|
+ sid: tag.sid,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
onMounted(async () => {
|
|
|
apis.burying_point({ type: 0 });
|
|
|
|
|
@@ -326,18 +346,6 @@ onMounted(async () => {
|
|
|
var tag = e.data;
|
|
|
// 聚焦當前點擊的熱點
|
|
|
view.focus(tag.sid).then(() => {
|
|
|
- if (isshoppingguide.value) {
|
|
|
- if (role.value == "leader") {
|
|
|
- socket.value &&
|
|
|
- socket.value.emit("action", {
|
|
|
- type: "tagclick",
|
|
|
- data: {
|
|
|
- sid: tag.sid,
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
if (tag.type == "coupon") {
|
|
|
try {
|
|
|
document.querySelector(`[data-tag-id="${tag.sid}"] .tag-icon`).style.display = "none";
|
|
@@ -354,6 +362,7 @@ onMounted(async () => {
|
|
|
type: "waterfall",
|
|
|
data: tag,
|
|
|
});
|
|
|
+ guideclicktag(tag);
|
|
|
} else if (tag.type == "applet_link") {
|
|
|
try {
|
|
|
let hotcontent = typeof tag.hotContent == "string" ? JSON.parse(tag.hotContent) : tag.hotContent;
|
|
@@ -402,6 +411,22 @@ onMounted(async () => {
|
|
|
app.Scene.on("ready", () => {
|
|
|
show.value = true;
|
|
|
});
|
|
|
+ app.Scene.on("error", (data) => {
|
|
|
+ switch (data.code) {
|
|
|
+ case 5033:
|
|
|
+ Dialog.alert("该场景正在计算中,请稍后再试");
|
|
|
+ break;
|
|
|
+ case 5034:
|
|
|
+ Dialog.alert("服务端开小差,请稍后再试");
|
|
|
+ break;
|
|
|
+ case 5009:
|
|
|
+ Dialog.alert("服务端开小差,请稍后再试");
|
|
|
+ break;
|
|
|
+ case 5005:
|
|
|
+ Dialog.alert("服务端开小差,请稍后再试");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ });
|
|
|
app.Scene.on("loaded", (pano) => {
|
|
|
refMiniMap.value = "[xui_min_map]";
|
|
|
store.commit("setFloorId", pano.floorIndex);
|