|
@@ -11,6 +11,7 @@
|
|
|
draggable="false"
|
|
|
>
|
|
|
<span>请横屏浏览</span>
|
|
|
+ <span v-if="$isMobile && $isWeChat && $uaInfo.os.name === 'Android'">请确认微信-通用“开启横屏模式”按钮是否开启</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</Teleport>
|
|
@@ -27,19 +28,45 @@
|
|
|
@click="store.dispatch('closeIframePage')"
|
|
|
>
|
|
|
<iframe
|
|
|
+ v-if="!$isMobile || (!store.state.iframeAttrs.portrait || (store.state.iframeAttrs.portrait && isPortrait))"
|
|
|
:src="store.state.iframeAttrs.url"
|
|
|
:style="store.state.iframeAttrs.style"
|
|
|
/>
|
|
|
+
|
|
|
+ <div
|
|
|
+ v-if="store.state.iframeAttrs.portrait && $isMobile"
|
|
|
+ class="screen-rotate-tip portrait"
|
|
|
+ >
|
|
|
+ <div class="inner-wrapper">
|
|
|
+ <img
|
|
|
+ class=""
|
|
|
+ src="@/assets/images/tip-screen-rotate.png"
|
|
|
+ alt=""
|
|
|
+ draggable="false"
|
|
|
+ >
|
|
|
+ <span>请竖屏浏览</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { provide, inject } from 'vue'
|
|
|
+import { provide, inject, ref } from 'vue'
|
|
|
import { useStore } from "vuex"
|
|
|
import { useRouter } from "vue-router"
|
|
|
|
|
|
const store = useStore()
|
|
|
const router = useRouter()
|
|
|
+const {
|
|
|
+ windowSizeInCssForRef,
|
|
|
+ windowSizeWhenDesignForRef,
|
|
|
+} = useSizeAdapt(1920, 970)
|
|
|
+const isPortrait = ref(false)
|
|
|
+
|
|
|
+window.addEventListener("resize", () => {
|
|
|
+ console.log(window.innerWidth)
|
|
|
+ isPortrait.value = window.innerWidth < window.innerHeight
|
|
|
+})
|
|
|
|
|
|
/**
|
|
|
* 背景音乐
|
|
@@ -123,13 +150,14 @@ router.beforeEach((to, from) => {
|
|
|
sessionStorage.setItem(HISTORY_KEY, JSON.stringify(cache))
|
|
|
})
|
|
|
|
|
|
+const $uaInfo = inject('$uaInfo')
|
|
|
const $isMobile = inject('$isMobile')
|
|
|
+const $isWeChat = inject('$isWeChat')
|
|
|
const fakeBack = () => {
|
|
|
if ($isMobile) {
|
|
|
const cache = sessionStorage.getItem(HISTORY_KEY) ? JSON.parse(sessionStorage.getItem(HISTORY_KEY)) : []
|
|
|
if (cache.length) {
|
|
|
const info = cache.pop()
|
|
|
- console.log(info)
|
|
|
router.replace(info).then(() => {
|
|
|
sessionStorage.setItem(HISTORY_KEY, JSON.stringify(cache))
|
|
|
})
|
|
@@ -167,7 +195,7 @@ provide('fakeBack', fakeBack)
|
|
|
right: 58px;
|
|
|
width: 72px;
|
|
|
cursor: pointer;
|
|
|
- z-index: 8;
|
|
|
+ z-index: 10001;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -339,42 +367,42 @@ button.logo{
|
|
|
height: 100%;
|
|
|
background: rgba(0, 0, 0, 0.8);
|
|
|
display: none;
|
|
|
- z-index: 100;
|
|
|
+ z-index: 9990;
|
|
|
@media (max-aspect-ratio: 1/1) {
|
|
|
display: initial;
|
|
|
}
|
|
|
> .inner-wrapper {
|
|
|
- position: absolute;
|
|
|
- left: 50%;
|
|
|
- top: 50%;
|
|
|
- transform: translate(-50%, -50%);
|
|
|
- width: 700px;
|
|
|
- height: 700px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ padding: 80px;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
> img {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
+ width: 650px;
|
|
|
}
|
|
|
> span {
|
|
|
- position: absolute;
|
|
|
- left: 50%;
|
|
|
- bottom: -8px;
|
|
|
- transform: translate(-50%, 100%);
|
|
|
font-size: 80px;
|
|
|
- font-family: Source Han Sans-Regular, Source Han Sans;
|
|
|
- font-weight: 400;
|
|
|
+ font-family: "Source Han Sans SC light";
|
|
|
color: #ffffff;
|
|
|
- white-space: pre;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ &:not(:first-child) {
|
|
|
+ margin-top: 40px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.card-title {
|
|
|
position: relative;
|
|
|
- height: 44px;
|
|
|
- line-height: 44px !important;
|
|
|
+ height: calc(44 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ line-height: calc(44 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) !important;
|
|
|
text-align: center;
|
|
|
font-family: "SourceHanSerifCN-SemiBold" !important;
|
|
|
- font-size: 28px;
|
|
|
+ font-size: calc(28 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
color: #6A3906;
|
|
|
background: linear-gradient(90deg, rgba(255,226,122,0) 0%, #E3C67F 26%, #C9AD83 49%, #DDC38A 70%, rgba(249,226,148,0) 100%);
|
|
|
|
|
@@ -459,4 +487,21 @@ button.logo{
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
+
|
|
|
+.screen-rotate-tip.portrait {
|
|
|
+ display: block;
|
|
|
+ z-index: 10000;
|
|
|
+
|
|
|
+ @media (max-aspect-ratio: 1/1) {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .inner-wrapper {
|
|
|
+ img {
|
|
|
+ width: 300px;
|
|
|
+ }
|
|
|
+ span {
|
|
|
+ font-size: 40px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|