|
@@ -19,10 +19,19 @@
|
|
|
</p>
|
|
|
</teleport> -->
|
|
|
<teleport v-if="refMiniMap && player.showWidgets" :to="refMiniMap">
|
|
|
- <span :class="{ gudieDisabled: isshoppingguide && role != 'leader' }" class="button-switch" @click.stop="toggleMap">
|
|
|
+ <span
|
|
|
+ :class="{ gudieDisabled: isshoppingguide && role != 'leader' }"
|
|
|
+ class="button-switch"
|
|
|
+ @click.stop="toggleMap"
|
|
|
+ >
|
|
|
<ui-icon type="show_map_collect"></ui-icon>
|
|
|
</span>
|
|
|
- <div v-if="controls.showDollhouse" :class="{ gudieDisabled: isshoppingguide && role != 'leader' }" class="change" @click="changeMode('dollhouse')">
|
|
|
+ <div
|
|
|
+ v-if="controls.showDollhouse"
|
|
|
+ :class="{ gudieDisabled: isshoppingguide && role != 'leader' }"
|
|
|
+ class="change"
|
|
|
+ @click="changeMode('dollhouse')"
|
|
|
+ >
|
|
|
<ui-icon type="show_3d_normal"></ui-icon>
|
|
|
<span> 3D模型</span>
|
|
|
</div>
|
|
@@ -51,18 +60,39 @@
|
|
|
|
|
|
<template v-if="refMiniMap && player.showWidgets">
|
|
|
<div
|
|
|
- :class="{ disabled: flying, gudieDisabled: isshoppingguide && role != 'leader' }"
|
|
|
+ :class="{
|
|
|
+ disabled: flying,
|
|
|
+ gudieDisabled: isshoppingguide && role != 'leader',
|
|
|
+ }"
|
|
|
v-show="mode != 'panorama'"
|
|
|
v-if="controls.showFloorplan && controls.showDollhouse"
|
|
|
class="tab-layer"
|
|
|
>
|
|
|
<div class="tabs" v-if="controls.showMap">
|
|
|
- <span :class="{ active: mode === 'floorplan' }" ref="floorplan_ref" @click="changeMode('floorplan', $event)">
|
|
|
- <ui-icon :type="mode == 'floorplan' ? 'show_plane_selected' : 'show_plane_normal'"></ui-icon>
|
|
|
+ <span
|
|
|
+ :class="{ active: mode === 'floorplan' }"
|
|
|
+ ref="floorplan_ref"
|
|
|
+ @click="changeMode('floorplan', $event)"
|
|
|
+ >
|
|
|
+ <ui-icon
|
|
|
+ :type="
|
|
|
+ mode == 'floorplan'
|
|
|
+ ? 'show_plane_selected'
|
|
|
+ : 'show_plane_normal'
|
|
|
+ "
|
|
|
+ ></ui-icon>
|
|
|
二維
|
|
|
</span>
|
|
|
- <span :class="{ active: mode === 'dollhouse' }" ref="dollhouse_ref" @click="changeMode('dollhouse', $event)">
|
|
|
- <ui-icon :type="mode == 'dollhouse' ? 'show_3d_selected' : 'show_3d_normal'"></ui-icon>
|
|
|
+ <span
|
|
|
+ :class="{ active: mode === 'dollhouse' }"
|
|
|
+ ref="dollhouse_ref"
|
|
|
+ @click="changeMode('dollhouse', $event)"
|
|
|
+ >
|
|
|
+ <ui-icon
|
|
|
+ :type="
|
|
|
+ mode == 'dollhouse' ? 'show_3d_selected' : 'show_3d_normal'
|
|
|
+ "
|
|
|
+ ></ui-icon>
|
|
|
|
|
|
三維
|
|
|
</span>
|
|
@@ -111,7 +141,11 @@ let jumpNewScene = (sceneFirstView) => {
|
|
|
if (!browser.hasURLParam("pose")) {
|
|
|
url += `&${sceneFirstView.sceneview}`;
|
|
|
} else {
|
|
|
- url = browser.replaceQueryString(url, "pose", sceneFirstView.sceneview.replace("pose=", ""));
|
|
|
+ url = browser.replaceQueryString(
|
|
|
+ url,
|
|
|
+ "pose",
|
|
|
+ sceneFirstView.sceneview.replace("pose=", "")
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
url = browser.replaceQueryString(url, "m", sceneFirstView.num);
|
|
@@ -173,7 +207,10 @@ const scene$ = ref(null);
|
|
|
const hadVideo = ref(true);
|
|
|
|
|
|
if (!Cache.get("HIDENVIDEOEXPIRES")) {
|
|
|
- if (browser.getURLParam("m") == "eur-KJ-z5ZEV22AeU" && browser.getURLParam("pose") == "pano:408,qua:-0.006,0.6299,0.0049,0.7766") {
|
|
|
+ if (
|
|
|
+ browser.getURLParam("m") == "eur-KJ-z5ZEV22AeU" &&
|
|
|
+ browser.getURLParam("pose") == "pano:408,qua:-0.006,0.6299,0.0049,0.7766"
|
|
|
+ ) {
|
|
|
Cache.set("HIDENVIDEOEXPIRES", "yes", 60 * 8 * 60);
|
|
|
hadVideo.value = false;
|
|
|
} else {
|
|
@@ -191,10 +228,14 @@ const refMiniMap = ref(null);
|
|
|
const isCollapse = ref(false);
|
|
|
const background = ref(null);
|
|
|
const resize = () => {
|
|
|
- if (this.$refs.background && (this.mode == "floorplan" || this.mode == "dollhouse")) {
|
|
|
+ if (
|
|
|
+ this.$refs.background &&
|
|
|
+ (this.mode == "floorplan" || this.mode == "dollhouse")
|
|
|
+ ) {
|
|
|
this.$nextTick(() => {
|
|
|
let $active = $(this.$el).find(".tabs .active");
|
|
|
- background.value.style.width = $active[0].getBoundingClientRect().width + "px";
|
|
|
+ background.value.style.width =
|
|
|
+ $active[0].getBoundingClientRect().width + "px";
|
|
|
background.value.style.left = $active.position().left + "px";
|
|
|
});
|
|
|
}
|
|
@@ -203,12 +244,13 @@ const resize = () => {
|
|
|
watch(
|
|
|
() => isshoppingguide.value,
|
|
|
(val, old) => {
|
|
|
+
|
|
|
let $minmap = document.querySelector("[xui_min_map]");
|
|
|
|
|
|
if ($minmap) {
|
|
|
setTimeout(async () => {
|
|
|
- if (browser.getURLParam("role") == "customer") {
|
|
|
await nextTick();
|
|
|
+ if (browser.getURLParam("role") == "customer") {
|
|
|
if (isshoppingguide.value) {
|
|
|
$minmap.classList.add("gudieDisabled");
|
|
|
} else {
|
|
@@ -220,6 +262,8 @@ watch(
|
|
|
// imgUrl: "https://glp-vr.cdfmembers.com/cdf/file/91dd5305525f463286f03a31abd1c154.jpg",
|
|
|
// });
|
|
|
}
|
|
|
+ } else {
|
|
|
+ $minmap.classList.remove("gudieDisabled");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -272,12 +316,14 @@ watch(
|
|
|
clearTimeout(timer);
|
|
|
if (val == "floorplan") {
|
|
|
if (floorplan_ref.value && floorplan_ref.value) {
|
|
|
- background.value.style.width = floorplan_ref.value.getBoundingClientRect().width + "px";
|
|
|
+ background.value.style.width =
|
|
|
+ floorplan_ref.value.getBoundingClientRect().width + "px";
|
|
|
background.value.style.left = floorplan_ref.value.offsetLeft + "px";
|
|
|
}
|
|
|
} else if (val == "dollhouse") {
|
|
|
if (dollhouse_ref.value && dollhouse_ref.value) {
|
|
|
- background.value.style.width = dollhouse_ref.value.getBoundingClientRect().width + "px";
|
|
|
+ background.value.style.width =
|
|
|
+ dollhouse_ref.value.getBoundingClientRect().width + "px";
|
|
|
background.value.style.left = dollhouse_ref.value.offsetLeft + "px";
|
|
|
}
|
|
|
}
|
|
@@ -363,7 +409,9 @@ onMounted(async () => {
|
|
|
data.hotContent = JSON.parse(data.hotContent);
|
|
|
} catch (error) {}
|
|
|
return `<span class="tag-icon applet_link animate" style="background-image:url(${
|
|
|
- data.hotContent.liveIcon.src ? common.changeUrl(data.hotContent.liveIcon.src) : "{{icon}}"
|
|
|
+ data.hotContent.liveIcon.src
|
|
|
+ ? common.changeUrl(data.hotContent.liveIcon.src)
|
|
|
+ : "{{icon}}"
|
|
|
})"></span>`;
|
|
|
} else if (data.type == "link_scene") {
|
|
|
return `<span class="tag-icon animate" style="background-image:url({{icon}})"></span>
|
|
@@ -375,14 +423,23 @@ onMounted(async () => {
|
|
|
`;
|
|
|
} else if (data.type == "commodity") {
|
|
|
let arr = data.products.map((item) => item.price);
|
|
|
- let priceMin = isFinite(Math.min.apply(null, arr)) ? Math.min.apply(null, arr) : 0;
|
|
|
- let priceMax = isFinite(Math.max.apply(null, arr)) ? Math.max.apply(null, arr) : 0;
|
|
|
- let price = priceMin == priceMax ? priceMax : `${priceMin}-${priceMax}`;
|
|
|
- let range = `${data.products[0] ? data.products[0].symbol : "MOP$"} ${price}`;
|
|
|
+ let priceMin = isFinite(Math.min.apply(null, arr))
|
|
|
+ ? Math.min.apply(null, arr)
|
|
|
+ : 0;
|
|
|
+ let priceMax = isFinite(Math.max.apply(null, arr))
|
|
|
+ ? Math.max.apply(null, arr)
|
|
|
+ : 0;
|
|
|
+ let price =
|
|
|
+ priceMin == priceMax ? priceMax : `${priceMin}-${priceMax}`;
|
|
|
+ let range = `${
|
|
|
+ data.products[0] ? data.products[0].symbol : "MOP$"
|
|
|
+ } ${price}`;
|
|
|
return `<span class="tag-icon animate" style="background-image:url({{icon}})"></span>
|
|
|
<div class="tag-body">
|
|
|
<div data-id="${data.sid}" class="tag-commodity">
|
|
|
- <div style="background-image:url(${data.products[0] ? data.products[0].pic : ""})" class='tag-avatar'>
|
|
|
+ <div style="background-image:url(${
|
|
|
+ data.products[0] ? data.products[0].pic : ""
|
|
|
+ })" class='tag-avatar'>
|
|
|
</div>
|
|
|
<p class="tag-title">${data.title}</p>
|
|
|
<p class="tag-info">${range} | 查看 ></p>
|
|
@@ -404,10 +461,16 @@ onMounted(async () => {
|
|
|
if (isshoppingguide.value) {
|
|
|
return;
|
|
|
}
|
|
|
- document.querySelector(`[data-tag-id="${tag.sid}"] .tag-icon`).style.display = "none";
|
|
|
- let hotcontent = typeof tag.hotContent == "string" ? JSON.parse(tag.hotContent) : tag.hotContent;
|
|
|
+ document.querySelector(
|
|
|
+ `[data-tag-id="${tag.sid}"] .tag-icon`
|
|
|
+ ).style.display = "none";
|
|
|
+ let hotcontent =
|
|
|
+ typeof tag.hotContent == "string"
|
|
|
+ ? JSON.parse(tag.hotContent)
|
|
|
+ : tag.hotContent;
|
|
|
browser.openLink(
|
|
|
- "/subPackage/pages/activity/activity?pageId=" + hotcontent.couponLink,
|
|
|
+ "/subPackage/pages/activity/activity?pageId=" +
|
|
|
+ hotcontent.couponLink,
|
|
|
`https://m.cdfmembers.com/shop/600667208/showactivity?pageId=${hotcontent.couponLink}`,
|
|
|
`/pages/showactivity/showactivity?pageId=${hotcontent.couponLink}`
|
|
|
);
|
|
@@ -424,9 +487,13 @@ onMounted(async () => {
|
|
|
if (isshoppingguide.value) {
|
|
|
return;
|
|
|
}
|
|
|
- let hotcontent = typeof tag.hotContent == "string" ? JSON.parse(tag.hotContent) : tag.hotContent;
|
|
|
+ let hotcontent =
|
|
|
+ typeof tag.hotContent == "string"
|
|
|
+ ? JSON.parse(tag.hotContent)
|
|
|
+ : tag.hotContent;
|
|
|
browser.openLink(
|
|
|
- "/subPackage/pages/home/home?pageType=2&pageId=" + hotcontent.liveLink,
|
|
|
+ "/subPackage/pages/home/home?pageType=2&pageId=" +
|
|
|
+ hotcontent.liveLink,
|
|
|
`https://m.cdfmembers.com/shop/600667208/showactivity?pageId=${hotcontent.liveLink}`,
|
|
|
`/pages/showactivity/showactivity?pageId=${hotcontent.liveLink}`
|
|
|
);
|
|
@@ -441,7 +508,10 @@ onMounted(async () => {
|
|
|
|
|
|
view.on("focus", (e) => {
|
|
|
document.querySelectorAll("[xui_tags_view] >div").forEach((el) => {
|
|
|
- if (el.getAttribute("data-tag-type") == "link_scene" || el.getAttribute("data-tag-type") == "commodity") {
|
|
|
+ if (
|
|
|
+ el.getAttribute("data-tag-type") == "link_scene" ||
|
|
|
+ el.getAttribute("data-tag-type") == "commodity"
|
|
|
+ ) {
|
|
|
el.querySelector(".tag-body").classList.remove("show");
|
|
|
el.style.zIndex = "auto";
|
|
|
}
|
|
@@ -449,11 +519,16 @@ onMounted(async () => {
|
|
|
if (e.data.type == "commodity" || e.data.type == "link_scene") {
|
|
|
e.target.style.zIndex = "999";
|
|
|
e.target.querySelector(".tag-body").classList.add("show");
|
|
|
- e.target.querySelector(".tag-commodity").removeEventListener("click", onClickTagInfo);
|
|
|
- e.target.querySelector(".tag-commodity").addEventListener("click", onClickTagInfo);
|
|
|
+ e.target
|
|
|
+ .querySelector(".tag-commodity")
|
|
|
+ .removeEventListener("click", onClickTagInfo);
|
|
|
+ e.target
|
|
|
+ .querySelector(".tag-commodity")
|
|
|
+ .addEventListener("click", onClickTagInfo);
|
|
|
|
|
|
if (tagid) {
|
|
|
- document.querySelector(`[data-id="${tagid}"]`) && document.querySelector(`[data-id="${tagid}"]`).click();
|
|
|
+ document.querySelector(`[data-id="${tagid}"]`) &&
|
|
|
+ document.querySelector(`[data-id="${tagid}"]`).click();
|
|
|
tagid = null;
|
|
|
}
|
|
|
}
|
|
@@ -564,7 +639,9 @@ onMounted(async () => {
|
|
|
),
|
|
|
});
|
|
|
});
|
|
|
- app.store.on("floorcad", (floor) => store.commit("scene/loadFloorData", floor));
|
|
|
+ app.store.on("floorcad", (floor) =>
|
|
|
+ store.commit("scene/loadFloorData", floor)
|
|
|
+ );
|
|
|
|
|
|
app.render();
|
|
|
document.removeEventListener("visibilitychange", visibilitychangeFn);
|
|
@@ -672,7 +749,11 @@ onMounted(async () => {
|
|
|
width: 2px;
|
|
|
height: 28px;
|
|
|
bottom: -30px;
|
|
|
- background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
|
|
|
+ background: linear-gradient(
|
|
|
+ 145deg,
|
|
|
+ rgba(255, 255, 255, 0.8),
|
|
|
+ rgba(255, 255, 255, 0)
|
|
|
+ );
|
|
|
position: absolute;
|
|
|
}
|
|
|
.tag-avatar {
|