Browse Source

Merge branch 'master' of http://192.168.0.115:3000/lanxin/Chengzhebei

lanxin 1 month ago
parent
commit
b9582b79c6

+ 19 - 18
src/App.tsx

@@ -110,27 +110,28 @@ export default function App() {
     } else {
       if (tempMax - height > 100) return
 
+      
+
       // 竖屏
       isHHTemp = false
       const temp = width
-      const wjwjScene = document.getElementById('wjwjScene') as HTMLIFrameElement
-      const panoramic = document.getElementById('panoramic') as HTMLIFrameElement
-      const A7Poem = document.getElementById('A7Poem') as HTMLIFrameElement
-
-      wjwjScene.style.width = height + 'px'
-      wjwjScene.style.height = temp + 'px'
-      wjwjScene.style.transform = 'rotate(90deg) translate(-50%, -50%)'
-      wjwjScene.style.transformOrigin = 'left top'
-
-      panoramic.style.width = height + 'px'
-      panoramic.style.height = temp + 'px'
-      panoramic.style.transform = 'rotate(90deg) translate(-50%, -50%)'
-      panoramic.style.transformOrigin = 'left top'
-
-      A7Poem.style.width = height + 'px'
-      A7Poem.style.height = temp + 'px'
-      A7Poem.style.transform = 'rotate(90deg) translate(-50%, -50%)'
-      A7Poem.style.transformOrigin = 'left top'
+  
+     // 用来大场景调整样式
+      const styleStr = `
+    #pageIframe #wjwjScene,
+    #pageIframe #panoramic,
+    #pageIframe #A7Poem {
+      width: ${height}px;
+      height: ${temp}px;
+      transform: rotate(90deg) translate(-50%, -50%);
+      transform-origin: left top;
+            }
+      `
+      const styletDom = document.createElement('style')
+      styletDom.type = 'text/css'
+      styletDom.id = 'myStyle'
+      styletDom.innerHTML = styleStr
+      document.querySelector('html')?.appendChild(styletDom)
 
       width = height
       height = temp

BIN
src/assets/sgImg/EN.png


BIN
src/assets/sgImg/ZH.png


+ 1 - 0
src/pages/A0base/index.module.scss

@@ -80,6 +80,7 @@
           text-align: center;
           color: rgba(255, 233, 182, 1);
           cursor: pointer;
+          font-size: 17px;
         }
 
         .baseAc {

src/pages/A1home/index.module.scss → src/pages/A1home(废弃)/index.module.scss


+ 2 - 0
src/pages/A1home/index.tsx

@@ -96,6 +96,8 @@ function A1home() {
 
   return (
     <div className={classNames(styles.A1home, isPc ? '' : styles.A1homeMo)}>
+
+
       <div className='A1baseVideo'></div>
       <div className='btn' onClick={() => setBaseFlag(true)}>
         <div className='txt'>点击进入</div>

+ 16 - 1
src/pages/A1home2/index.module.scss

@@ -6,6 +6,8 @@
 
   :global {
 
+
+
     // 背景图
     .homeImg {
       position: absolute;
@@ -85,6 +87,18 @@
           animation: zhiti 2s infinite linear;
         }
       }
+
+      .A1Launge {
+        position: absolute;
+        top: 15px;
+        right: 15px;
+        z-index: 15;
+
+        img {
+          width: 60px;
+          height: 60px;
+        }
+      }
     }
 
     .A1videoBox {
@@ -104,7 +118,8 @@
         color: #fff;
         font-size: 18px;
         letter-spacing: 4px;
-        &>img{
+
+        &>img {
           position: relative;
           top: -3px;
           width: 30px;

+ 20 - 5
src/pages/A1home2/index.tsx

@@ -5,10 +5,10 @@ import { isPc } from '@/utils/http'
 import { domDelOwnFu } from '@/utils/utilsSome'
 import { useSelector } from 'react-redux'
 import { RootState } from '@/store'
+import { Toast } from 'antd-mobile'
 
 function A1home() {
-
-  const {myLangue} = useSelector((state: RootState) => state.A0Layout)
+  const { myLangue } = useSelector((state: RootState) => state.A0Layout)
 
   // 先加载背景图片
   const [baseImg, setBaseImg] = useState(false)
@@ -143,11 +143,26 @@ function A1home() {
           {progress !== 100 ? (
             <img src={require('@/assets/img/home_loading.png')} alt='' draggable='false' />
           ) : (
-            <div className='txt'>点击进入</div>
+            <div className='txt'>{myLangue === 'ZH' ? '点击进入' : 'enter'}</div>
           )}
         </div>
         <div className='progress' style={{ opacity: progress === 100 ? 0 : 1 }}>
-          {myLangue==='ZH'?'加载':'Loding'}{progress}%...
+          {myLangue === 'ZH' ? '加载' : 'Loding'}
+          {progress}%...
+        </div>
+
+        {/* 中英文按钮切换 */}
+        <div
+          className='A1Launge'
+          hidden={progress < 100}
+          onClick={() => {
+            Toast.show({
+              content: '正在开发中'
+            })
+            // locSetLangue(myLangue==='ZH'?'EN':'ZH')
+          }}
+        >
+          <img src={require(`@/assets/sgImg/${myLangue}.png`)} alt='' />
         </div>
       </div>
       {/* ------------微信浏览器不让视频自动播放,用ts的方式*/}
@@ -163,7 +178,7 @@ function A1home() {
               window.location.replace('#/base')
             }}
           >
-            {myLangue==='ZH'?'跳过':'skip'}
+            {myLangue === 'ZH' ? '跳过' : 'skip'}
             <img src={require('@/assets/sgImg/icon_skip.png')} alt='' />
           </div>
         </div>

File diff suppressed because it is too large
+ 41 - 11
src/pages/A7wjwj/conponents/Content/index.tsx


+ 38 - 1
src/pages/A7wjwj/conponents/Discover/index.module.scss

@@ -360,7 +360,44 @@
     }
 
     .left {
-      .record1 {}
+      .record1 {
+        width: 230px;
+        height: 120px;
+        transform: translate(-79%, -112%);
+
+        .text {
+          font-size: 14px;
+        }
+
+        .btn {
+          font-size: 14px;
+        }
+      }
+
+      .record2 {
+        padding-top: 15px;
+        width: 190px;
+        height: 80px;
+        transform: translate(-4%, 120%);
+
+        .text {
+          font-size: 14px;
+        }
+
+        .btn {
+          font-size: 14px;
+        }
+
+        .btnContainer {
+          .icon {
+            width: 20px;
+            height: 20px;
+            position: relative;
+            left: -2px;
+            top: -1px;
+          }
+        }
+      }
     }
   }
 }

+ 5 - 9
src/pages/A7wjwj/conponents/Discover/index.tsx

@@ -6,9 +6,7 @@ import { useSelector } from 'react-redux'
 import { RootState } from '@/store'
 
 function Discover(props: { style?: React.CSSProperties }) {
-
-
-  const {myData} = useSelector((state: RootState) => state.A0Layout)
+  const { myData } = useSelector((state: RootState) => state.A0Layout)
 
   // 将隐藏的页面打开,全景图->诗歌->大场景
   const lookScene = () => {
@@ -25,12 +23,10 @@ function Discover(props: { style?: React.CSSProperties }) {
           <div className='record record1'>
             <div className='text'>
               {myData.discover.txt1Items.map((item, index) => (
-                <>
-                  <span key={index}>
-                    {item.title}
-                    {index !== myData.discover.txt1Items.length - 1 && <br />}
-                  </span>
-                </>
+                <span key={index}>
+                  {item.title}
+                  {index !== myData.discover.txt1Items.length - 1 && <br />}
+                </span>
               ))}
             </div>
             <div className='btn' onClick={() => setIsShowRecord(false)}>

+ 4 - 3
src/utils/storage.ts

@@ -11,15 +11,16 @@ export const locGetLangue = (): 'ZH' | 'EN' => {
 }
 
 /**
- * 从本地存语言
+ * 存语言
  */
 export const locSetLangue = (val: 'ZH' | 'EN') => {
   localStorage.setItem(LANGUE_KEY, val)
+  setStoreLangueFu(val)
 }
 
 // 设置仓库语言
-export const setStoreLangueFu = () => {
-  const val = locGetLangue()
+export const setStoreLangueFu = (valTemp?: 'ZH' | 'EN') => {
+  const val = valTemp ? valTemp : locGetLangue()
   store.dispatch({ type: 'layout/myLangue', payload: val })
   const myData = val === 'ZH' ? myDataTemp : myDataTemp2
   store.dispatch({ type: 'layout/myData', payload: myData })