shaogen1995 1 месяц назад
Родитель
Сommit
9c302882a6

+ 1 - 0
public/index.html

@@ -8,6 +8,7 @@
     <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
     <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
     <script src="./myData/myData.js"></script>
+    <script src="./myData/myDataEN.js"></script>
     <script src="./myData/hot.js"></script>
 
     <script src="./myData/jsmpeg.min.js"></script>

+ 4 - 4
public/myData/myData.js

@@ -707,22 +707,22 @@ const myDataTemp = {
     ],
     search: [
       {
-        title: '程哲碑最早著录',
+        title: '程哲碑最早著录',
         txt: '今在长治县袁家漏村,谨案此碑于近年始经人访得摩崖刻,高四尺,许字三十二行(此处《通志》有偏差,实三十一行),行四十五字,楷法劲整,惟结体甚小,摩崖刻艰于运刀,锋芒少锻而完好,仅缺数字,殊可贵也……',
         from: '——(清)王轩、杨笃:《山西通志》'
       },
       {
-        title: '碑文最早著录',
+        title: '碑文最早著录',
         txt: '清光绪二十年(1894)杨笃编修成书的《长治县志》第四卷中首次著录了程哲碑的全文,标明袁家漏村即今东呈村。',
         from: ''
       },
       {
-        title: '最早公布完整拓片',
+        title: '最早公布完整拓片',
         txt: '1920年11月,佛教学者常盘大定太原考察时,出版的《中国文化史迹》中首次公布了程哲碑龛像面及两侧面的拓片,使学界第一次获悉了程哲碑的完整拓片。',
         from: ''
       },
       {
-        title: '已知公布最早照片',
+        title: '已知公布最早照片',
         txt: '1940年12月,水野清一、日比野丈夫等考察傅公祠时拍摄了程哲碑已知最早的照片,对程哲碑的图像进行了记录,在注释中对清末以来的著录情况进行了介绍,刊布了碑侧的照片。',
         from: ''
       }

+ 6 - 24
public/myData/myDataEN.js

@@ -1,23 +1,5 @@
-window.isHH = document.documentElement.clientWidth >= document.documentElement.clientHeight
-
-const isPcTemp = document.documentElement.clientWidth >= 1200
-
-// 本地开发静态资源目录
-const baseUrlLoc = 'http://192.168.0.68:8080/staticData/'
-
-// 发送请求基地址
-const apiUrlTemp = 'https://sit-handaizy.4dage.com/api/'
-
-const myBaseUrl = 'https://houseoss.4dkankan.com/project/henan/'
-
-// Build开发资源目录
-const baseUrlAtl = myBaseUrl + 'staticData/'
-
-// 全景视频/全景图/unity场景资源地址
-const otherUrlTemp = myBaseUrl
-
-// 一些动态配置的数据
-const myDataTemp = {
+// 一些动态配置的数据---英文版
+const myDataTemp2 = {
   isLdong: true,
   // /base页的三个模块信息
   baseInfo: [
@@ -707,22 +689,22 @@ const myDataTemp = {
     ],
     search: [
       {
-        title: '程哲碑最早著录',
+        title: '程哲碑最早著录',
         txt: '今在长治县袁家漏村,谨案此碑于近年始经人访得摩崖刻,高四尺,许字三十二行(此处《通志》有偏差,实三十一行),行四十五字,楷法劲整,惟结体甚小,摩崖刻艰于运刀,锋芒少锻而完好,仅缺数字,殊可贵也……',
         from: '——(清)王轩、杨笃:《山西通志》'
       },
       {
-        title: '碑文最早著录',
+        title: '碑文最早著录',
         txt: '清光绪二十年(1894)杨笃编修成书的《长治县志》第四卷中首次著录了程哲碑的全文,标明袁家漏村即今东呈村。',
         from: ''
       },
       {
-        title: '最早公布完整拓片',
+        title: '最早公布完整拓片',
         txt: '1920年11月,佛教学者常盘大定太原考察时,出版的《中国文化史迹》中首次公布了程哲碑龛像面及两侧面的拓片,使学界第一次获悉了程哲碑的完整拓片。',
         from: ''
       },
       {
-        title: '已知公布最早照片',
+        title: '已知公布最早照片',
         txt: '1940年12月,水野清一、日比野丈夫等考察傅公祠时拍摄了程哲碑已知最早的照片,对程哲碑的图像进行了记录,在注释中对清末以来的著录情况进行了介绍,刊布了碑侧的照片。',
         from: ''
       }

BIN
src/assets/img/btn_menu.png


BIN
src/assets/sgImg/homeBg.jpg


BIN
src/assets/sgImg/thrrTxtBg.png


+ 14 - 0
src/assets/styles/base.css

@@ -429,3 +429,17 @@ textarea {
     transform: translateX(0);
   }
 }
+#root .moFont {
+  font-size: 16px;
+  line-height: 24px;
+  letter-spacing: 2px;
+  font-weight: 400;
+  color: #504e40;
+}
+#root .moBack {
+  width: 80px;
+  height: 40px;
+}
+#root .moBack img {
+  object-fit: fill !important;
+}

+ 28 - 6
src/assets/styles/base.less

@@ -67,7 +67,7 @@ body #A7Back {
   left: 4%;
   cursor: pointer;
 
-  & > img {
+  &>img {
     height: 100%;
     object-fit: contain;
   }
@@ -78,7 +78,7 @@ body #A7Back {
   margin: auto;
   position: relative;
 
-  & > div {
+  &>div {
     width: 100%;
     height: 100%;
   }
@@ -207,7 +207,7 @@ textarea {
   bottom: 15px;
   right: 20px;
 
-  & > img {
+  &>img {
     position: absolute;
     top: 0;
     left: 0;
@@ -325,12 +325,13 @@ textarea {
         justify-content: end;
         align-items: center;
 
-        & > img {
+        &>img {
           height: 90%;
           object-fit: contain;
         }
       }
     }
+
     .content {
       font-size: 14px !important;
       line-height: 20px !important;
@@ -350,7 +351,7 @@ textarea {
     z-index: 3;
     cursor: pointer;
 
-    & > img {
+    &>img {
       height: 100%;
       object-fit: contain;
     }
@@ -486,7 +487,7 @@ textarea {
       justify-content: end;
       align-items: center;
 
-      & > img {
+      &>img {
         height: 90%;
         object-fit: contain;
       }
@@ -501,6 +502,7 @@ textarea {
     color: #fff;
     font-weight: lighter;
     overflow: auto;
+
     &::-webkit-scrollbar {
       width: 0px;
     }
@@ -531,6 +533,7 @@ textarea {
 .opacityChange {
   animation: opacityChange 2s infinite linear;
 }
+
 @keyframes opacityChange {
   0% {
     opacity: 1;
@@ -559,4 +562,23 @@ textarea {
   100% {
     transform: translateX(0);
   }
+}
+
+// 默认字体
+#root .moFont {
+  font-size: 16px;
+  line-height: 24px;
+  letter-spacing: 2px;
+  font-weight: 400;
+  color: #504e40;
+}
+
+// 移动端返回按钮
+#root .moBack {
+  width: 80px;
+  height: 40px;
+
+  img {
+    object-fit: fill !important;
+  }
 }

+ 98 - 7
src/pages/A7wjwj/conponents/Discover/index.module.scss

@@ -5,7 +5,9 @@
   justify-content: space-between;
   align-items: center;
   position: relative;
+
   :global {
+
     .left,
     .left2 {
       width: 45%;
@@ -13,6 +15,7 @@
       position: relative;
       background: url('../../../../assets/img/A7_map1.png') no-repeat center bottom;
       background-size: contain;
+
       .record {
         width: fit-content;
         height: fit-content;
@@ -26,9 +29,11 @@
         gap: 5px;
         padding: 10px;
         color: rgba(255, 255, 255, 1);
+
         .text {
           font-size: 9px;
         }
+
         .btn {
           text-align: right;
           font-size: 9px;
@@ -37,6 +42,7 @@
           cursor: pointer;
         }
       }
+
       .record1 {
         width: 200px;
         height: 75px;
@@ -44,29 +50,34 @@
         background: url('../../../../assets/img/A7_discover_record1.png') no-repeat center center;
         background-size: 100% 100%;
       }
+
       .record2 {
         width: 130px;
         height: 60px;
         transform: translate(0%, 166%);
         background: url('../../../../assets/img/A7_discover_record2.png') no-repeat center center;
         background-size: 100% 100%;
+
         .btnContainer {
           width: 100%;
           height: 12px;
           display: flex;
           justify-content: flex-end;
           align-items: center;
+
           .icon {
             width: 15px;
             height: 12px;
             line-height: 10px;
-            & > img {
+
+            &>img {
               height: 100%;
               object-fit: contain;
             }
           }
         }
       }
+
       .record3 {
         width: 155px;
         height: 45px;
@@ -77,6 +88,7 @@
         align-items: center;
         flex-direction: row;
       }
+
       .record4 {
         width: 140px;
         height: 25px;
@@ -86,10 +98,12 @@
         display: flex;
         align-items: center;
         flex-direction: row;
+
         .text {
           height: 8px;
         }
       }
+
       .record5 {
         width: 102px;
         height: 25px;
@@ -99,10 +113,12 @@
         display: flex;
         align-items: center;
         flex-direction: row;
+
         .text {
           height: 15px;
         }
       }
+
       .point {
         height: 15px;
         width: 15px;
@@ -110,18 +126,22 @@
         top: 50%;
         left: 50%;
         transform: translate(-50%, -50%);
-        & > img {
+
+        &>img {
           height: 100%;
           object-fit: contain;
         }
       }
+
       .point1 {
         transform: translate(17%, -82%);
       }
+
       .point2 {
         transform: translate(69%, 482%);
       }
     }
+
     .left {
       .arrow1 {
         width: 13px;
@@ -134,19 +154,24 @@
         background-size: 100% 100%;
       }
     }
+
     .left2 {
       background: url('../../../../assets/img/A7_map2.png') no-repeat center bottom;
       background-size: contain;
       position: relative;
+
       .point3 {
         transform: translate(412%, 117%);
       }
+
       .point4 {
         transform: translate(-248%, 292%);
       }
+
       .point5 {
         transform: translate(-412%, -170%);
       }
+
       .arrow2 {
         width: 22px;
         height: 58px;
@@ -157,6 +182,7 @@
         background: url('../../../../assets/img/A7_discover_arrow2.png') no-repeat center center;
         background-size: 100% 100%;
       }
+
       .arrow3 {
         width: 77px;
         height: 28px;
@@ -167,6 +193,7 @@
         background: url('../../../../assets/img/A7_discover_arrow3.png') no-repeat center center;
         background-size: 100% 100%;
       }
+
       .back {
         width: 60px;
         height: 30px;
@@ -182,22 +209,25 @@
         justify-content: center;
         font-size: 12px;
 
-        & > img {
+        &>img {
           position: absolute;
           z-index: -1;
           height: 100%;
           object-fit: contain;
         }
+
         .txt {
           color: rgba(255, 223, 174, 1);
         }
       }
     }
+
     .right {
-      margin-top: 200px;
+      margin-top: 160px;
       padding-bottom: 10px;
       width: 55%;
       height: 100%;
+
       .scroll {
         width: 100%;
         height: 78%;
@@ -206,12 +236,16 @@
         align-items: center;
         gap: 10px;
         overflow: auto;
+        padding-bottom: 15px;
+        padding-top: 6px;
+
         &::-webkit-scrollbar {
           width: 0;
         }
       }
+
       .item {
-        width: 90%;
+        width: 95%;
         height: fit-content;
         display: flex;
         flex-direction: column;
@@ -223,16 +257,19 @@
           display: flex;
           align-items: center;
           gap: 5px;
+
           .icon {
             width: 15px;
             height: 15px;
             object-fit: contain;
             line-height: 14px;
-            & > img {
+
+            &>img {
               height: 100%;
               object-fit: contain;
             }
           }
+
           .txt {
             height: 15px;
             line-height: 15px;
@@ -241,6 +278,7 @@
             font-size: 12px;
           }
         }
+
         .text {
           width: 95%;
           height: fit-content;
@@ -248,7 +286,20 @@
           color: rgba(93, 96, 96, 1);
           font-size: 11px;
           line-height: 18px;
+          position: relative;
+
+          .textBj {
+            position: absolute;
+            top: -0%;
+            left: -0%;
+            width: 100%;
+            height: 100%;
+            max-width: 99999px;
+            max-height: 99999px;
+            object-fit: fill !important;
+          }
         }
+
         .from {
           width: 95%;
           height: fit-content;
@@ -259,6 +310,7 @@
         }
       }
     }
+
     .direct {
       width: 70px;
       height: 70px;
@@ -266,10 +318,49 @@
       left: 2%;
       bottom: 2%;
       cursor: pointer;
-      & > img {
+
+      &>img {
         height: 100%;
         object-fit: contain;
       }
     }
   }
 }
+
+// ------------移动端
+.DiscoverMo {
+  :global {
+    .right {
+      .item {
+        .title {
+          .icon {
+            position: relative;
+            top: -1px;
+            width: 18px;
+            height: 18px;
+          }
+
+          .txt {
+            font-size: 16px;
+          }
+        }
+
+        .text {
+          margin-top: 8px;
+          font-size: 16px;
+          line-height: 22px;
+
+
+        }
+
+        .from {
+          font-size: 14px;
+        }
+      }
+    }
+
+    .left {
+      .record1 {}
+    }
+  }
+}

+ 51 - 47
src/pages/A7wjwj/conponents/Discover/index.tsx

@@ -1,6 +1,8 @@
 import React, { useState } from 'react'
 import styles from './index.module.scss'
-import { myData } from '@/utils/http'
+import { isPc, myData } from '@/utils/http'
+import classNames from 'classnames'
+
 function Discover(props: { style?: React.CSSProperties }) {
   // 将隐藏的页面打开,全景图->诗歌->大场景
   const lookScene = () => {
@@ -11,19 +13,19 @@ function Discover(props: { style?: React.CSSProperties }) {
   }
   const [isShowRecord, setIsShowRecord] = useState(true)
   return (
-    <div className={styles.Discover} style={props.style}>
+    <div className={classNames(styles.Discover, isPc ? '' : styles.DiscoverMo)} style={props.style}>
       {isShowRecord && (
         <div className='left'>
           <div className='record record1'>
             <div className='text'>
-              {
-                myData.discover.txt1Items.map((item, index) => (
+              {myData.discover.txt1Items.map((item, index) => (
+                <>
                   <span key={index}>
                     {item.title}
                     {index !== myData.discover.txt1Items.length - 1 && <br />}
                   </span>
-                ))
-              }
+                </>
+              ))}
             </div>
             <div className='btn' onClick={() => setIsShowRecord(false)}>
               查看流转轨迹
@@ -35,10 +37,12 @@ function Discover(props: { style?: React.CSSProperties }) {
               <div className='icon'>
                 <img src={require('@/assets/img/A7_rotate.png')} alt='' />
               </div>
-              <div className='btn' onClick={() => lookScene()}>场景漫游</div>
+              <div className='btn' onClick={() => lookScene()}>
+                场景漫游
+              </div>
             </div>
           </div>
-          <div className="arrow1"></div>
+          <div className='arrow1'></div>
           <div className='point point1'>
             <img src={require('@/assets/img/A7_point1.png')} alt='' />
           </div>
@@ -46,57 +50,57 @@ function Discover(props: { style?: React.CSSProperties }) {
             <img src={require('@/assets/img/A7_point1.png')} alt='' />
           </div>
         </div>
-      )
-      }
-      {
-        !isShowRecord && (
-          <div className='left2'>
-            {myData.discover.txt1Items.map((item, index) => (
-              <div className={`record ${'record' + (index + 3)}`} key={index}>
-                <div className='text'>{item.title}</div>
-              </div>
-            ))}
-            <div className='point point3'>
-              <img src={require('@/assets/img/A7_point2.png')} alt='' />
-            </div>
-            <div className='point point4'>
-              <img src={require('@/assets/img/A7_point2.png')} alt='' />
-            </div>
-            <div className='point point5'>
-              <img src={require('@/assets/img/A7_point2.png')} alt='' />
-            </div>
-            <div className="arrow2"></div>
-            <div className="arrow3"></div>
-            <div className='back' onClick={() => setIsShowRecord(true)}>
-              <img src={require('@/assets/img/A7_discover_back.png')} alt='' />
-              <div className="txt">返回</div>
+      )}
+      {!isShowRecord && (
+        <div className='left2'>
+          {myData.discover.txt1Items.map((item, index) => (
+            <div className={`record ${'record' + (index + 3)}`} key={index}>
+              <div className='text'>{item.title}</div>
             </div>
+          ))}
+          <div className='point point3'>
+            <img src={require('@/assets/img/A7_point2.png')} alt='' />
           </div>
-        )
-      }
+          <div className='point point4'>
+            <img src={require('@/assets/img/A7_point2.png')} alt='' />
+          </div>
+          <div className='point point5'>
+            <img src={require('@/assets/img/A7_point2.png')} alt='' />
+          </div>
+          <div className='arrow2'></div>
+          <div className='arrow3'></div>
+          <div className='back' onClick={() => setIsShowRecord(true)}>
+            <img src={require('@/assets/img/A7_discover_back.png')} alt='' />
+            <div className='txt'>返回</div>
+          </div>
+        </div>
+      )}
       <div className='right'>
         <div className='scroll'>
-          {
-            myData.discover.search.map((item, index) => (
-              <div className='item' key={index}>
-                <div className='title'>
-                  <div className='icon'>
-                    <img src={require('@/assets/img/A7base3_icon.png')} alt='' />
-                  </div>
-                  <div className='txt'>{item.title}</div>
+          {myData.discover.search.map((item, index) => (
+            <div className='item' key={index}>
+              <div className='title'>
+                <div className='icon'>
+                  <img src={require('@/assets/img/A7base3_icon.png')} alt='' />
                 </div>
-                <div className='text'>{item.txt}</div>
-                <div className='from'>{item.from}</div>
+                <div className='txt'>{item.title}</div>
               </div>
-            ))
-          }
+              <div className='text'>
+                {index === 0 ? (
+                  <img className='textBj' src={require('@/assets/sgImg/thrrTxtBg.png')} alt='' />
+                ) : null}
 
+                {item.txt}
+              </div>
+              <div className='from'>{item.from}</div>
+            </div>
+          ))}
         </div>
       </div>
       <div className='direct'>
         <img src={require('@/assets/img/A7_direct.png')} alt='' draggable={false} />
       </div>
-    </div >
+    </div>
   )
 }
 

+ 26 - 4
src/pages/A7wjwj/conponents/Shuxing/index.tsx

@@ -1,9 +1,32 @@
-import React, { useState } from 'react'
+import React, { useCallback, useState } from 'react'
 import styles from './index.module.scss'
 import { myData } from '@/utils/http'
-function Shuxing({ style }: { style?: React.CSSProperties }) {
+import { forwardRef, useImperativeHandle } from 'react'
+
+type Props ={
+  style:React.CSSProperties
+  ref:any
+}
+
+function Shuxing({ style }:Props,ref:any) {
   const [currentIndex, setCurrentIndex] = useState(0)
   const [isShowDetail, setIsShowDetail] = useState(false)
+
+ // 让父组件调用,查看当前层级
+  const sonGetStaFu = useCallback(() => {
+    return isShowDetail
+  }, [isShowDetail])
+
+  const sonSetStaFu =useCallback(()=>{
+    setIsShowDetail(false)
+  },[])
+
+  // 可以让父组件调用子组件的方法
+  useImperativeHandle(ref, () => ({
+    sonGetStaFu,
+    sonSetStaFu
+  }))
+
   return (
     <div className={styles.Shuxing} style={style}>
       {!isShowDetail && (
@@ -46,6 +69,5 @@ function Shuxing({ style }: { style?: React.CSSProperties }) {
   )
 }
 
-const MemoShuxing = React.memo(Shuxing)
+export default forwardRef(Shuxing)
 
-export default MemoShuxing

+ 18 - 4
src/pages/A7wjwj/index.module.scss

@@ -23,8 +23,8 @@
     .topBar {
       position: absolute;
       left: 50%;
-      top: 0;
-      transform: translate(-50%, 100%);
+      top: 6%;
+      transform: translateX(-50%);
       width: fit-content;
       height: 40px;
       display: flex;
@@ -49,8 +49,8 @@
             left: 50%;
             top: 50%;
             transform: translate(-50%, -56%);
-            width: 120%;
-            height: 100%;
+            width: 140%;
+            height: 110%;
             background: url('../../assets/img/A7_btn_ac.png') no-repeat center center;
             background-size: contain;
           }
@@ -71,3 +71,17 @@
     }
   }
 }
+
+
+// --------移动端
+.A7WjwjMo{
+  :global {
+    .topBar{
+      left: 55%;
+      .tab{
+        width: auto;
+        font-size: 20px;
+      }
+    }
+  }
+}

+ 28 - 20
src/pages/A7wjwj/index.tsx

@@ -1,45 +1,53 @@
-import React, { useState } from "react";
-import styles from "./index.module.scss";
-import MenuSider from "@/components/MenuSider";
-import Discover from "./conponents/Discover";
-import Shuxing from "./conponents/Shuxing";
-import { myData } from "@/utils/http";
+import React, { useRef, useState } from 'react'
+import styles from './index.module.scss'
+import MenuSider from '@/components/MenuSider'
+import Discover from './conponents/Discover'
+import Shuxing from './conponents/Shuxing'
+import { isPc, myData } from '@/utils/http'
+import classNames from 'classnames'
 
 function A7Wjwj() {
   const [currentTab, setCurrentTab] = useState(0)
 
+  // 判断是 返回 属性之辩 上一级 还是说 返回上级页面
+  const tab2Ref = useRef<any>(null)
   const gotoBack = () => {
-    window.location.replace('#/base')
+    const flag = tab2Ref.current?.sonGetStaFu()
+    if (flag) tab2Ref.current?.sonSetStaFu()
+    else window.location.replace('#/base')
   }
   return (
-    <div className={styles.A7Wjwj}>
+    <div className={classNames(styles.A7Wjwj, isPc ? '' : styles.A7WjwjMo)}>
       {/* 发现之谜 */}
       <Discover style={{ display: currentTab === 0 ? 'flex' : 'none' }} />
       {/* 属性之辩 */}
-      <Shuxing style={{ display: currentTab === 1 ? 'flex' : 'none' }} />
+      <Shuxing ref={tab2Ref} style={{ display: currentTab === 1 ? 'flex' : 'none' }} />
       {/* 未解之思 */}
-      <div className="weijie" style={{ display: currentTab === 2 ? 'flex' : 'none' }}>
+      <div className='weijie' style={{ display: currentTab === 2 ? 'flex' : 'none' }}>
         {myData.weijie}
       </div>
 
-
-
-      <div className='back' onClick={() => gotoBack()}>
+      <div className={classNames('back', isPc ? '' : 'moBack')} onClick={() => gotoBack()}>
         <img src={require('@/assets/img/btn_back.png')} alt='' />
       </div>
 
-      <div className="topBar">
-        <div className={`tab ${currentTab === 0 ? 'active' : ''}`} onClick={() => setCurrentTab(0)}>发现之谜</div>
-        <div className={`tab ${currentTab === 1 ? 'active' : ''}`} onClick={() => setCurrentTab(1)}>属性之辩</div>
-        <div className={`tab ${currentTab === 2 ? 'active' : ''}`} onClick={() => setCurrentTab(2)}>未解之思</div>
+      <div className='topBar'>
+        <div className={`tab ${currentTab === 0 ? 'active' : ''}`} onClick={() => setCurrentTab(0)}>
+          发现之谜
+        </div>
+        <div className={`tab ${currentTab === 1 ? 'active' : ''}`} onClick={() => setCurrentTab(1)}>
+          属性之辩
+        </div>
+        <div className={`tab ${currentTab === 2 ? 'active' : ''}`} onClick={() => setCurrentTab(2)}>
+          未解之思
+        </div>
       </div>
 
       <MenuSider activeTab={2} />
-
     </div>
   )
 }
 
-const MemoA7Wjwj = React.memo(A7Wjwj);
+const MemoA7Wjwj = React.memo(A7Wjwj)
 
-export default MemoA7Wjwj;
+export default MemoA7Wjwj

+ 1 - 0
src/types/declaration.d.ts

@@ -12,6 +12,7 @@ declare const baseUrlLoc: string
 declare const baseUrlAtl: string
 declare const isPcTemp: boolean
 declare const myDataTemp: MyDataType
+declare const myDataTemp2: MyDataType
 declare const otherUrlTemp: string
 declare const myHotInfo: any
 declare const apiUrlTemp: string

+ 8 - 35
src/utils/storage.ts

@@ -1,44 +1,17 @@
-// ------------------------------------token的本地存储------------------------------------
-
+// ----------------------中英文本地存储
 // 点赞的本时间戳
-const TIME_KEY = 'HNBWY_WEB_TIME_NUM'
+const LANGUE_KEY = 'CZB_WEB_LANGUE'
 
 /**
- * 从本地缓存中获取时间戳
+ * 从本地缓存中获取语言
  */
-const locGetTimeFu = (): string => {
-  return localStorage.getItem(TIME_KEY) || ''
+const locGetLangue = (): string => {
+  return localStorage.getItem(LANGUE_KEY) || 'ZH'
 }
 
 /**
- * 存入时间戳
+ * 从本地存语言
  */
-export const locSetTimeFu = (): void => {
-  // 获取当天0点时间戳
-  const timestamp = new Date().setHours(0, 0, 0, 0)
-  localStorage.setItem(TIME_KEY, timestamp + '')
-}
-
-/**
- * true:表示没有时间戳/超过22小时(可以点赞)
- * 获取本地缓存中的时间戳是不是存在/有没有超过22小时
- */
-export const locTimeFlagFu = (): boolean => {
-  let flag = false
-  const time = locGetTimeFu()
-
-  if (time) {
-    const timeNum = Number(time)
-    // 获取当天0点时间戳
-    const nowTime = new Date().setHours(0, 0, 0, 0)
-    if (nowTime !== timeNum) {
-      // 过了0点了
-      flag = true
-    }
-  } else {
-    // 还没有存入时间戳,可以点赞
-    flag = true
-  }
-
-  return flag
+const locSetLangue = (val: 'ZH' | 'EN') => {
+  localStorage.setItem(LANGUE_KEY, val)
 }