123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471 |
- <template>
- <div>
- <FloorSwitch />
- <tours />
- </div>
- </template>
- <script setup>
- import { computed } from 'vue'
- import { useStore } from 'vuex'
- import { ref } from 'vue'
- import { useApp, getApp } from '@/app'
- import FloorSwitch from './FloorSwitch'
- import tours from './tours.mobile'
- const store = useStore()
- const show = ref(false)
- const isHidden = ref(false)
- const bottom = computed(() => {
- return store.getters.controlsBottom
- })
- useApp().then(app => {
- app.Scene.on('loaded', () => (show.value = true))
- })
- </script>
- <style lang="scss" scoped>
- .disable {
- opacity: 1;
- }
- .toolbar {
- position: absolute;
- left: -1px;
- right: auto;
- bottom: 44px;
- height: 36px;
- padding-right: 1.31579rem;
- background-color: rgba(0, 0, 0, 0.5);
- border-top-right-radius: 18px;
- border-bottom-right-radius: 18px;
- border: 1px solid rgba(255, 255, 255, 0.1);
- z-index: 10;
- transition: all 0.3s;
- font-size: 14px;
- display: flex;
- align-items: center;
- justify-content: center;
- &.show {
- display: block;
- }
- &.collapse {
- transform: translateX(calc(-100% + 1.26316rem));
- // left: calc(-100% + 1.6rem);
- background-color: rgba(0, 0, 0, 0.2);
- .switch {
- //opacity: 0.5;
- i {
- transform: rotate(180deg);
- }
- }
- }
- i {
- font-size: 0.45rem;
- }
- .tour-control {
- margin-left: 0.4267rem;
- padding-right: 0.2667rem;
- position: relative;
- ::-webkit-scrollbar {
- display: none;
- }
- &.only {
- padding-right: 0.5333rem;
- border-right: 1px solid rgba(255, 255, 255, 0.16);
- }
- .btn-box {
- display: flex;
- align-items: center;
- justify-content: center;
- > i {
- margin-right: 0.2667rem;
- }
- span {
- margin-left: 0.10526rem;
- white-space: nowrap;
- margin-right: 0.1333rem;
- }
- .btn-text {
- display: flex;
- align-items: center;
- justify-content: center;
- .pull-icon {
- font-size: 0.24rem;
- transition: transform 0.3s;
- display: block;
- &.up {
- transform: rotate(-180deg);
- }
- }
- }
- }
- .part-content {
- // position: fixed;
- position: absolute;
- max-width: calc(100vw - 0.8533rem);
- height: 1.8667rem;
- background: rgba(0, 0, 0, 0.5);
- // border: 1px solid rgba(255, 255, 255, 0.1);
- // bottom: 2.9867rem;
- bottom: 1.4867rem;
- // left: 3%;
- left: 0;
- // left: 50%;
- // transform: translateX(-50%);
- border-radius: 0.1333rem;
- pointer-events: all;
- padding: 0 0.1333rem;
- display: flex;
- align-items: center;
- &.ban {
- pointer-events: none;
- }
- &::before {
- position: absolute;
- content: "";
- // left: 1.4rem;
- left: 0.5rem;
- bottom: -8px;
- width: 0;
- height: 0;
- border-left: 12px solid transparent;
- border-right: 12px solid transparent;
- border-top: 8px solid rgba(0, 0, 0, 0.5);
- }
- .slide-box {
- width: 100%;
- border-radius: 0.08rem;
- overflow: hidden;
- }
- .tour-list {
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- .tour-item {
- width: 2.4rem;
- height: 1.6rem;
- border-radius: 0.1067rem;
- background: #fff;
- margin-right: 0.1333rem;
- float: left;
- box-sizing: border-box;
- overflow: hidden;
- position: relative;
- background-repeat: no-repeat;
- background-size: cover;
- background-position: center center;
- &:last-of-type {
- margin-right: 0;
- }
- .mask-item {
- width: 100%;
- height: 0.5333rem;
- background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.5) 100%);
- position: absolute;
- bottom: 0;
- left: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- span {
- font-size: 0.32rem;
- position: relative;
- z-index: 2;
- }
- .precent {
- width: 10%;
- height: 0.5333rem;
- position: absolute;
- bottom: 0;
- left: 0;
- background: #00c8af;
- opacity: 0.4;
- z-index: 1;
- transition: width 0.1s;
- }
- }
- }
- }
- }
- }
- }
- .switch {
- position: absolute;
- right: 0;
- top: 0;
- display: flex;
- width: 1rem;
- height: 100%;
- align-items: center;
- i {
- margin-left: 0.2rem;
- font-size: 0.28rem;
- }
- }
- .guide {
- display: flex;
- height: 100%;
- width: calc(100vw - 2rem);
- flex-shrink: 0;
- &.flex {
- width: auto;
- }
- > div {
- height: 100%;
- width: 100%;
- &.play {
- display: none;
- }
- &.play {
- position: relative;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- width: 0.8rem;
- margin: 0 0.3rem;
- &::after {
- content: "";
- position: absolute;
- top: 50%;
- right: -0.3rem;
- width: 1px;
- height: 35%;
- transform: translateY(-50%);
- background-color: rgba(255, 255, 255, 0.6);
- box-shadow: 1px 0px 1px 0px rgba(0, 0, 0, 0.2);
- }
- }
- &.rooms {
- flex: 1;
- width: 100%;
- overflow: hidden;
- padding: 4px 0;
- margin-left: 0.3rem;
- }
- }
- }
- .ctrls {
- display: flex;
- height: 100%;
- flex-shrink: 0;
- align-items: center;
- &.notzh {
- &.noguide {
- > div {
- &:first-child {
- span {
- left: 10px;
- transform: translateX(0);
- &::after {
- left: 5px;
- transform: translateX(0) rotate(-180deg);
- }
- }
- }
- }
- }
- > div {
- padding: 0.3rem 0.3rem;
- &.play {
- span {
- display: flex;
- left: auto;
- bottom: auto;
- width: 1rem;
- background: transparent;
- transform: none;
- margin-bottom: 0;
- &::after {
- display: none;
- }
- em {
- display: none;
- }
- i {
- font-size: 12px;
- }
- }
- }
- &.rooms {
- &::after {
- left: 1rem;
- }
- }
- span {
- display: none;
- margin: 0;
- margin-bottom: 0.5rem;
- padding: 5px 4px;
- position: absolute;
- left: 50%;
- bottom: 100%;
- border-radius: 4px;
- background-color: rgba(0, 0, 0, 0.7);
- transform: translateX(-50%);
- z-index: 1000;
- &::after {
- content: "";
- position: absolute;
- bottom: -6px;
- left: 50%;
- width: 0;
- height: 0;
- border-width: 0 7px 6px;
- border-style: solid;
- border-color: transparent transparent rgba(0, 0, 0, 0.7);
- transform: translateX(-50%) rotate(-180deg);
- }
- &.show {
- display: block;
- }
- }
- }
- }
- &.flex {
- > div {
- &.rooms {
- right: auto;
- }
- }
- }
- > div {
- position: relative;
- padding: 0.3rem 0.18rem;
- margin-left: 0.15rem;
- display: flex;
- align-items: center;
- height: 0.89474rem;
- border-radius: 5px;
- margin-right: 0.1rem;
- opacity: 0.5;
- &.active {
- opacity: 1;
- }
- &.play {
- padding: 0.3rem 0;
- opacity: 1;
- b,
- span {
- height: 0.89474rem;
- }
- b {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 0.8rem;
- }
- span {
- position: relative;
- display: flex;
- align-items: center;
- justify-content: center;
- em {
- font-style: normal;
- }
- i {
- font-size: 12px;
- transform: scale(0.6) rotate(-180deg);
- &.down {
- transform: scale(0.6) rotate(0);
- }
- }
- }
- }
- &.rooms {
- opacity: 0;
- position: fixed;
- margin: 0;
- padding: 4px;
- left: 15px;
- right: 15px;
- bottom: 2.7rem;
- height: 1.31579rem;
- background-color: rgba(0, 0, 0, 0.5);
- border-radius: 0.17789rem;
- pointer-events: none;
- visibility: hidden;
- transition: all 0.3s;
- transform-origin: 1.5rem 100%;
- &.init {
- transform: scale(0);
- }
- &.show {
- visibility: visible;
- pointer-events: all;
- transform: scale(1);
- opacity: 1;
- }
- &.hide {
- visibility: hidden;
- transition: none;
- }
- &::after {
- content: "";
- position: absolute;
- bottom: -9px;
- left: 1.45rem;
- width: 0;
- height: 0;
- transform: translateY(-50%) rotate(180deg);
- border-width: 0 6px 6px;
- border-style: solid;
- border-color: transparent transparent rgba(0, 0, 0, 0.5);
- }
- }
- span {
- margin-left: 0.10526rem;
- white-space: nowrap;
- }
- }
- }
- @media (orientation: landscape) {
- .toolbar {
- padding-left: 0.5rem;
- bottom: 0.5rem;
- height: 0.8rem;
- font-size: 0.25rem;
- i {
- font-size: 0.25rem;
- }
- }
- .guide {
- width: calc(100vw - 4rem);
- }
- .ctrls {
- > div {
- height: 0.6rem;
- &.play {
- padding: 0.3rem 0;
- b,
- span {
- height: 0.8rem;
- }
- }
- &.rooms {
- left: 1rem;
- right: 1rem;
- bottom: 1.6rem;
- height: 0.8rem;
- transform-origin: 1.2rem 100%;
- &::after {
- left: 1.12rem;
- }
- }
- }
- }
- .switch {
- i {
- font-size: 0.2rem;
- }
- }
- }
- </style>
|