Control.Mobile.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. <template>
  2. <div>
  3. <FloorSwitch />
  4. <tours />
  5. </div>
  6. </template>
  7. <script setup>
  8. import { computed } from 'vue'
  9. import { useStore } from 'vuex'
  10. import { ref } from 'vue'
  11. import { useApp, getApp } from '@/app'
  12. import FloorSwitch from './FloorSwitch'
  13. import tours from './tours.mobile'
  14. const store = useStore()
  15. const show = ref(false)
  16. const isHidden = ref(false)
  17. const bottom = computed(() => {
  18. return store.getters.controlsBottom
  19. })
  20. useApp().then(app => {
  21. app.Scene.on('loaded', () => (show.value = true))
  22. })
  23. </script>
  24. <style lang="scss" scoped>
  25. .disable {
  26. opacity: 1;
  27. }
  28. .toolbar {
  29. position: absolute;
  30. left: -1px;
  31. right: auto;
  32. bottom: 44px;
  33. height: 36px;
  34. padding-right: 1.31579rem;
  35. background-color: rgba(0, 0, 0, 0.5);
  36. border-top-right-radius: 18px;
  37. border-bottom-right-radius: 18px;
  38. border: 1px solid rgba(255, 255, 255, 0.1);
  39. z-index: 10;
  40. transition: all 0.3s;
  41. font-size: 14px;
  42. display: flex;
  43. align-items: center;
  44. justify-content: center;
  45. &.show {
  46. display: block;
  47. }
  48. &.collapse {
  49. transform: translateX(calc(-100% + 1.26316rem));
  50. // left: calc(-100% + 1.6rem);
  51. background-color: rgba(0, 0, 0, 0.2);
  52. .switch {
  53. //opacity: 0.5;
  54. i {
  55. transform: rotate(180deg);
  56. }
  57. }
  58. }
  59. i {
  60. font-size: 0.45rem;
  61. }
  62. .tour-control {
  63. margin-left: 0.4267rem;
  64. padding-right: 0.2667rem;
  65. position: relative;
  66. ::-webkit-scrollbar {
  67. display: none;
  68. }
  69. &.only {
  70. padding-right: 0.5333rem;
  71. border-right: 1px solid rgba(255, 255, 255, 0.16);
  72. }
  73. .btn-box {
  74. display: flex;
  75. align-items: center;
  76. justify-content: center;
  77. > i {
  78. margin-right: 0.2667rem;
  79. }
  80. span {
  81. margin-left: 0.10526rem;
  82. white-space: nowrap;
  83. margin-right: 0.1333rem;
  84. }
  85. .btn-text {
  86. display: flex;
  87. align-items: center;
  88. justify-content: center;
  89. .pull-icon {
  90. font-size: 0.24rem;
  91. transition: transform 0.3s;
  92. display: block;
  93. &.up {
  94. transform: rotate(-180deg);
  95. }
  96. }
  97. }
  98. }
  99. .part-content {
  100. // position: fixed;
  101. position: absolute;
  102. max-width: calc(100vw - 0.8533rem);
  103. height: 1.8667rem;
  104. background: rgba(0, 0, 0, 0.5);
  105. // border: 1px solid rgba(255, 255, 255, 0.1);
  106. // bottom: 2.9867rem;
  107. bottom: 1.4867rem;
  108. // left: 3%;
  109. left: 0;
  110. // left: 50%;
  111. // transform: translateX(-50%);
  112. border-radius: 0.1333rem;
  113. pointer-events: all;
  114. padding: 0 0.1333rem;
  115. display: flex;
  116. align-items: center;
  117. &.ban {
  118. pointer-events: none;
  119. }
  120. &::before {
  121. position: absolute;
  122. content: "";
  123. // left: 1.4rem;
  124. left: 0.5rem;
  125. bottom: -8px;
  126. width: 0;
  127. height: 0;
  128. border-left: 12px solid transparent;
  129. border-right: 12px solid transparent;
  130. border-top: 8px solid rgba(0, 0, 0, 0.5);
  131. }
  132. .slide-box {
  133. width: 100%;
  134. border-radius: 0.08rem;
  135. overflow: hidden;
  136. }
  137. .tour-list {
  138. width: 100%;
  139. height: 100%;
  140. display: flex;
  141. align-items: center;
  142. .tour-item {
  143. width: 2.4rem;
  144. height: 1.6rem;
  145. border-radius: 0.1067rem;
  146. background: #fff;
  147. margin-right: 0.1333rem;
  148. float: left;
  149. box-sizing: border-box;
  150. overflow: hidden;
  151. position: relative;
  152. background-repeat: no-repeat;
  153. background-size: cover;
  154. background-position: center center;
  155. &:last-of-type {
  156. margin-right: 0;
  157. }
  158. .mask-item {
  159. width: 100%;
  160. height: 0.5333rem;
  161. background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.5) 100%);
  162. position: absolute;
  163. bottom: 0;
  164. left: 0;
  165. display: flex;
  166. align-items: center;
  167. justify-content: center;
  168. span {
  169. font-size: 0.32rem;
  170. position: relative;
  171. z-index: 2;
  172. }
  173. .precent {
  174. width: 10%;
  175. height: 0.5333rem;
  176. position: absolute;
  177. bottom: 0;
  178. left: 0;
  179. background: #00c8af;
  180. opacity: 0.4;
  181. z-index: 1;
  182. transition: width 0.1s;
  183. }
  184. }
  185. }
  186. }
  187. }
  188. }
  189. }
  190. .switch {
  191. position: absolute;
  192. right: 0;
  193. top: 0;
  194. display: flex;
  195. width: 1rem;
  196. height: 100%;
  197. align-items: center;
  198. i {
  199. margin-left: 0.2rem;
  200. font-size: 0.28rem;
  201. }
  202. }
  203. .guide {
  204. display: flex;
  205. height: 100%;
  206. width: calc(100vw - 2rem);
  207. flex-shrink: 0;
  208. &.flex {
  209. width: auto;
  210. }
  211. > div {
  212. height: 100%;
  213. width: 100%;
  214. &.play {
  215. display: none;
  216. }
  217. &.play {
  218. position: relative;
  219. display: flex;
  220. flex-direction: column;
  221. align-items: center;
  222. justify-content: center;
  223. width: 0.8rem;
  224. margin: 0 0.3rem;
  225. &::after {
  226. content: "";
  227. position: absolute;
  228. top: 50%;
  229. right: -0.3rem;
  230. width: 1px;
  231. height: 35%;
  232. transform: translateY(-50%);
  233. background-color: rgba(255, 255, 255, 0.6);
  234. box-shadow: 1px 0px 1px 0px rgba(0, 0, 0, 0.2);
  235. }
  236. }
  237. &.rooms {
  238. flex: 1;
  239. width: 100%;
  240. overflow: hidden;
  241. padding: 4px 0;
  242. margin-left: 0.3rem;
  243. }
  244. }
  245. }
  246. .ctrls {
  247. display: flex;
  248. height: 100%;
  249. flex-shrink: 0;
  250. align-items: center;
  251. &.notzh {
  252. &.noguide {
  253. > div {
  254. &:first-child {
  255. span {
  256. left: 10px;
  257. transform: translateX(0);
  258. &::after {
  259. left: 5px;
  260. transform: translateX(0) rotate(-180deg);
  261. }
  262. }
  263. }
  264. }
  265. }
  266. > div {
  267. padding: 0.3rem 0.3rem;
  268. &.play {
  269. span {
  270. display: flex;
  271. left: auto;
  272. bottom: auto;
  273. width: 1rem;
  274. background: transparent;
  275. transform: none;
  276. margin-bottom: 0;
  277. &::after {
  278. display: none;
  279. }
  280. em {
  281. display: none;
  282. }
  283. i {
  284. font-size: 12px;
  285. }
  286. }
  287. }
  288. &.rooms {
  289. &::after {
  290. left: 1rem;
  291. }
  292. }
  293. span {
  294. display: none;
  295. margin: 0;
  296. margin-bottom: 0.5rem;
  297. padding: 5px 4px;
  298. position: absolute;
  299. left: 50%;
  300. bottom: 100%;
  301. border-radius: 4px;
  302. background-color: rgba(0, 0, 0, 0.7);
  303. transform: translateX(-50%);
  304. z-index: 1000;
  305. &::after {
  306. content: "";
  307. position: absolute;
  308. bottom: -6px;
  309. left: 50%;
  310. width: 0;
  311. height: 0;
  312. border-width: 0 7px 6px;
  313. border-style: solid;
  314. border-color: transparent transparent rgba(0, 0, 0, 0.7);
  315. transform: translateX(-50%) rotate(-180deg);
  316. }
  317. &.show {
  318. display: block;
  319. }
  320. }
  321. }
  322. }
  323. &.flex {
  324. > div {
  325. &.rooms {
  326. right: auto;
  327. }
  328. }
  329. }
  330. > div {
  331. position: relative;
  332. padding: 0.3rem 0.18rem;
  333. margin-left: 0.15rem;
  334. display: flex;
  335. align-items: center;
  336. height: 0.89474rem;
  337. border-radius: 5px;
  338. margin-right: 0.1rem;
  339. opacity: 0.5;
  340. &.active {
  341. opacity: 1;
  342. }
  343. &.play {
  344. padding: 0.3rem 0;
  345. opacity: 1;
  346. b,
  347. span {
  348. height: 0.89474rem;
  349. }
  350. b {
  351. display: flex;
  352. align-items: center;
  353. justify-content: center;
  354. width: 0.8rem;
  355. }
  356. span {
  357. position: relative;
  358. display: flex;
  359. align-items: center;
  360. justify-content: center;
  361. em {
  362. font-style: normal;
  363. }
  364. i {
  365. font-size: 12px;
  366. transform: scale(0.6) rotate(-180deg);
  367. &.down {
  368. transform: scale(0.6) rotate(0);
  369. }
  370. }
  371. }
  372. }
  373. &.rooms {
  374. opacity: 0;
  375. position: fixed;
  376. margin: 0;
  377. padding: 4px;
  378. left: 15px;
  379. right: 15px;
  380. bottom: 2.7rem;
  381. height: 1.31579rem;
  382. background-color: rgba(0, 0, 0, 0.5);
  383. border-radius: 0.17789rem;
  384. pointer-events: none;
  385. visibility: hidden;
  386. transition: all 0.3s;
  387. transform-origin: 1.5rem 100%;
  388. &.init {
  389. transform: scale(0);
  390. }
  391. &.show {
  392. visibility: visible;
  393. pointer-events: all;
  394. transform: scale(1);
  395. opacity: 1;
  396. }
  397. &.hide {
  398. visibility: hidden;
  399. transition: none;
  400. }
  401. &::after {
  402. content: "";
  403. position: absolute;
  404. bottom: -9px;
  405. left: 1.45rem;
  406. width: 0;
  407. height: 0;
  408. transform: translateY(-50%) rotate(180deg);
  409. border-width: 0 6px 6px;
  410. border-style: solid;
  411. border-color: transparent transparent rgba(0, 0, 0, 0.5);
  412. }
  413. }
  414. span {
  415. margin-left: 0.10526rem;
  416. white-space: nowrap;
  417. }
  418. }
  419. }
  420. @media (orientation: landscape) {
  421. .toolbar {
  422. padding-left: 0.5rem;
  423. bottom: 0.5rem;
  424. height: 0.8rem;
  425. font-size: 0.25rem;
  426. i {
  427. font-size: 0.25rem;
  428. }
  429. }
  430. .guide {
  431. width: calc(100vw - 4rem);
  432. }
  433. .ctrls {
  434. > div {
  435. height: 0.6rem;
  436. &.play {
  437. padding: 0.3rem 0;
  438. b,
  439. span {
  440. height: 0.8rem;
  441. }
  442. }
  443. &.rooms {
  444. left: 1rem;
  445. right: 1rem;
  446. bottom: 1.6rem;
  447. height: 0.8rem;
  448. transform-origin: 1.2rem 100%;
  449. &::after {
  450. left: 1.12rem;
  451. }
  452. }
  453. }
  454. }
  455. .switch {
  456. i {
  457. font-size: 0.2rem;
  458. }
  459. }
  460. }
  461. </style>