|
@@ -1,6 +1,5 @@
|
|
<template>
|
|
<template>
|
|
- <LoadingLogo v-if="hadVideo" :thumb="true" />
|
|
|
|
- <OpenVideo v-else @close="hadVideo = true" />
|
|
|
|
|
|
+ <LoadingLogo :thumb="true" />
|
|
<Guide />
|
|
<Guide />
|
|
|
|
|
|
<div class="ui-view-layout" :class="{ show: show }" is-mobile="true">
|
|
<div class="ui-view-layout" :class="{ show: show }" is-mobile="true">
|
|
@@ -119,7 +118,6 @@ import Waterfall from "@/components/Tags/waterfall.vue";
|
|
import Information from "@/components/Information";
|
|
import Information from "@/components/Information";
|
|
import Control from "@/components/Controls/Control.Mobile.vue";
|
|
import Control from "@/components/Controls/Control.Mobile.vue";
|
|
import LoadingLogo from "@/components/shared/Loading.vue";
|
|
import LoadingLogo from "@/components/shared/Loading.vue";
|
|
-import OpenVideo from "@/components/openVideo/";
|
|
|
|
import Guide from "@/components/shared/Guide.vue";
|
|
import Guide from "@/components/shared/Guide.vue";
|
|
import { Dialog } from "@/global_components/";
|
|
import { Dialog } from "@/global_components/";
|
|
|
|
|
|
@@ -128,33 +126,11 @@ import { ref, onMounted, computed, nextTick, watch } from "vue";
|
|
import { useStore } from "vuex";
|
|
import { useStore } from "vuex";
|
|
import browser from "@/utils/browser";
|
|
import browser from "@/utils/browser";
|
|
import { useApp, getApp } from "@/app";
|
|
import { useApp, getApp } from "@/app";
|
|
-import common from "@/utils/common";
|
|
|
|
-import { Cache } from "@/utils/index";
|
|
|
|
-import wxShare from "@/utils/wxshare";
|
|
|
|
|
|
|
|
-import * as apis from "@/apis/index.js";
|
|
|
|
const store = useStore();
|
|
const store = useStore();
|
|
|
|
|
|
-let jumpNewScene = (sceneFirstView) => {
|
|
|
|
- let url = window.location.href;
|
|
|
|
-
|
|
|
|
- if (!browser.hasURLParam("pose")) {
|
|
|
|
- url += `&${sceneFirstView.sceneview}`;
|
|
|
|
- } else {
|
|
|
|
- url = browser.replaceQueryString(
|
|
|
|
- url,
|
|
|
|
- "pose",
|
|
|
|
- sceneFirstView.sceneview.replace("pose=", "")
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- url = browser.replaceQueryString(url, "m", sceneFirstView.num);
|
|
|
|
- return url;
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
let visibilitychangeFn = () => {
|
|
let visibilitychangeFn = () => {
|
|
if (browser.isTabHidden()) {
|
|
if (browser.isTabHidden()) {
|
|
- apis.burying_point({ type: 1 });
|
|
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
@@ -204,23 +180,6 @@ const controls = computed(() => {
|
|
const mode = computed(() => store.getters["mode"]);
|
|
const mode = computed(() => store.getters["mode"]);
|
|
const showNavigations = computed(() => store.getters["showNavigations"]);
|
|
const showNavigations = computed(() => store.getters["showNavigations"]);
|
|
const scene$ = ref(null);
|
|
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"
|
|
|
|
- ) {
|
|
|
|
- Cache.set("HIDENVIDEOEXPIRES", "yes", 60 * 8 * 60);
|
|
|
|
- hadVideo.value = false;
|
|
|
|
- } else {
|
|
|
|
- hadVideo.value = true;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-if (browser.getURLParam("role")) {
|
|
|
|
- hadVideo.value = true;
|
|
|
|
-}
|
|
|
|
|
|
|
|
const show = ref(false);
|
|
const show = ref(false);
|
|
const dataLoaded = ref(false);
|
|
const dataLoaded = ref(false);
|
|
@@ -244,23 +203,16 @@ const resize = () => {
|
|
watch(
|
|
watch(
|
|
() => isshoppingguide.value,
|
|
() => isshoppingguide.value,
|
|
(val, old) => {
|
|
(val, old) => {
|
|
-
|
|
|
|
let $minmap = document.querySelector("[xui_min_map]");
|
|
let $minmap = document.querySelector("[xui_min_map]");
|
|
|
|
|
|
if ($minmap) {
|
|
if ($minmap) {
|
|
setTimeout(async () => {
|
|
setTimeout(async () => {
|
|
- await nextTick();
|
|
|
|
|
|
+ await nextTick();
|
|
if (browser.getURLParam("role") == "customer") {
|
|
if (browser.getURLParam("role") == "customer") {
|
|
if (isshoppingguide.value) {
|
|
if (isshoppingguide.value) {
|
|
$minmap.classList.add("gudieDisabled");
|
|
$minmap.classList.add("gudieDisabled");
|
|
} else {
|
|
} else {
|
|
$minmap.classList.remove("gudieDisabled");
|
|
$minmap.classList.remove("gudieDisabled");
|
|
- // wxShare({
|
|
|
|
- // title: `cdf澳門上葡京店~`,
|
|
|
|
- // desc: "cdf澳門上葡京店~",
|
|
|
|
- // link: window.location.href.split("#")[0],
|
|
|
|
- // imgUrl: "https://glp-vr.cdfmembers.com/cdf/file/91dd5305525f463286f03a31abd1c154.jpg",
|
|
|
|
- // });
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
$minmap.classList.remove("gudieDisabled");
|
|
$minmap.classList.remove("gudieDisabled");
|
|
@@ -359,17 +311,11 @@ const toggleMap = () => {
|
|
const onClickTagInfo = (el) => {
|
|
const onClickTagInfo = (el) => {
|
|
el.stopPropagation();
|
|
el.stopPropagation();
|
|
let item = tags.value.find((item) => item.sid == el.target.dataset.id);
|
|
let item = tags.value.find((item) => item.sid == el.target.dataset.id);
|
|
- if (item.type == "commodity") {
|
|
|
|
- guideclicktag(item);
|
|
|
|
- store.commit("tag/setTagClickType", {
|
|
|
|
- type: "goodlist",
|
|
|
|
- data: item,
|
|
|
|
- });
|
|
|
|
- } else if (item.type == "link_scene") {
|
|
|
|
- guideclicktag(item);
|
|
|
|
- let sceneFirstView = item.hotContent.sceneFirstView;
|
|
|
|
- window.location.href = jumpNewScene(sceneFirstView);
|
|
|
|
- }
|
|
|
|
|
|
+ guideclicktag(item);
|
|
|
|
+ store.commit("tag/setTagClickType", {
|
|
|
|
+ type: "goodlist",
|
|
|
|
+ data: item,
|
|
|
|
+ });
|
|
};
|
|
};
|
|
|
|
|
|
const guideclicktag = (tag) => {
|
|
const guideclicktag = (tag) => {
|
|
@@ -388,8 +334,6 @@ const guideclicktag = (tag) => {
|
|
};
|
|
};
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
- apis.burying_point({ type: 0 });
|
|
|
|
-
|
|
|
|
app = createApp({
|
|
app = createApp({
|
|
num: browser.getURLParam("m"),
|
|
num: browser.getURLParam("m"),
|
|
dom: scene$.value,
|
|
dom: scene$.value,
|
|
@@ -400,143 +344,50 @@ onMounted(async () => {
|
|
app
|
|
app
|
|
.use("TagView", {
|
|
.use("TagView", {
|
|
render(data) {
|
|
render(data) {
|
|
- if (data.type == "waterfall") {
|
|
|
|
- return `<span class="tag-icon waterfall animate" style="background-image:url({{icon}})"></span>`;
|
|
|
|
- } else if (data.type == "coupon") {
|
|
|
|
- return `<span class="tag-icon coupon animate" style="background-image:url({{icon}})"></span>`;
|
|
|
|
- } else if (data.type == "applet_link") {
|
|
|
|
- try {
|
|
|
|
- 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}}"
|
|
|
|
- })"></span>`;
|
|
|
|
- } else if (data.type == "link_scene") {
|
|
|
|
|
|
+ if (data.media["image"] && data.media["image"].length) {
|
|
return `<span class="tag-icon animate" style="background-image:url({{icon}})"></span>
|
|
return `<span class="tag-icon animate" style="background-image:url({{icon}})"></span>
|
|
<div class="tag-body">
|
|
<div class="tag-body">
|
|
- <div data-id="${data.sid}" class="tag-commodity tag-link_scene">
|
|
|
|
- <p class="tag-title">點擊前往下一個區域</p>
|
|
|
|
|
|
+ <div data-id="${data.sid}" class="tag-commodity">
|
|
|
|
+ <div style="background-image:url(${ app.resource.getUserResourceURL(data.media["image"][0].src)+'&x-oss-process=image/resize,m_fill,w_80,h_80'})" class='tag-avatar'></div>
|
|
|
|
+ <p class="tag-title">${data.title}</p>
|
|
|
|
+ <p class="tag-info">查看</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
`;
|
|
- } 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}`;
|
|
|
|
- return `<span class="tag-icon animate" style="background-image:url({{icon}})"></span>
|
|
|
|
|
|
+ }
|
|
|
|
+ return `<span class="tag-icon animate" style="background-image:url({{icon}})"></span>
|
|
<div class="tag-body">
|
|
<div class="tag-body">
|
|
<div data-id="${data.sid}" class="tag-commodity">
|
|
<div data-id="${data.sid}" class="tag-commodity">
|
|
- <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-title">${data.title}</p>
|
|
- <p class="tag-info">${range} | 查看 ></p>
|
|
|
|
|
|
+ <p class="tag-info">查看</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
`;
|
|
- } else {
|
|
|
|
- return `<span class="tag-icon animate" style="background-image:url({{icon}})"></span>`;
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
})
|
|
})
|
|
.then((view) => {
|
|
.then((view) => {
|
|
view.on("click", (e) => {
|
|
view.on("click", (e) => {
|
|
var tag = e.data;
|
|
var tag = e.data;
|
|
// 聚焦當前點擊的熱點
|
|
// 聚焦當前點擊的熱點
|
|
- view.focus(tag.sid).then(() => {
|
|
|
|
- if (tag.type == "coupon") {
|
|
|
|
- try {
|
|
|
|
- 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;
|
|
|
|
- browser.openLink(
|
|
|
|
- "/subPackage/pages/activity/activity?pageId=" +
|
|
|
|
- hotcontent.couponLink,
|
|
|
|
- `https://m.cdfmembers.com/shop/600667208/showactivity?pageId=${hotcontent.couponLink}`,
|
|
|
|
- `/pages/showactivity/showactivity?pageId=${hotcontent.couponLink}`
|
|
|
|
- );
|
|
|
|
- apis.burying_point({ type: 2 });
|
|
|
|
- } catch (error) {}
|
|
|
|
- } else if (tag.type == "waterfall") {
|
|
|
|
- store.commit("tag/setTagClickType", {
|
|
|
|
- type: "waterfall",
|
|
|
|
- data: tag,
|
|
|
|
- });
|
|
|
|
- guideclicktag(tag);
|
|
|
|
- } else if (tag.type == "applet_link") {
|
|
|
|
- try {
|
|
|
|
- if (isshoppingguide.value) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- let hotcontent =
|
|
|
|
- typeof tag.hotContent == "string"
|
|
|
|
- ? JSON.parse(tag.hotContent)
|
|
|
|
- : tag.hotContent;
|
|
|
|
- browser.openLink(
|
|
|
|
- "/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}`
|
|
|
|
- );
|
|
|
|
- } catch (error) {}
|
|
|
|
- } else if (tag.type == "link_scene") {
|
|
|
|
- guideclicktag(tag);
|
|
|
|
- let sceneFirstView = tag.hotContent.sceneFirstView;
|
|
|
|
- window.location.href = jumpNewScene(sceneFirstView);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ view.focus(tag.sid).then(() => {});
|
|
});
|
|
});
|
|
|
|
|
|
view.on("focus", (e) => {
|
|
view.on("focus", (e) => {
|
|
document.querySelectorAll("[xui_tags_view] >div").forEach((el) => {
|
|
document.querySelectorAll("[xui_tags_view] >div").forEach((el) => {
|
|
- 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";
|
|
|
|
- }
|
|
|
|
|
|
+ el.querySelector(".tag-body").classList.remove("show");
|
|
|
|
+ el.style.zIndex = "auto";
|
|
});
|
|
});
|
|
- 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);
|
|
|
|
-
|
|
|
|
- if (tagid) {
|
|
|
|
- document.querySelector(`[data-id="${tagid}"]`) &&
|
|
|
|
- document.querySelector(`[data-id="${tagid}"]`).click();
|
|
|
|
- tagid = null;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ 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);
|
|
});
|
|
});
|
|
|
|
|
|
- view.on("rendered", (e) => {
|
|
|
|
- tagid && view.focus(tagid);
|
|
|
|
- }); //dom渲染完成
|
|
|
|
|
|
+ view.on("rendered", (e) => {}); //dom渲染完成
|
|
});
|
|
});
|
|
|
|
|
|
app.use("TourPlayer");
|
|
app.use("TourPlayer");
|
|
@@ -607,13 +458,10 @@ onMounted(async () => {
|
|
store.commit("setFlying", false);
|
|
store.commit("setFlying", false);
|
|
store.commit("setPanoId", targetPano.id);
|
|
store.commit("setPanoId", targetPano.id);
|
|
if (app.Scene.isCurrentPanoHasVideo) {
|
|
if (app.Scene.isCurrentPanoHasVideo) {
|
|
- apis.burying_point({ type: 5 });
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
- app.Camera.on("pano.chosen", (pano) => {
|
|
|
|
- apis.burying_point({ type: 4 });
|
|
|
|
- });
|
|
|
|
|
|
+ app.Camera.on("pano.chosen", (pano) => {});
|
|
app.store.on("tour", async (tour) => {
|
|
app.store.on("tour", async (tour) => {
|
|
app.TourManager.load(tour);
|
|
app.TourManager.load(tour);
|
|
store.commit("tour/setData", {
|
|
store.commit("tour/setData", {
|
|
@@ -732,8 +580,7 @@ onMounted(async () => {
|
|
transform-origin: bottom;
|
|
transform-origin: bottom;
|
|
transition: all 0.3s cubic-bezier(0.35, 0.32, 0.65, 0.63);
|
|
transition: all 0.3s cubic-bezier(0.35, 0.32, 0.65, 0.63);
|
|
// pointer-events: none;
|
|
// pointer-events: none;
|
|
- .tag-commodity,
|
|
|
|
- .tag-link_scene {
|
|
|
|
|
|
+ .tag-commodity {
|
|
min-width: 230px;
|
|
min-width: 230px;
|
|
height: 76px;
|
|
height: 76px;
|
|
background: rgba(255, 255, 255, 0.8);
|
|
background: rgba(255, 255, 255, 0.8);
|
|
@@ -792,57 +639,6 @@ onMounted(async () => {
|
|
&.show {
|
|
&.show {
|
|
transform: translateX(-50%) scale(1);
|
|
transform: translateX(-50%) scale(1);
|
|
}
|
|
}
|
|
-
|
|
|
|
- .tag-link_scene {
|
|
|
|
- height: auto;
|
|
|
|
- min-width: unset;
|
|
|
|
- .tag-title {
|
|
|
|
- padding: 10px;
|
|
|
|
- width: auto;
|
|
|
|
- text-align: center;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .coupon {
|
|
|
|
- width: 84px !important;
|
|
|
|
- height: 84px !important;
|
|
|
|
- &::after {
|
|
|
|
- content: "發現好禮";
|
|
|
|
- width: 100%;
|
|
|
|
- color: #ed5d18;
|
|
|
|
- position: absolute;
|
|
|
|
- bottom: -24px;
|
|
|
|
- text-align: center;
|
|
|
|
- font-size: 14px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .waterfall {
|
|
|
|
- width: 90px !important;
|
|
|
|
- height: 90px !important;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .applet_link {
|
|
|
|
- width: 64px !important;
|
|
|
|
- height: 64px !important;
|
|
|
|
- border-radius: 50%;
|
|
|
|
- background-color: #fff;
|
|
|
|
- border: 1px solid #ed5d18;
|
|
|
|
- position: relative;
|
|
|
|
- overflow: hidden;
|
|
|
|
- &::after {
|
|
|
|
- content: "直播中";
|
|
|
|
- width: 100%;
|
|
|
|
- height: 20px;
|
|
|
|
- background: #ed5d18;
|
|
|
|
- position: absolute;
|
|
|
|
- bottom: 0;
|
|
|
|
- text-align: center;
|
|
|
|
- line-height: 1.2;
|
|
|
|
- font-size: 12px;
|
|
|
|
- border-radius: 26%;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|