|
@@ -8,32 +8,28 @@
|
|
<template v-if="dataLoaded">
|
|
<template v-if="dataLoaded">
|
|
<Information v-if="!isshoppingguide" />
|
|
<Information v-if="!isshoppingguide" />
|
|
<Control />
|
|
<Control />
|
|
|
|
+
|
|
<teleport v-if="refMiniMap && player.showWidgets" :to="refMiniMap">
|
|
<teleport v-if="refMiniMap && player.showWidgets" :to="refMiniMap">
|
|
- <span :class="{ gudieDisabled: isshoppingguide && role.value != '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>
|
|
<ui-icon type="show_map_collect"></ui-icon>
|
|
</span>
|
|
</span>
|
|
-
|
|
|
|
- <p class="change" :class="{ gudieDisabled: isshoppingguide && role.value != 'leader' }" @click="changeMode('dollhouse', $event, 'focus3d')">
|
|
|
|
|
|
+ <div v-if="controls.showDollhouse" :class="{ gudieDisabled: isshoppingguide && role != 'leader' }" class="change" @click="changeMode('dollhouse')">
|
|
<ui-icon type="show_3d_normal"></ui-icon>
|
|
<ui-icon type="show_3d_normal"></ui-icon>
|
|
- 3D模型
|
|
|
|
- </p>
|
|
|
|
|
|
+ <span> {{ $t('mode.dollhouseModel') }}</span>
|
|
|
|
+ </div>
|
|
</teleport>
|
|
</teleport>
|
|
|
|
+
|
|
<template v-if="refMiniMap && player.showWidgets">
|
|
<template v-if="refMiniMap && player.showWidgets">
|
|
- <div
|
|
|
|
- :class="{ disabled: flying, gudieDisabled: isshoppingguide && role.value != 'leader' }"
|
|
|
|
- v-show="mode != 'panorama'"
|
|
|
|
- v-if="controls.showFloorplan && controls.showDollhouse"
|
|
|
|
- class="tab-layer"
|
|
|
|
- >
|
|
|
|
|
|
+ <div :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">
|
|
<div class="tabs" v-if="controls.showMap">
|
|
- <span :class="{ active: mode === 'floorplan' }" @click="changeMode('floorplan', $event)">
|
|
|
|
|
|
+ <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>
|
|
<ui-icon :type="mode == 'floorplan' ? 'show_plane_selected' : 'show_plane_normal'"></ui-icon>
|
|
- 二維
|
|
|
|
|
|
+ {{ $t('mode.floorplan') }}
|
|
</span>
|
|
</span>
|
|
- <span :class="{ active: mode === 'dollhouse' }" @click="changeMode('dollhouse', $event)">
|
|
|
|
|
|
+ <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>
|
|
<ui-icon :type="mode == 'dollhouse' ? 'show_3d_selected' : 'show_3d_normal'"></ui-icon>
|
|
|
|
|
|
- 三維
|
|
|
|
|
|
+ {{ $t('mode.dollhouse') }}
|
|
</span>
|
|
</span>
|
|
<div class="background" ref="background"></div>
|
|
<div class="background" ref="background"></div>
|
|
</div>
|
|
</div>
|
|
@@ -49,40 +45,45 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { useMusicPlayer } from "@/utils/sound";
|
|
|
|
|
|
+import { useMusicPlayer } from '@/utils/sound';
|
|
// import UiTags from "@/components/Tags";
|
|
// import UiTags from "@/components/Tags";
|
|
-import GoodsList from "@/components/Tags/goods-list.vue";
|
|
|
|
-import Treasure from "@/components/Tags/treasure.vue";
|
|
|
|
-import Waterfall from "@/components/Tags/waterfall.vue";
|
|
|
|
-
|
|
|
|
-import Information from "@/components/Information";
|
|
|
|
-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";
|
|
|
|
-import { useStore } from "vuex";
|
|
|
|
-import browser from "@/utils/browser";
|
|
|
|
-import { useApp, getApp } from "@/app";
|
|
|
|
-import common from "@/utils/common";
|
|
|
|
-import { Cache } from "@/utils/index";
|
|
|
|
-
|
|
|
|
-import * as apis from "@/apis/index.js";
|
|
|
|
|
|
+import GoodsList from '@/components/Tags/goods-list.vue';
|
|
|
|
+import Treasure from '@/components/Tags/treasure.vue';
|
|
|
|
+import Waterfall from '@/components/Tags/waterfall.vue';
|
|
|
|
+
|
|
|
|
+import Information from '@/components/Information';
|
|
|
|
+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';
|
|
|
|
+import { useStore } from 'vuex';
|
|
|
|
+import browser from '@/utils/browser';
|
|
|
|
+import { useApp, getApp } from '@/app';
|
|
|
|
+import common from '@/utils/common';
|
|
|
|
+import { useI18n, getLocale } from '@/i18n';
|
|
|
|
+import { Cache } from '@/utils/index';
|
|
|
|
+import wxShare from '@/utils/wxshare';
|
|
|
|
+
|
|
|
|
+import * as apis from '@/apis/index.js';
|
|
|
|
+
|
|
|
|
+const { t } = useI18n({ useScope: 'global' });
|
|
|
|
+
|
|
const store = useStore();
|
|
const store = useStore();
|
|
|
|
|
|
let jumpNewScene = (sceneFirstView) => {
|
|
let jumpNewScene = (sceneFirstView) => {
|
|
let url = window.location.href;
|
|
let url = window.location.href;
|
|
|
|
|
|
- if (!browser.hasURLParam("pose")) {
|
|
|
|
|
|
+ if (!browser.hasURLParam('pose')) {
|
|
url += `&${sceneFirstView.sceneview}`;
|
|
url += `&${sceneFirstView.sceneview}`;
|
|
} else {
|
|
} 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);
|
|
|
|
|
|
+ url = browser.replaceQueryString(url, 'm', sceneFirstView.num);
|
|
return url;
|
|
return url;
|
|
};
|
|
};
|
|
|
|
|
|
@@ -93,7 +94,7 @@ let visibilitychangeFn = () => {
|
|
};
|
|
};
|
|
|
|
|
|
let hashchangefn = () => {
|
|
let hashchangefn = () => {
|
|
- if (window.location.hash.indexOf("#showpage") >= 0) {
|
|
|
|
|
|
+ if (window.location.hash.indexOf('#showpage') >= 0) {
|
|
window.history.go(-1);
|
|
window.history.go(-1);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -102,53 +103,54 @@ const musicPlayer = useMusicPlayer();
|
|
|
|
|
|
let app = null;
|
|
let app = null;
|
|
|
|
|
|
-let tagid = browser.getURLParam("tagid");
|
|
|
|
-const role = ref(browser.getURLParam("role"));
|
|
|
|
|
|
+let tagid = browser.getURLParam('tagid');
|
|
|
|
+
|
|
|
|
+const role = computed(() => store.getters['rtc/role']);
|
|
|
|
|
|
const closetagtype = () => {
|
|
const closetagtype = () => {
|
|
- store.commit("tag/setTagClickType", {
|
|
|
|
- type: "",
|
|
|
|
|
|
+ store.commit('tag/setTagClickType', {
|
|
|
|
+ type: '',
|
|
data: {},
|
|
data: {},
|
|
});
|
|
});
|
|
|
|
|
|
if (isshoppingguide.value) {
|
|
if (isshoppingguide.value) {
|
|
- if (role.value == "leader") {
|
|
|
|
|
|
+ if (role.value == 'leader') {
|
|
socket.value &&
|
|
socket.value &&
|
|
- socket.value.emit("action", {
|
|
|
|
- type: "tagclose",
|
|
|
|
|
|
+ socket.value.emit('action', {
|
|
|
|
+ type: 'tagclose',
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
-const socket = computed(() => store.getters["rtc/socket"]);
|
|
|
|
|
|
+const socket = computed(() => store.getters['rtc/socket']);
|
|
|
|
|
|
const tags = computed(() => {
|
|
const tags = computed(() => {
|
|
- return store.getters["tag/tags"] || [];
|
|
|
|
|
|
+ return store.getters['tag/tags'] || [];
|
|
});
|
|
});
|
|
|
|
|
|
-const isshoppingguide = computed(() => store.getters["shoppingguide"]);
|
|
|
|
|
|
+const isshoppingguide = computed(() => store.getters['shoppingguide']);
|
|
|
|
|
|
-const player = computed(() => store.getters["player"]);
|
|
|
|
-const flying = computed(() => store.getters["flying"]);
|
|
|
|
-const metadata = computed(() => store.getters["scene/metadata"]);
|
|
|
|
|
|
+const player = computed(() => store.getters['player']);
|
|
|
|
+const flying = computed(() => store.getters['flying']);
|
|
|
|
+const metadata = computed(() => store.getters['scene/metadata']);
|
|
const controls = computed(() => {
|
|
const controls = computed(() => {
|
|
return metadata.value.controls;
|
|
return metadata.value.controls;
|
|
});
|
|
});
|
|
-const mode = computed(() => store.getters["mode"]);
|
|
|
|
-const showNavigations = computed(() => store.getters["showNavigations"]);
|
|
|
|
|
|
+const mode = computed(() => store.getters['mode']);
|
|
|
|
+const showNavigations = computed(() => store.getters['showNavigations']);
|
|
const scene$ = ref(null);
|
|
const scene$ = ref(null);
|
|
const hadVideo = ref(true);
|
|
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);
|
|
|
|
|
|
+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;
|
|
hadVideo.value = false;
|
|
} else {
|
|
} else {
|
|
hadVideo.value = true;
|
|
hadVideo.value = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-if (role.value) {
|
|
|
|
|
|
+if (browser.getURLParam('role')) {
|
|
hadVideo.value = true;
|
|
hadVideo.value = true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -158,11 +160,11 @@ const refMiniMap = ref(null);
|
|
const isCollapse = ref(false);
|
|
const isCollapse = ref(false);
|
|
const background = ref(null);
|
|
const background = ref(null);
|
|
const resize = () => {
|
|
const resize = () => {
|
|
- if (this.$refs.background && (this.mode == "floorplan" || this.mode == "dollhouse")) {
|
|
|
|
|
|
+ if (this.$refs.background && (this.mode == 'floorplan' || this.mode == 'dollhouse')) {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- let $active = $(this.$el).find(".tabs .active");
|
|
|
|
- background.value.style.width = $active[0].getBoundingClientRect().width + "px";
|
|
|
|
- background.value.style.left = $active.position().left + "px";
|
|
|
|
|
|
+ let $active = $(this.$el).find('.tabs .active');
|
|
|
|
+ background.value.style.width = $active[0].getBoundingClientRect().width + 'px';
|
|
|
|
+ background.value.style.left = $active.position().left + 'px';
|
|
});
|
|
});
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -170,17 +172,23 @@ 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 () => {
|
|
- if (role.value == "leader") {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- await nextTick();
|
|
|
|
- if (isshoppingguide.value) {
|
|
|
|
- $minmap.classList.add("gudieDisabled");
|
|
|
|
- } else {
|
|
|
|
- $minmap.classList.remove("gudieDisabled");
|
|
|
|
|
|
+ if (browser.getURLParam('role') == 'customer') {
|
|
|
|
+ await nextTick();
|
|
|
|
+ if (isshoppingguide.value) {
|
|
|
|
+ $minmap.classList.add('gudieDisabled');
|
|
|
|
+ } else {
|
|
|
|
+ $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",
|
|
|
|
+ // });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -194,12 +202,12 @@ watch(
|
|
() => player.value.showMap,
|
|
() => player.value.showMap,
|
|
(val, old) => {
|
|
(val, old) => {
|
|
if (!isCollapse.value) {
|
|
if (!isCollapse.value) {
|
|
- let $minmap = document.querySelector("[xui_min_map]");
|
|
|
|
|
|
+ let $minmap = document.querySelector('[xui_min_map]');
|
|
if ($minmap) {
|
|
if ($minmap) {
|
|
if (val) {
|
|
if (val) {
|
|
- $minmap.classList.remove("collapse");
|
|
|
|
|
|
+ $minmap.classList.remove('collapse');
|
|
} else {
|
|
} else {
|
|
- $minmap.classList.add("collapse");
|
|
|
|
|
|
+ $minmap.classList.add('collapse');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -211,12 +219,12 @@ watch(
|
|
watch(
|
|
watch(
|
|
() => player.value.showWidgets,
|
|
() => player.value.showWidgets,
|
|
(val, old) => {
|
|
(val, old) => {
|
|
- let $minmap = document.querySelector("[xui_min_map]");
|
|
|
|
|
|
+ let $minmap = document.querySelector('[xui_min_map]');
|
|
if ($minmap) {
|
|
if ($minmap) {
|
|
if (val) {
|
|
if (val) {
|
|
- $minmap.classList.remove("collapse");
|
|
|
|
|
|
+ $minmap.classList.remove('collapse');
|
|
} else {
|
|
} else {
|
|
- $minmap.classList.add("collapse");
|
|
|
|
|
|
+ $minmap.classList.add('collapse');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -224,31 +232,49 @@ watch(
|
|
deep: true,
|
|
deep: true,
|
|
}
|
|
}
|
|
);
|
|
);
|
|
-const changeMode = (name, e, focus3d = false) => {
|
|
|
|
- if (!flying.value) {
|
|
|
|
- let width, left;
|
|
|
|
- store.commit("setMode", name);
|
|
|
|
- nextTick(() => {
|
|
|
|
- if (focus3d) {
|
|
|
|
- let $active = document.querySelector(".tabs>span:last-of-type");
|
|
|
|
- background.value.style.width = $active.getBoundingClientRect().width + "px";
|
|
|
|
- background.value.style.left = $active.offsetLeft + "px";
|
|
|
|
- } else {
|
|
|
|
- background.value.style.width = width || e.srcElement.getBoundingClientRect().width + "px";
|
|
|
|
- background.value.style.left = left || e.srcElement.offsetLeft + "px";
|
|
|
|
|
|
+
|
|
|
|
+watch(
|
|
|
|
+ () => mode.value,
|
|
|
|
+ (val, old) => {
|
|
|
|
+ console.log(val);
|
|
|
|
+ let timer = setTimeout(() => {
|
|
|
|
+ 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.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.left = dollhouse_ref.value.offsetLeft + 'px';
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ }, 0);
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ deep: true,
|
|
|
|
+ }
|
|
|
|
+);
|
|
|
|
+const floorplan_ref = ref(null);
|
|
|
|
+const dollhouse_ref = ref(null);
|
|
|
|
+const changeMode = (name, e) => {
|
|
|
|
+ if (e) {
|
|
|
|
+ if (!flying.value) {
|
|
|
|
+ store.commit('setMode', name);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ store.commit('setMode', name);
|
|
}
|
|
}
|
|
- // console.dir(document.querySelector(".tabs>span:last-of-type"));
|
|
|
|
};
|
|
};
|
|
const toggleMap = () => {
|
|
const toggleMap = () => {
|
|
isCollapse.value = !isCollapse.value;
|
|
isCollapse.value = !isCollapse.value;
|
|
- let $minmap = document.querySelector("[xui_min_map]");
|
|
|
|
|
|
+ let $minmap = document.querySelector('[xui_min_map]');
|
|
if ($minmap) {
|
|
if ($minmap) {
|
|
if (!isCollapse.value) {
|
|
if (!isCollapse.value) {
|
|
- $minmap.classList.remove("collapse");
|
|
|
|
|
|
+ $minmap.classList.remove('collapse');
|
|
} else {
|
|
} else {
|
|
- $minmap.classList.add("collapse");
|
|
|
|
|
|
+ $minmap.classList.add('collapse');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -256,13 +282,14 @@ 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") {
|
|
|
|
- store.commit("tag/setTagClickType", {
|
|
|
|
- type: "goodlist",
|
|
|
|
|
|
+ if (item.type == 'commodity') {
|
|
|
|
+ guideclicktag(item);
|
|
|
|
+ store.commit('tag/setTagClickType', {
|
|
|
|
+ type: 'goodlist',
|
|
data: item,
|
|
data: item,
|
|
});
|
|
});
|
|
|
|
+ } else if (item.type == 'link_scene') {
|
|
guideclicktag(item);
|
|
guideclicktag(item);
|
|
- } else if (item.type == "link_scene") {
|
|
|
|
let sceneFirstView = item.hotContent.sceneFirstView;
|
|
let sceneFirstView = item.hotContent.sceneFirstView;
|
|
window.location.href = jumpNewScene(sceneFirstView);
|
|
window.location.href = jumpNewScene(sceneFirstView);
|
|
}
|
|
}
|
|
@@ -270,70 +297,70 @@ const onClickTagInfo = (el) => {
|
|
|
|
|
|
const guideclicktag = (tag) => {
|
|
const guideclicktag = (tag) => {
|
|
if (isshoppingguide.value) {
|
|
if (isshoppingguide.value) {
|
|
- if (role.value == "leader") {
|
|
|
|
|
|
+ if (role.value == 'leader') {
|
|
socket.value &&
|
|
socket.value &&
|
|
- socket.value.emit("action", {
|
|
|
|
- type: "tagclick",
|
|
|
|
|
|
+ socket.value.emit('action', {
|
|
|
|
+ type: 'tagclick',
|
|
data: {
|
|
data: {
|
|
sid: tag.sid,
|
|
sid: tag.sid,
|
|
},
|
|
},
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ return;
|
|
};
|
|
};
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
apis.burying_point({ type: 0 });
|
|
apis.burying_point({ type: 0 });
|
|
|
|
|
|
app = createApp({
|
|
app = createApp({
|
|
- num: browser.getURLParam("m"),
|
|
|
|
|
|
+ num: browser.getURLParam('m'),
|
|
dom: scene$.value,
|
|
dom: scene$.value,
|
|
mobile: true,
|
|
mobile: true,
|
|
isLoadTags: false,
|
|
isLoadTags: false,
|
|
- sceneKind: "tiles",
|
|
|
|
|
|
+ sceneKind: 'tiles',
|
|
|
|
+ lang: getLocale(),
|
|
scene: {
|
|
scene: {
|
|
markerOpacity: 1,
|
|
markerOpacity: 1,
|
|
- markerURL: "https://eurs3.4dkankan.com/cdf/file/43aa29799bfd472298a47cc6370b10cc.png",
|
|
|
|
- pathEndColor: "#FF4641",
|
|
|
|
|
|
+ markerURL: 'https://eurs3.4dkankan.com/cdf/file/43aa29799bfd472298a47cc6370b10cc.png',
|
|
|
|
+ pathEndColor: '#FF4641',
|
|
},
|
|
},
|
|
});
|
|
});
|
|
- app.use("MinMap", { theme: { camera_fillStyle: "#ED5D18" } });
|
|
|
|
- app.use("Tag");
|
|
|
|
|
|
+ app.use('MinMap', { theme: { camera_fillStyle: '#ED5D18' } });
|
|
|
|
+ app.use('Tag');
|
|
app
|
|
app
|
|
- .use("TagView", {
|
|
|
|
|
|
+ .use('TagView', {
|
|
render(data) {
|
|
render(data) {
|
|
- if (data.type == "waterfall") {
|
|
|
|
|
|
+ if (data.type == 'waterfall') {
|
|
return `<span class="tag-icon waterfall animate" style="background-image:url({{icon}})"></span>`;
|
|
return `<span class="tag-icon waterfall animate" style="background-image:url({{icon}})"></span>`;
|
|
- } else if (data.type == "coupon") {
|
|
|
|
|
|
+ } else if (data.type == 'coupon') {
|
|
return `<span class="tag-icon coupon animate" style="background-image:url({{icon}})"></span>`;
|
|
return `<span class="tag-icon coupon animate" style="background-image:url({{icon}})"></span>`;
|
|
- } else if (data.type == "applet_link") {
|
|
|
|
|
|
+ } else if (data.type == 'applet_link') {
|
|
try {
|
|
try {
|
|
data.hotContent = JSON.parse(data.hotContent);
|
|
data.hotContent = JSON.parse(data.hotContent);
|
|
} catch (error) {}
|
|
} 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") {
|
|
|
|
|
|
+ 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') {
|
|
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">
|
|
<div data-id="${data.sid}" class="tag-commodity tag-link_scene">
|
|
- <p class="tag-title">點擊前往下一個區域</p>
|
|
|
|
|
|
+ <p class="tag-title">${t('common.goNext')}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
`;
|
|
- } else if (data.type == "commodity") {
|
|
|
|
|
|
+ } else if (data.type == 'commodity') {
|
|
let arr = data.products.map((item) => item.price);
|
|
let arr = data.products.map((item) => item.price);
|
|
let priceMin = isFinite(Math.min.apply(null, arr)) ? Math.min.apply(null, arr) : 0;
|
|
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 priceMax = isFinite(Math.max.apply(null, arr)) ? Math.max.apply(null, arr) : 0;
|
|
let price = priceMin == priceMax ? priceMax : `${priceMin}-${priceMax}`;
|
|
let price = priceMin == priceMax ? priceMax : `${priceMin}-${priceMax}`;
|
|
- let range = `${data.products[0] ? data.products[0].symbol : "MOP$"} ${price}`;
|
|
|
|
|
|
+ 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 style="background-image:url(${data.products[0] ? data.products[0].pic : ''})" class='tag-avatar'>
|
|
</div>
|
|
</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">${range} | ${t('common.view')} ></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
`;
|
|
@@ -343,55 +370,62 @@ onMounted(async () => {
|
|
},
|
|
},
|
|
})
|
|
})
|
|
.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(() => {
|
|
view.focus(tag.sid).then(() => {
|
|
- if (tag.type == "coupon") {
|
|
|
|
|
|
+ if (tag.type == 'coupon') {
|
|
try {
|
|
try {
|
|
- document.querySelector(`[data-tag-id="${tag.sid}"] .tag-icon`).style.display = "none";
|
|
|
|
- let hotcontent = typeof tag.hotContent == "string" ? JSON.parse(tag.hotContent) : tag.hotContent;
|
|
|
|
|
|
+ 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(
|
|
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}`,
|
|
`https://m.cdfmembers.com/shop/600667208/showactivity?pageId=${hotcontent.couponLink}`,
|
|
`/pages/showactivity/showactivity?pageId=${hotcontent.couponLink}`
|
|
`/pages/showactivity/showactivity?pageId=${hotcontent.couponLink}`
|
|
);
|
|
);
|
|
apis.burying_point({ type: 2 });
|
|
apis.burying_point({ type: 2 });
|
|
} catch (error) {}
|
|
} catch (error) {}
|
|
- } else if (tag.type == "waterfall") {
|
|
|
|
- store.commit("tag/setTagClickType", {
|
|
|
|
- type: "waterfall",
|
|
|
|
|
|
+ } else if (tag.type == 'waterfall') {
|
|
|
|
+ store.commit('tag/setTagClickType', {
|
|
|
|
+ type: 'waterfall',
|
|
data: tag,
|
|
data: tag,
|
|
});
|
|
});
|
|
guideclicktag(tag);
|
|
guideclicktag(tag);
|
|
- } else if (tag.type == "applet_link") {
|
|
|
|
|
|
+ } else if (tag.type == 'applet_link') {
|
|
try {
|
|
try {
|
|
- let hotcontent = typeof tag.hotContent == "string" ? JSON.parse(tag.hotContent) : tag.hotContent;
|
|
|
|
|
|
+ if (isshoppingguide.value) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ let hotcontent = typeof tag.hotContent == 'string' ? JSON.parse(tag.hotContent) : tag.hotContent;
|
|
browser.openLink(
|
|
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}`,
|
|
`https://m.cdfmembers.com/shop/600667208/showactivity?pageId=${hotcontent.liveLink}`,
|
|
`/pages/showactivity/showactivity?pageId=${hotcontent.liveLink}`
|
|
`/pages/showactivity/showactivity?pageId=${hotcontent.liveLink}`
|
|
);
|
|
);
|
|
} catch (error) {}
|
|
} catch (error) {}
|
|
- } else if (tag.type == "link_scene") {
|
|
|
|
|
|
+ } else if (tag.type == 'link_scene') {
|
|
|
|
+ guideclicktag(tag);
|
|
let sceneFirstView = tag.hotContent.sceneFirstView;
|
|
let sceneFirstView = tag.hotContent.sceneFirstView;
|
|
window.location.href = jumpNewScene(sceneFirstView);
|
|
window.location.href = jumpNewScene(sceneFirstView);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
- 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") {
|
|
|
|
- el.querySelector(".tag-body").classList.remove("show");
|
|
|
|
- el.style.zIndex = "auto";
|
|
|
|
|
|
+ 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') {
|
|
|
|
+ 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 (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) {
|
|
if (tagid) {
|
|
document.querySelector(`[data-id="${tagid}"]`) && document.querySelector(`[data-id="${tagid}"]`).click();
|
|
document.querySelector(`[data-id="${tagid}"]`) && document.querySelector(`[data-id="${tagid}"]`).click();
|
|
@@ -400,141 +434,154 @@ onMounted(async () => {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
- view.on("rendered", (e) => {
|
|
|
|
|
|
+ view.on('rendered', (e) => {
|
|
tagid && view.focus(tagid);
|
|
tagid && view.focus(tagid);
|
|
}); //dom渲染完成
|
|
}); //dom渲染完成
|
|
});
|
|
});
|
|
|
|
|
|
- app.use("TourPlayer");
|
|
|
|
|
|
+ app.use('TourPlayer');
|
|
|
|
+
|
|
|
|
+ app.TourManager.on('loaded', (list) => {
|
|
|
|
+ store.commit('tour/loaded', list);
|
|
|
|
+ // app.TourManager.load(tours.value);
|
|
|
|
+ });
|
|
// if (!hadVideo.value) {
|
|
// if (!hadVideo.value) {
|
|
// app.Scene.lock();
|
|
// app.Scene.lock();
|
|
// }
|
|
// }
|
|
- app.Scene.on("ready", () => {
|
|
|
|
|
|
+ app.Scene.on('ready', () => {
|
|
show.value = true;
|
|
show.value = true;
|
|
- if (!localStorage.getItem("user_guide")) {
|
|
|
|
- Dialog.confirm({
|
|
|
|
- showCloseIcon: false,
|
|
|
|
- okText: "我知道了",
|
|
|
|
- content:
|
|
|
|
- "<span style='font-size: 16px; line-height: 1.5;'>開發者已遵守收集、使用最終用戶個人信息有關的所有可適用法律、政策和法規,保護用戶個人信息安全。<span/>",
|
|
|
|
- title: "隱私條款:",
|
|
|
|
- single:true,
|
|
|
|
- func: (state) => {
|
|
|
|
- if (state == "ok") {
|
|
|
|
- localStorage.setItem("user_guide", Date.now());
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ store.commit('SetPlayerOptions', {
|
|
|
|
+ lang: getLocale(),
|
|
|
|
+ });
|
|
|
|
+ wxShare({
|
|
|
|
+ title: `${t('common.title')}~`,
|
|
|
|
+ desc: `${t('common.title')}~`,
|
|
|
|
+ link: window.location.href,
|
|
|
|
+ imgUrl: 'https://glp-vr.cdfmembers.com/cdf/file/91dd5305525f463286f03a31abd1c154.jpg',
|
|
|
|
+ });
|
|
});
|
|
});
|
|
- app.Scene.on("error", (data) => {
|
|
|
|
|
|
+ app.Scene.on('error', (data) => {
|
|
switch (data.code) {
|
|
switch (data.code) {
|
|
case 5033:
|
|
case 5033:
|
|
- Dialog.alert("该场景正在计算中,请稍后再试");
|
|
|
|
|
|
+ Dialog.alert(t('common.calculation'));
|
|
break;
|
|
break;
|
|
case 5034:
|
|
case 5034:
|
|
- Dialog.alert("服务端开小差,请稍后再试");
|
|
|
|
|
|
+ Dialog.alert(t('common.title'));
|
|
break;
|
|
break;
|
|
case 5009:
|
|
case 5009:
|
|
- Dialog.alert("服务端开小差,请稍后再试");
|
|
|
|
|
|
+ Dialog.alert(t('common.title'));
|
|
break;
|
|
break;
|
|
case 5005:
|
|
case 5005:
|
|
- Dialog.alert("服务端开小差,请稍后再试");
|
|
|
|
|
|
+ Dialog.alert(t('common.title'));
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- app.Scene.on("loaded", (pano) => {
|
|
|
|
- refMiniMap.value = "[xui_min_map]";
|
|
|
|
- store.commit("setFloorId", pano.floorIndex);
|
|
|
|
- store.commit("rtc/setShowdaogou", true);
|
|
|
|
-
|
|
|
|
|
|
+ app.Scene.on('loaded', (pano) => {
|
|
|
|
+ refMiniMap.value = '[xui_min_map]';
|
|
|
|
+ store.commit('setFloorId', pano.floorIndex);
|
|
|
|
+ store.commit('rtc/setShowdaogou', true);
|
|
|
|
|
|
- if (browser.getURLParam("roomId")) {
|
|
|
|
- store.commit("showShoppingguide", true);
|
|
|
|
|
|
+ if (browser.getURLParam('roomId')) {
|
|
|
|
+ store.commit('showShoppingguide', true);
|
|
|
|
+ } else {
|
|
|
|
+ if (!localStorage.getItem('user_guide')) {
|
|
|
|
+ Dialog.confirm({
|
|
|
|
+ showCloseIcon: false,
|
|
|
|
+ okText: t('common.know'),
|
|
|
|
+ content: "<span style='font-size: 16px; line-height: 1.5;'>" + t('common.notice') + '<span/>',
|
|
|
|
+ title: `${t('common.tips')}:`,
|
|
|
|
+ single: true,
|
|
|
|
+ func: (state) => {
|
|
|
|
+ if (state == 'ok') {
|
|
|
|
+ localStorage.setItem('user_guide', Date.now());
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
- app.resource.tags(`${process.env.VUE_APP_RESOURCE_URL}cdf/hot/${browser.getURLParam("m")}/hot.json?rnd=${Math.random()}`);
|
|
|
|
|
|
+ app.resource.tags(`${process.env.VUE_APP_RESOURCE_URL}cdf/hot/${browser.getURLParam('m')}/hot.json?rnd=${Math.random()}`);
|
|
useMusicPlayer();
|
|
useMusicPlayer();
|
|
});
|
|
});
|
|
- app.Scene.on("panorama.videorenderer.resumerender", () => {
|
|
|
|
|
|
+ app.Scene.on('panorama.videorenderer.resumerender', () => {
|
|
musicPlayer.pause(true);
|
|
musicPlayer.pause(true);
|
|
});
|
|
});
|
|
|
|
|
|
- app.Scene.on("panorama.videorenderer.suspendrender", async () => {
|
|
|
|
|
|
+ app.Scene.on('panorama.videorenderer.suspendrender', async () => {
|
|
let player = await getApp().TourManager.player;
|
|
let player = await getApp().TourManager.player;
|
|
if (!player.isPlaying) {
|
|
if (!player.isPlaying) {
|
|
musicPlayer.resume();
|
|
musicPlayer.resume();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- app.store.on("metadata", (metadata) => {
|
|
|
|
- store.commit("scene/load", metadata);
|
|
|
|
|
|
+ app.store.on('metadata', (metadata) => {
|
|
|
|
+ store.commit('scene/load', metadata);
|
|
if (!metadata.controls.showMap) {
|
|
if (!metadata.controls.showMap) {
|
|
app.MinMap.hide(true);
|
|
app.MinMap.hide(true);
|
|
}
|
|
}
|
|
dataLoaded.value = true;
|
|
dataLoaded.value = true;
|
|
});
|
|
});
|
|
- app.store.on("tags", (tags) => {
|
|
|
|
- store.commit("tag/load", tags);
|
|
|
|
|
|
+ app.store.on('tags', (tags) => {
|
|
|
|
+ store.commit('tag/load', tags);
|
|
});
|
|
});
|
|
- app.Camera.on("mode.beforeChange", ({ fromMode, toMode, floorIndex }) => {
|
|
|
|
|
|
+ app.Camera.on('mode.beforeChange', ({ fromMode, toMode, floorIndex }) => {
|
|
if (fromMode) {
|
|
if (fromMode) {
|
|
- store.commit("setFlying", true);
|
|
|
|
|
|
+ store.commit('setFlying', true);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- app.Camera.on("mode.afterChange", ({ toMode, floorIndex }) => {
|
|
|
|
- store.commit("setFlying", false);
|
|
|
|
|
|
+ app.Camera.on('mode.afterChange', ({ toMode, floorIndex }) => {
|
|
|
|
+ store.commit('setFlying', false);
|
|
});
|
|
});
|
|
- app.Camera.on("flying.started", (pano) => {
|
|
|
|
- store.commit("setFlying", true);
|
|
|
|
|
|
+ app.Camera.on('flying.started', (pano) => {
|
|
|
|
+ store.commit('setFlying', true);
|
|
});
|
|
});
|
|
- app.Camera.on("flying.ended", ({ targetPano }) => {
|
|
|
|
- store.commit("setFlying", false);
|
|
|
|
- store.commit("setPanoId", targetPano.id);
|
|
|
|
|
|
+ app.Camera.on('flying.ended', ({ targetPano }) => {
|
|
|
|
+ store.commit('setFlying', false);
|
|
|
|
+ store.commit('setPanoId', targetPano.id);
|
|
if (app.Scene.isCurrentPanoHasVideo) {
|
|
if (app.Scene.isCurrentPanoHasVideo) {
|
|
apis.burying_point({ type: 5 });
|
|
apis.burying_point({ type: 5 });
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
- app.Camera.on("pano.chosen", (pano) => {
|
|
|
|
|
|
+ app.Camera.on('pano.chosen', (pano) => {
|
|
apis.burying_point({ type: 4 });
|
|
apis.burying_point({ type: 4 });
|
|
});
|
|
});
|
|
- app.store.on("tour", async (tour) => {
|
|
|
|
- app.TourManager.load(tour);
|
|
|
|
- store.commit("tour/setData", {
|
|
|
|
- tours: JSON.parse(
|
|
|
|
- JSON.stringify(app.TourManager.tours, (key, val) => {
|
|
|
|
- if (key === "audio") {
|
|
|
|
- return null;
|
|
|
|
- } else {
|
|
|
|
- return val;
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- ),
|
|
|
|
- });
|
|
|
|
- store.commit("tour/setBackUp", {
|
|
|
|
- tours: JSON.parse(
|
|
|
|
- JSON.stringify(app.TourManager.tours, (key, val) => {
|
|
|
|
- if (key === "audio") {
|
|
|
|
- return null;
|
|
|
|
- } else {
|
|
|
|
- return val;
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- ),
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- app.store.on("floorcad", (floor) => store.commit("scene/loadFloorData", floor));
|
|
|
|
|
|
+ // app.store.on('tour', async (tour) => {
|
|
|
|
+ // app.TourManager.load(tour);
|
|
|
|
+ // store.commit('tour/setData', {
|
|
|
|
+ // tours: JSON.parse(
|
|
|
|
+ // JSON.stringify(app.TourManager.tours, (key, val) => {
|
|
|
|
+ // if (key === 'audio') {
|
|
|
|
+ // return null;
|
|
|
|
+ // } else {
|
|
|
|
+ // return val;
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // ),
|
|
|
|
+ // });
|
|
|
|
+ // store.commit('tour/setBackUp', {
|
|
|
|
+ // tours: JSON.parse(
|
|
|
|
+ // JSON.stringify(app.TourManager.tours, (key, val) => {
|
|
|
|
+ // if (key === 'audio') {
|
|
|
|
+ // return null;
|
|
|
|
+ // } else {
|
|
|
|
+ // return val;
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // ),
|
|
|
|
+ // });
|
|
|
|
+ // });
|
|
|
|
+ app.store.on('floorcad', (floor) => store.commit('scene/loadFloorData', floor));
|
|
|
|
|
|
app.render();
|
|
app.render();
|
|
- document.removeEventListener("visibilitychange", visibilitychangeFn);
|
|
|
|
- document.addEventListener("visibilitychange", visibilitychangeFn);
|
|
|
|
|
|
+ document.removeEventListener('visibilitychange', visibilitychangeFn);
|
|
|
|
+ document.addEventListener('visibilitychange', visibilitychangeFn);
|
|
|
|
|
|
if (browser.detectWeixin()) {
|
|
if (browser.detectWeixin()) {
|
|
//ios的ua中无miniProgram,但都有MicroMessenger(表示是微信浏览器)
|
|
//ios的ua中无miniProgram,但都有MicroMessenger(表示是微信浏览器)
|
|
wx.miniProgram.getEnv((res) => {
|
|
wx.miniProgram.getEnv((res) => {
|
|
if (res.miniprogram) {
|
|
if (res.miniprogram) {
|
|
- window.removeEventListener("hashchange", hashchangefn);
|
|
|
|
- window.addEventListener("hashchange", hashchangefn);
|
|
|
|
|
|
+ window.removeEventListener('hashchange', hashchangefn);
|
|
|
|
+ window.addEventListener('hashchange', hashchangefn);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -624,7 +671,7 @@ onMounted(async () => {
|
|
position: relative;
|
|
position: relative;
|
|
margin-bottom: 30px;
|
|
margin-bottom: 30px;
|
|
&::before {
|
|
&::before {
|
|
- content: "";
|
|
|
|
|
|
+ content: '';
|
|
display: inline-block;
|
|
display: inline-block;
|
|
left: 50%;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
transform: translateX(-50%);
|
|
@@ -686,7 +733,7 @@ onMounted(async () => {
|
|
width: 84px !important;
|
|
width: 84px !important;
|
|
height: 84px !important;
|
|
height: 84px !important;
|
|
&::after {
|
|
&::after {
|
|
- content: "發現好禮";
|
|
|
|
|
|
+ content: '發現好禮';
|
|
width: 100%;
|
|
width: 100%;
|
|
color: #ed5d18;
|
|
color: #ed5d18;
|
|
position: absolute;
|
|
position: absolute;
|
|
@@ -710,7 +757,7 @@ onMounted(async () => {
|
|
position: relative;
|
|
position: relative;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
&::after {
|
|
&::after {
|
|
- content: "直播中";
|
|
|
|
|
|
+ content: '直播中';
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 20px;
|
|
height: 20px;
|
|
background: #ed5d18;
|
|
background: #ed5d18;
|