Просмотр исходного кода

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

lanxin 1 неделя назад
Родитель
Сommit
23db92b013

BIN
public/myData/base.ts


+ 1 - 1
src/App.tsx

@@ -79,7 +79,7 @@ export default function App() {
   useEffect(() => {
     // 打包环境 刷新页面从 首页 开始
     if (!envFlag && myData.isLdong) {
-      // #/knowlege?l=look 从后台管理直接打开知识图谱
+      // #/knowlege?l=look 从后台管理直接打开展览图谱
       if (window.location.hash !== '#/' && window.location.hash !== '#/knowlege?l=look') {
         window.location.href = window.location.href.split('#')[0] + '#/'
       }

+ 2 - 2
src/components/MenuSider/data.ts

@@ -1,10 +1,10 @@
-// 获取当前路径路由,并且跳到知识图谱页面
+// 获取当前路径路由,并且跳到展览图谱页面
 export const toEchPageFu = () => {
   const nowPageLast = window.location.hash
   window.location.replace(`#/knowlege?back=${nowPageLast}`)
 }
 
-// 从知识图谱页面返回
+// 从展览图谱页面返回
 export const echPageBackFu = () => {
   const search = new URLSearchParams(window.location.hash.split('?')[1] || '')
   const tab = search.get('back')

+ 4 - 4
src/components/MenuSider/index.tsx

@@ -18,8 +18,8 @@ function MenuSider({ activeTab }: { activeTab: number }) {
       activeTab === 0
         ? '#/byzh?fromPath=yblm'
         : activeTab === 1
-          ? '#/byzh?fromPath=ybwx'
-          : '#/byzh?fromPath=wjwj'
+        ? '#/byzh?fromPath=ybwx'
+        : '#/byzh?fromPath=wjwj'
     )
   }
   return (
@@ -38,7 +38,7 @@ function MenuSider({ activeTab }: { activeTab: number }) {
         )}
         onClick={() => setIsShowMenu(false)}
       >
-        <div className='sider' onClick={(e) => e.stopPropagation()}>
+        <div className='sider' onClick={e => e.stopPropagation()}>
           <img
             onClick={() => setIsShowMenu(false)}
             src={require(`@/assets/img/menuSiderBtn.png`)}
@@ -97,7 +97,7 @@ function MenuSider({ activeTab }: { activeTab: number }) {
               <div className='knowledge'>
                 <img src={require('@/assets/img/icon_knowledge.png')} alt='' />
                 <div className='txt songFontc' onClick={() => toEchPageFu()}>
-                  {myLangue === 'EN' ? 'mapping knowledge domain' : '知识图谱'}
+                  {myLangue === 'EN' ? 'mapping knowledge domain' : '展览图谱'}
                 </div>
               </div>
               {/* <div className='poster'>

+ 11 - 1
src/pages/A0base/index.tsx

@@ -21,6 +21,16 @@ function A0base() {
 
   const [currentBase, setCurrentBase] = useState(0)
 
+  // 从二三单元返回
+  useEffect(() => {
+    const urlAll = window.location.href
+
+    if (urlAll.includes('?t=')) {
+      const urlT = urlAll.split('?t=')[1]
+      if (urlT) setCurrentBase(Number(urlT))
+    }
+  }, [])
+
   const [isOpenInteract, setIsOpenInteract] = useState(false)
 
   const goto = (e: React.MouseEvent, path: string) => {
@@ -93,7 +103,7 @@ function A0base() {
             {myLangue === 'EN' ? 'Stele Shadow Intelligence Mapping' : '碑影智绘'}
           </div>
           <div className='inter songFontc' onClick={() => toEchPageFu()}>
-            {myLangue === 'EN' ? 'mapping knowledge domain' : '知识图谱'}
+            {myLangue === 'EN' ? 'mapping knowledge domain' : '展览图谱'}
           </div>
           {/* <div
             className='inter'

+ 1 - 1
src/pages/A6ybwx/index.tsx

@@ -106,7 +106,7 @@ function A6ybwx() {
       <div
         className='back'
         onClick={() => {
-          window.location.replace('#/base')
+          window.location.replace('#/base?t=1')
         }}
       >
         <img src={require('@/assets/img/btn_back.png')} alt='' />

+ 1 - 1
src/pages/A7wjwj/index.tsx

@@ -21,7 +21,7 @@ function A7Wjwj() {
   const gotoBack = () => {
     const flag = tab2Ref.current?.sonGetStaFu()
     if (flag) tab2Ref.current?.sonSetStaFu()
-    else window.location.replace('#/base')
+    else window.location.replace('#/base?t=2')
   }
 
   // 监听unity是否被销毁了