scene.vue 23 KB

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