Pārlūkot izejas kodu

style: 安全区适配

chenlei 1 gadu atpakaļ
vecāks
revīzija
099e4252bf

+ 1 - 1
public/index.html

@@ -3,7 +3,7 @@
   <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
+    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,viewport-fit=cover">
     <link rel="icon" href="<%= BASE_URL %>logo.ico">
     <title>大都:元代北京城</title>
   </head>

BIN
public/relic-data/big-photo/第116页-558.PNG


BIN
public/relic-data/small-photo/第121页-574.png


+ 0 - 1
src/App.vue

@@ -106,7 +106,6 @@ const HISTORY_KEY = 'yddFakeHistory'
 router.beforeEach((to, from) => {
   const cache = sessionStorage.getItem(HISTORY_KEY) ? JSON.parse(sessionStorage.getItem(HISTORY_KEY)) : []
 
-  console.log(to, from, cache.length && cache[cache.length - 1], '====')
   if (cache.length && JSON.stringify({
     name: to.name,
     query: to.query

+ 2 - 1
src/components/MsgContent.vue

@@ -94,7 +94,8 @@ watch(curMsg, handleAudio, {
       justify-content: center;
       position: absolute;
       top: 0;
-      left: 21vw;
+      left: calc(21vw + constant(safe-area-inset-left));
+      left: calc(21vw + env(safe-area-inset-left));
       right: 10vw;
       bottom: 0;
       color: #FFF1BE;

+ 1 - 0
src/components/StartUp.vue

@@ -131,6 +131,7 @@ function onClickSkip() {
   left: 0;
   top: 0;
   width: 100%;
+  height: 100%;
   background-image: url(@/assets/images/start-up-bg.jpg);
   background-size: cover;
   background-repeat: no-repeat;

+ 4 - 0
src/components/UserGuide.vue

@@ -140,6 +140,8 @@ const handleClose = () => {
     position: absolute;
     left: -157px;
     bottom: -18px;
+    margin-left: constant(safe-area-inset-left);
+    margin-left: env(safe-area-inset-left);
     height: 480px;
     width: 640px;
     overflow: hidden;
@@ -197,6 +199,8 @@ const handleClose = () => {
   position: absolute;
   left: 367px;
   bottom: 306px;
+  margin-left: constant(safe-area-inset-left);
+  margin-left: env(safe-area-inset-left);
   padding-left: 107px;
   width: 390px;
   height: 104px;

+ 6 - 4
src/views/HomeView.vue

@@ -76,6 +76,7 @@
       v-if="showHelper"
       class="mobile-helper"
       src="@/assets/images/mobile/icon_click_prompt-min.png"
+      @click="goToDetail(hoveringEntryIdx)"
     >
 
     <img
@@ -107,7 +108,7 @@ const stopBgAudio = inject('stopBgAudio')
 const router = useRouter()
 const store = useStore()
 
-const showHelper = ref(true)
+const showHelper = ref(false)
 const hoveringEntryIdx = ref($isMobile ? 1 : 0)
 
 onMounted(() => {
@@ -115,7 +116,8 @@ onMounted(() => {
 })
 
 watch(() => store.state.haveShownStartUp, e => {
-  if (e && showHelper.value) {
+  if (e) {
+    showHelper.value = true
     setTimeout(() => {
       showHelper.value = false
     }, 4000)
@@ -201,7 +203,7 @@ const handleHover = (num) => {
     >img.bg-default{
       position: absolute;
       width: 100%;
-      height: calc(891 / 1080 * 100vh);
+      height: calc(891 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
       left: 0;
       top: 0;
       object-fit: cover;
@@ -217,7 +219,7 @@ const handleHover = (num) => {
   >.scene-preview{
     position: absolute;
     width: 100%;
-    height: calc(891 / 1080 * 100vh);
+    height: calc(891 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
     left: 0;
     top: 0;
     >img.bg{

+ 3 - 0
src/views/PanoView.vue

@@ -1180,6 +1180,8 @@ onMounted(() => {
       position: absolute;
       left: 40px;
       bottom: 0;
+      margin-left: constant(safe-area-inset-left);
+      margin-left: env(safe-area-inset-left);
       width: 300px;
       height: 452px;
 
@@ -1247,6 +1249,7 @@ onMounted(() => {
           position: absolute;
           left: 0;
           height: 100%;
+          will-change: transform;
           animation-name: character-default-animation;
           animation-timing-function: steps(60, end);
           animation-duration: 2.5s;