app.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795
  1. <template>
  2. <LoadingLogo v-if="hadVideo" :thumb="true" />
  3. <OpenVideo v-else @close="hadVideo = true" />
  4. <Guide />
  5. <div class="ui-view-layout" :class="{ show: show }" is-mobile="true">
  6. <div class="scene" ref="scene$"></div>
  7. <template v-if="dataLoaded">
  8. <Information v-if="!isshoppingguide" />
  9. <Control />
  10. <teleport v-if="refMiniMap && player.showWidgets" :to="refMiniMap">
  11. <span :class="{ gudieDisabled: isshoppingguide && role != 'leader' }" class="button-switch" @click.stop="toggleMap">
  12. <ui-icon type="show_map_collect"></ui-icon>
  13. </span>
  14. <div v-if="controls.showDollhouse" :class="{ gudieDisabled: isshoppingguide && role != 'leader' }" class="change" @click="changeMode('dollhouse')">
  15. <ui-icon type="show_3d_normal"></ui-icon>
  16. <span> {{ $t("mode.dollhouseModel") }}</span>
  17. </div>
  18. </teleport>
  19. <template v-if="refMiniMap && player.showWidgets">
  20. <div
  21. :class="{ disabled: flying, gudieDisabled: isshoppingguide && role != 'leader' }"
  22. v-show="mode != 'panorama'"
  23. v-if="controls.showFloorplan && controls.showDollhouse"
  24. class="tab-layer"
  25. >
  26. <div class="tabs" v-if="controls.showMap">
  27. <span :class="{ active: mode === 'floorplan' }" ref="floorplan_ref" @click="changeMode('floorplan', $event)">
  28. <ui-icon :type="mode == 'floorplan' ? 'show_plane_selected' : 'show_plane_normal'"></ui-icon>
  29. {{ $t("mode.floorplan") }}
  30. </span>
  31. <span :class="{ active: mode === 'dollhouse' }" ref="dollhouse_ref" @click="changeMode('dollhouse', $event)">
  32. <ui-icon :type="mode == 'dollhouse' ? 'show_3d_selected' : 'show_3d_normal'"></ui-icon>
  33. {{ $t("mode.dollhouse") }}
  34. </span>
  35. <div class="background" ref="background"></div>
  36. </div>
  37. </div>
  38. </template>
  39. </template>
  40. <!-- <UiTags /> -->
  41. </div>
  42. <GoodsList @close="closetagtype" />
  43. <Treasure @close="closetagtype" />
  44. <Waterfall @close="closetagtype" />
  45. </template>
  46. <script setup>
  47. import { useMusicPlayer } from "@/utils/sound";
  48. // import UiTags from "@/components/Tags";
  49. import GoodsList from "@/components/Tags/goods-list.vue";
  50. import Treasure from "@/components/Tags/treasure.vue";
  51. import Waterfall from "@/components/Tags/waterfall.vue";
  52. import Information from "@/components/Information";
  53. import Control from "@/components/Controls/Control.Mobile.vue";
  54. import LoadingLogo from "@/components/shared/Loading.vue";
  55. import OpenVideo from "@/components/openVideo/";
  56. import Guide from "@/components/shared/Guide.vue";
  57. import { Dialog } from "@/global_components/";
  58. import { createApp } from "@/app";
  59. import { ref, onMounted, computed, nextTick, watch } from "vue";
  60. import { useStore } from "vuex";
  61. import browser from "@/utils/browser";
  62. import { useApp, getApp } from "@/app";
  63. import common from "@/utils/common";
  64. import { useI18n, getLocale } from "@/i18n";
  65. import { Cache } from "@/utils/index";
  66. import wxShare from "@/utils/wxshare";
  67. import * as apis from "@/apis/index.js";
  68. const { t } = useI18n({ useScope: "global" });
  69. const store = useStore();
  70. let jumpNewScene = (sceneFirstView) => {
  71. let url = window.location.href;
  72. if (!browser.hasURLParam("pose")) {
  73. url += `&${sceneFirstView.sceneview}`;
  74. } else {
  75. url = browser.replaceQueryString(url, "pose", sceneFirstView.sceneview.replace("pose=", ""));
  76. }
  77. url = browser.replaceQueryString(url, "m", sceneFirstView.num);
  78. return url;
  79. };
  80. let visibilitychangeFn = () => {
  81. if (browser.isTabHidden()) {
  82. apis.burying_point({ type: 1 });
  83. }
  84. };
  85. let hashchangefn = () => {
  86. if (window.location.hash.indexOf("#showpage") >= 0) {
  87. window.history.go(-1);
  88. }
  89. };
  90. const musicPlayer = useMusicPlayer();
  91. let app = null;
  92. let tagid = browser.getURLParam("tagid");
  93. const role = computed(() => store.getters["rtc/role"]);
  94. const closetagtype = () => {
  95. store.commit("tag/setTagClickType", {
  96. type: "",
  97. data: {},
  98. });
  99. if (isshoppingguide.value) {
  100. if (role.value == "leader") {
  101. socket.value &&
  102. socket.value.emit("action", {
  103. type: "tagclose",
  104. });
  105. }
  106. }
  107. };
  108. const socket = computed(() => store.getters["rtc/socket"]);
  109. const tags = computed(() => {
  110. return store.getters["tag/tags"] || [];
  111. });
  112. const isshoppingguide = computed(() => store.getters["shoppingguide"]);
  113. const player = computed(() => store.getters["player"]);
  114. const flying = computed(() => store.getters["flying"]);
  115. const metadata = computed(() => store.getters["scene/metadata"]);
  116. const controls = computed(() => {
  117. return metadata.value.controls;
  118. });
  119. const mode = computed(() => store.getters["mode"]);
  120. const showNavigations = computed(() => store.getters["showNavigations"]);
  121. const scene$ = ref(null);
  122. const hadVideo = ref(true);
  123. if (!Cache.get("HIDENVIDEOEXPIRES")) {
  124. if (browser.getURLParam("m") == "eur-KJ-z5ZEV22AeU" && browser.getURLParam("pose") == "pano:408,qua:-0.006,0.6299,0.0049,0.7766") {
  125. Cache.set("HIDENVIDEOEXPIRES", "yes", 60 * 8 * 60);
  126. hadVideo.value = false;
  127. } else {
  128. hadVideo.value = true;
  129. }
  130. }
  131. if (browser.getURLParam("role")) {
  132. hadVideo.value = true;
  133. }
  134. const show = ref(false);
  135. const dataLoaded = ref(false);
  136. const refMiniMap = ref(null);
  137. const isCollapse = ref(false);
  138. const background = ref(null);
  139. const resize = () => {
  140. if (this.$refs.background && (this.mode == "floorplan" || this.mode == "dollhouse")) {
  141. this.$nextTick(() => {
  142. let $active = $(this.$el).find(".tabs .active");
  143. background.value.style.width = $active[0].getBoundingClientRect().width + "px";
  144. background.value.style.left = $active.position().left + "px";
  145. });
  146. }
  147. };
  148. watch(
  149. () => isshoppingguide.value,
  150. (val, old) => {
  151. let $minmap = document.querySelector("[xui_min_map]");
  152. if ($minmap) {
  153. setTimeout(async () => {
  154. if (browser.getURLParam("role") == "customer") {
  155. await nextTick();
  156. if (isshoppingguide.value) {
  157. $minmap.classList.add("gudieDisabled");
  158. } else {
  159. $minmap.classList.remove("gudieDisabled");
  160. // wxShare({
  161. // title: `cdf澳門上葡京店~`,
  162. // desc: "cdf澳門上葡京店~",
  163. // link: window.location.href.split("#")[0],
  164. // imgUrl: "https://glp-vr.cdfmembers.com/cdf/file/91dd5305525f463286f03a31abd1c154.jpg",
  165. // });
  166. }
  167. }
  168. });
  169. }
  170. },
  171. {
  172. deep: true,
  173. }
  174. );
  175. watch(
  176. () => player.value.showMap,
  177. (val, old) => {
  178. if (!isCollapse.value) {
  179. let $minmap = document.querySelector("[xui_min_map]");
  180. if ($minmap) {
  181. if (val) {
  182. $minmap.classList.remove("collapse");
  183. } else {
  184. $minmap.classList.add("collapse");
  185. }
  186. }
  187. }
  188. },
  189. {
  190. deep: true,
  191. }
  192. );
  193. watch(
  194. () => player.value.showWidgets,
  195. (val, old) => {
  196. let $minmap = document.querySelector("[xui_min_map]");
  197. if ($minmap) {
  198. if (val) {
  199. $minmap.classList.remove("collapse");
  200. } else {
  201. $minmap.classList.add("collapse");
  202. }
  203. }
  204. },
  205. {
  206. deep: true,
  207. }
  208. );
  209. watch(
  210. () => mode.value,
  211. (val, old) => {
  212. console.log(val);
  213. let timer = setTimeout(() => {
  214. clearTimeout(timer);
  215. if (val == "floorplan") {
  216. if (floorplan_ref.value && floorplan_ref.value) {
  217. background.value.style.width = floorplan_ref.value.getBoundingClientRect().width + "px";
  218. background.value.style.left = floorplan_ref.value.offsetLeft + "px";
  219. }
  220. } else if (val == "dollhouse") {
  221. if (dollhouse_ref.value && dollhouse_ref.value) {
  222. background.value.style.width = dollhouse_ref.value.getBoundingClientRect().width + "px";
  223. background.value.style.left = dollhouse_ref.value.offsetLeft + "px";
  224. }
  225. }
  226. }, 0);
  227. },
  228. {
  229. deep: true,
  230. }
  231. );
  232. const floorplan_ref = ref(null);
  233. const dollhouse_ref = ref(null);
  234. const changeMode = (name, e) => {
  235. if (e) {
  236. if (!flying.value) {
  237. store.commit("setMode", name);
  238. }
  239. } else {
  240. store.commit("setMode", name);
  241. }
  242. };
  243. const toggleMap = () => {
  244. isCollapse.value = !isCollapse.value;
  245. let $minmap = document.querySelector("[xui_min_map]");
  246. if ($minmap) {
  247. if (!isCollapse.value) {
  248. $minmap.classList.remove("collapse");
  249. } else {
  250. $minmap.classList.add("collapse");
  251. }
  252. }
  253. };
  254. const onClickTagInfo = (el) => {
  255. el.stopPropagation();
  256. let item = tags.value.find((item) => item.sid == el.target.dataset.id);
  257. if (item.type == "commodity") {
  258. guideclicktag(item);
  259. store.commit("tag/setTagClickType", {
  260. type: "goodlist",
  261. data: item,
  262. });
  263. } else if (item.type == "link_scene") {
  264. guideclicktag(item);
  265. let sceneFirstView = item.hotContent.sceneFirstView;
  266. window.location.href = jumpNewScene(sceneFirstView);
  267. }
  268. };
  269. const guideclicktag = (tag) => {
  270. if (isshoppingguide.value) {
  271. if (role.value == "leader") {
  272. socket.value &&
  273. socket.value.emit("action", {
  274. type: "tagclick",
  275. data: {
  276. sid: tag.sid,
  277. },
  278. });
  279. }
  280. }
  281. return;
  282. };
  283. onMounted(async () => {
  284. apis.burying_point({ type: 0 });
  285. app = createApp({
  286. num: browser.getURLParam("m"),
  287. dom: scene$.value,
  288. mobile: true,
  289. isLoadTags: false,
  290. sceneKind: "tiles",
  291. lang: getLocale(),
  292. scene: {
  293. markerOpacity: 1,
  294. markerURL: "https://eurs3.4dkankan.com/cdf/file/43aa29799bfd472298a47cc6370b10cc.png",
  295. pathEndColor: "#FF4641",
  296. },
  297. });
  298. app.use("MinMap", { theme: { camera_fillStyle: "#ED5D18" } });
  299. app.use("Tag");
  300. app
  301. .use("TagView", {
  302. render(data) {
  303. if (data.type == "waterfall") {
  304. return `<span class="tag-icon waterfall animate" style="background-image:url({{icon}})"></span>`;
  305. } else if (data.type == "coupon") {
  306. return `<span class="tag-icon coupon animate" style="background-image:url({{icon}})"></span>`;
  307. } else if (data.type == "applet_link") {
  308. try {
  309. data.hotContent = JSON.parse(data.hotContent);
  310. } catch (error) {}
  311. return `<span class="tag-icon applet_link animate" style="background-image:url(${
  312. data.hotContent.liveIcon.src ? common.changeUrl(data.hotContent.liveIcon.src) : "{{icon}}"
  313. })"></span>`;
  314. } else if (data.type == "link_scene") {
  315. return `<span class="tag-icon animate" style="background-image:url({{icon}})"></span>
  316. <div class="tag-body">
  317. <div data-id="${data.sid}" class="tag-commodity tag-link_scene">
  318. <p class="tag-title">${t("common.goNext")}</p>
  319. </div>
  320. </div>
  321. `;
  322. } else if (data.type == "commodity") {
  323. let arr = data.products.map((item) => item.price);
  324. let priceMin = isFinite(Math.min.apply(null, arr)) ? Math.min.apply(null, arr) : 0;
  325. let priceMax = isFinite(Math.max.apply(null, arr)) ? Math.max.apply(null, arr) : 0;
  326. let price = priceMin == priceMax ? priceMax : `${priceMin}-${priceMax}`;
  327. let range = `${data.products[0] ? data.products[0].symbol : "MOP$"} ${price}`;
  328. return `<span class="tag-icon animate" style="background-image:url({{icon}})"></span>
  329. <div class="tag-body">
  330. <div data-id="${data.sid}" class="tag-commodity">
  331. <div style="background-image:url(${data.products[0] ? data.products[0].pic : ""})" class='tag-avatar'>
  332. </div>
  333. <p class="tag-title">${data.title}</p>
  334. <p class="tag-info">${range} | ${t("common.view")} ></p>
  335. </div>
  336. </div>
  337. `;
  338. } else {
  339. return `<span class="tag-icon animate" style="background-image:url({{icon}})"></span>`;
  340. }
  341. },
  342. })
  343. .then((view) => {
  344. view.on("click", (e) => {
  345. var tag = e.data;
  346. // 聚焦當前點擊的熱點
  347. view.focus(tag.sid).then(() => {
  348. if (tag.type == "coupon") {
  349. try {
  350. if (isshoppingguide.value) {
  351. return;
  352. }
  353. document.querySelector(`[data-tag-id="${tag.sid}"] .tag-icon`).style.display = "none";
  354. let hotcontent = typeof tag.hotContent == "string" ? JSON.parse(tag.hotContent) : tag.hotContent;
  355. browser.openLink(
  356. "/subPackage/pages/activity/activity?pageId=" + hotcontent.couponLink,
  357. `https://m.cdfmembers.com/shop/600667208/showactivity?pageId=${hotcontent.couponLink}`,
  358. `/pages/showactivity/showactivity?pageId=${hotcontent.couponLink}`
  359. );
  360. apis.burying_point({ type: 2 });
  361. } catch (error) {}
  362. } else if (tag.type == "waterfall") {
  363. store.commit("tag/setTagClickType", {
  364. type: "waterfall",
  365. data: tag,
  366. });
  367. guideclicktag(tag);
  368. } else if (tag.type == "applet_link") {
  369. try {
  370. if (isshoppingguide.value) {
  371. return;
  372. }
  373. let hotcontent = typeof tag.hotContent == "string" ? JSON.parse(tag.hotContent) : tag.hotContent;
  374. browser.openLink(
  375. "/subPackage/pages/home/home?pageType=2&pageId=" + hotcontent.liveLink,
  376. `https://m.cdfmembers.com/shop/600667208/showactivity?pageId=${hotcontent.liveLink}`,
  377. `/pages/showactivity/showactivity?pageId=${hotcontent.liveLink}`
  378. );
  379. } catch (error) {}
  380. } else if (tag.type == "link_scene") {
  381. guideclicktag(tag);
  382. let sceneFirstView = tag.hotContent.sceneFirstView;
  383. window.location.href = jumpNewScene(sceneFirstView);
  384. }
  385. });
  386. });
  387. view.on("focus", (e) => {
  388. document.querySelectorAll("[xui_tags_view] >div").forEach((el) => {
  389. if (el.getAttribute("data-tag-type") == "link_scene" || el.getAttribute("data-tag-type") == "commodity") {
  390. el.querySelector(".tag-body").classList.remove("show");
  391. el.style.zIndex = "auto";
  392. }
  393. });
  394. if (e.data.type == "commodity" || e.data.type == "link_scene") {
  395. e.target.style.zIndex = "999";
  396. e.target.querySelector(".tag-body").classList.add("show");
  397. e.target.querySelector(".tag-commodity").removeEventListener("click", onClickTagInfo);
  398. e.target.querySelector(".tag-commodity").addEventListener("click", onClickTagInfo);
  399. if (tagid) {
  400. document.querySelector(`[data-id="${tagid}"]`) && document.querySelector(`[data-id="${tagid}"]`).click();
  401. tagid = null;
  402. }
  403. }
  404. });
  405. view.on("rendered", (e) => {
  406. tagid && view.focus(tagid);
  407. }); //dom渲染完成
  408. });
  409. app.use("TourPlayer");
  410. // if (!hadVideo.value) {
  411. // app.Scene.lock();
  412. // }
  413. app.Scene.on("ready", () => {
  414. show.value = true;
  415. store.commit("SetPlayerOptions", {
  416. lang: getLocale(),
  417. });
  418. wxShare({
  419. title: `${t("common.title")}~`,
  420. desc: `${t("common.title")}~`,
  421. link: window.location.href,
  422. imgUrl: "https://glp-vr.cdfmembers.com/cdf/file/91dd5305525f463286f03a31abd1c154.jpg",
  423. });
  424. });
  425. app.Scene.on("error", (data) => {
  426. switch (data.code) {
  427. case 5033:
  428. Dialog.alert(t("common.calculation"));
  429. break;
  430. case 5034:
  431. Dialog.alert(t("common.title"));
  432. break;
  433. case 5009:
  434. Dialog.alert(t("common.title"));
  435. break;
  436. case 5005:
  437. Dialog.alert(t("common.title"));
  438. break;
  439. }
  440. });
  441. app.Scene.on("loaded", (pano) => {
  442. refMiniMap.value = "[xui_min_map]";
  443. store.commit("setFloorId", pano.floorIndex);
  444. store.commit("rtc/setShowdaogou", true);
  445. if (browser.getURLParam("roomId")) {
  446. store.commit("showShoppingguide", true);
  447. } else {
  448. if (!localStorage.getItem("user_guide")) {
  449. Dialog.confirm({
  450. showCloseIcon: false,
  451. okText: t("common.know"),
  452. content: "<span style='font-size: 16px; line-height: 1.5;'>" + t("common.notice") + "<span/>",
  453. title: `${t("common.know")}:`,
  454. single: true,
  455. func: (state) => {
  456. if (state == "ok") {
  457. localStorage.setItem("user_guide", Date.now());
  458. }
  459. },
  460. });
  461. }
  462. }
  463. app.resource.tags(`${process.env.VUE_APP_RESOURCE_URL}cdf/hot/${browser.getURLParam("m")}/hot.json?rnd=${Math.random()}`);
  464. useMusicPlayer();
  465. });
  466. app.Scene.on("panorama.videorenderer.resumerender", () => {
  467. musicPlayer.pause(true);
  468. });
  469. app.Scene.on("panorama.videorenderer.suspendrender", async () => {
  470. let player = await getApp().TourManager.player;
  471. if (!player.isPlaying) {
  472. musicPlayer.resume();
  473. }
  474. });
  475. app.store.on("metadata", (metadata) => {
  476. store.commit("scene/load", metadata);
  477. if (!metadata.controls.showMap) {
  478. app.MinMap.hide(true);
  479. }
  480. dataLoaded.value = true;
  481. });
  482. app.store.on("tags", (tags) => {
  483. store.commit("tag/load", tags);
  484. });
  485. app.Camera.on("mode.beforeChange", ({ fromMode, toMode, floorIndex }) => {
  486. if (fromMode) {
  487. store.commit("setFlying", true);
  488. }
  489. });
  490. app.Camera.on("mode.afterChange", ({ toMode, floorIndex }) => {
  491. store.commit("setFlying", false);
  492. });
  493. app.Camera.on("flying.started", (pano) => {
  494. store.commit("setFlying", true);
  495. });
  496. app.Camera.on("flying.ended", ({ targetPano }) => {
  497. store.commit("setFlying", false);
  498. store.commit("setPanoId", targetPano.id);
  499. if (app.Scene.isCurrentPanoHasVideo) {
  500. apis.burying_point({ type: 5 });
  501. }
  502. });
  503. app.Camera.on("pano.chosen", (pano) => {
  504. apis.burying_point({ type: 4 });
  505. });
  506. app.store.on("tour", async (tour) => {
  507. app.TourManager.load(tour);
  508. store.commit("tour/setData", {
  509. tours: JSON.parse(
  510. JSON.stringify(app.TourManager.tours, (key, val) => {
  511. if (key === "audio") {
  512. return null;
  513. } else {
  514. return val;
  515. }
  516. })
  517. ),
  518. });
  519. store.commit("tour/setBackUp", {
  520. tours: JSON.parse(
  521. JSON.stringify(app.TourManager.tours, (key, val) => {
  522. if (key === "audio") {
  523. return null;
  524. } else {
  525. return val;
  526. }
  527. })
  528. ),
  529. });
  530. });
  531. app.store.on("floorcad", (floor) => store.commit("scene/loadFloorData", floor));
  532. app.render();
  533. document.removeEventListener("visibilitychange", visibilitychangeFn);
  534. document.addEventListener("visibilitychange", visibilitychangeFn);
  535. if (browser.detectWeixin()) {
  536. //ios的ua中无miniProgram,但都有MicroMessenger(表示是微信浏览器)
  537. wx.miniProgram.getEnv((res) => {
  538. if (res.miniprogram) {
  539. window.removeEventListener("hashchange", hashchangefn);
  540. window.addEventListener("hashchange", hashchangefn);
  541. }
  542. });
  543. }
  544. });
  545. </script>
  546. <style lang="scss">
  547. .tab-layer {
  548. width: 100%;
  549. text-align: center;
  550. display: flex;
  551. justify-content: center;
  552. align-items: center;
  553. z-index: 10;
  554. position: fixed;
  555. left: 50%;
  556. transform: translateX(-50%);
  557. top: 2.3rem;
  558. pointer-events: none;
  559. }
  560. .tabs {
  561. pointer-events: auto;
  562. position: relative;
  563. display: flex;
  564. background: #222222;
  565. border-radius: 6px;
  566. padding: 2px;
  567. justify-content: center;
  568. align-items: center;
  569. border: 1px solid rgba(255, 255, 255, 0.1);
  570. box-shadow: inset 0px 0px 6px 0px rgba(0, 0, 0, 0.5);
  571. .background {
  572. position: absolute;
  573. left: 2px;
  574. top: 2px;
  575. bottom: 2px;
  576. width: 50%;
  577. border-radius: 4px;
  578. background: #444444;
  579. box-shadow: 2px 0px 4px 0px rgba(0, 0, 0, 0.3);
  580. z-index: 0;
  581. transition: left 0.3s;
  582. }
  583. span {
  584. flex: 1;
  585. color: #fff;
  586. opacity: 0.5;
  587. border-radius: 6px;
  588. height: 0.94737rem;
  589. font-size: 0.36842rem;
  590. transition: all 0.3s ease;
  591. display: flex;
  592. align-items: center;
  593. justify-content: center;
  594. padding-left: 10px;
  595. padding-right: 10px;
  596. white-space: nowrap;
  597. z-index: 1;
  598. i {
  599. font-size: 0.47368rem;
  600. margin-right: 4px;
  601. pointer-events: none;
  602. }
  603. }
  604. span.active {
  605. opacity: 1;
  606. }
  607. }
  608. [xui_tags_view] {
  609. .tag-body {
  610. /* display: none; */
  611. position: absolute;
  612. left: 50%;
  613. bottom: 50px;
  614. transform: translateX(-50%) scale(0);
  615. transform-origin: bottom;
  616. transition: all 0.3s cubic-bezier(0.35, 0.32, 0.65, 0.63);
  617. // pointer-events: none;
  618. .tag-commodity,
  619. .tag-link_scene {
  620. min-width: 230px;
  621. height: 76px;
  622. background: rgba(255, 255, 255, 0.8);
  623. box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16);
  624. border-radius: 2px;
  625. position: relative;
  626. margin-bottom: 30px;
  627. &::before {
  628. content: "";
  629. display: inline-block;
  630. left: 50%;
  631. transform: translateX(-50%);
  632. width: 2px;
  633. height: 28px;
  634. bottom: -30px;
  635. background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
  636. position: absolute;
  637. }
  638. .tag-avatar {
  639. position: absolute;
  640. z-index: 99;
  641. width: 80px;
  642. height: 80px;
  643. background: #ffffff;
  644. box-shadow: 0px 3px 6px 0px rgb(0 0 0 / 16%);
  645. border-radius: 2px;
  646. top: -14px;
  647. left: -12px;
  648. background-size: cover;
  649. pointer-events: none;
  650. }
  651. > p {
  652. color: #131d34;
  653. font-size: 16px;
  654. pointer-events: none;
  655. }
  656. .tag-title {
  657. padding: 10px 10px 10px 76px;
  658. overflow: hidden;
  659. text-overflow: ellipsis;
  660. white-space: nowrap;
  661. width: 240px;
  662. }
  663. .tag-info {
  664. padding: 0 20px 0 76px;
  665. font-size: 12px;
  666. overflow: hidden;
  667. text-overflow: ellipsis;
  668. white-space: nowrap;
  669. }
  670. }
  671. &.show {
  672. transform: translateX(-50%) scale(1);
  673. }
  674. .tag-link_scene {
  675. height: auto;
  676. min-width: unset;
  677. .tag-title {
  678. padding: 10px;
  679. width: auto;
  680. text-align: center;
  681. }
  682. }
  683. }
  684. .coupon {
  685. width: 84px !important;
  686. height: 84px !important;
  687. &::after {
  688. content: "發現好禮";
  689. width: 100%;
  690. color: #ed5d18;
  691. position: absolute;
  692. bottom: -24px;
  693. text-align: center;
  694. font-size: 14px;
  695. }
  696. }
  697. .waterfall {
  698. width: 90px !important;
  699. height: 90px !important;
  700. }
  701. .applet_link {
  702. width: 64px !important;
  703. height: 64px !important;
  704. border-radius: 50%;
  705. background-color: #fff;
  706. border: 1px solid #ed5d18;
  707. position: relative;
  708. overflow: hidden;
  709. &::after {
  710. content: "直播中";
  711. width: 100%;
  712. height: 20px;
  713. background: #ed5d18;
  714. position: absolute;
  715. bottom: 0;
  716. text-align: center;
  717. line-height: 1.2;
  718. font-size: 12px;
  719. border-radius: 26%;
  720. }
  721. }
  722. }
  723. .gudieDisabled {
  724. pointer-events: none !important;
  725. * {
  726. pointer-events: none !important;
  727. }
  728. }
  729. @media (orientation: landscape) {
  730. .tab-layer {
  731. top: 1.2rem;
  732. .tabs {
  733. height: 0.7rem;
  734. > span {
  735. height: 0.7rem;
  736. font-size: 0.25rem;
  737. }
  738. }
  739. }
  740. }
  741. </style>