Browse Source

修复一波跳首页的问题

shaogen1995 9 months ago
parent
commit
e2884dfedd
2 changed files with 22 additions and 10 deletions
  1. 6 3
      README.md
  2. 16 7
      src/pages/A1home/index.tsx

+ 6 - 3
README.md

@@ -1,5 +1,4 @@
-暂时使用官网数据,后续一起部署到甲方服务器
-修改 isMyEnv 变量即可
+修改 isMyEnv 变量(使用自己官网数据/甲方服务器数据-需要自己整合符合格式的数据部署到甲方服务器)
 
 1.甲方服务器 使用 VPN:Hillstone Secure Connect 这个软件
 
@@ -10,12 +9,16 @@ VPN 服务器地址:183.56.239.251 端口 14433
 2.堡垒机:
 服务器地址:10.10.0.250
 账号密码:root/6!aM8SS9
+默认端口:22
 路径:var/www/html
 
-3.域名
+3.甲方服务器对外地址
 https://airshow.4dkankan.com/show.html
 
 (
 react 的打包和运行修改入口文件比较麻烦。
 直接在 pubilc 里面新建了一个 show.html,重定向到 index.html。
 )
+
+4.第 15 届航展之前的地址:
+https://airshow.4dkankan.com/2024bak/show.html

+ 16 - 7
src/pages/A1home/index.tsx

@@ -12,7 +12,7 @@ import bgmMp3 from '@/assets/img/bgm.mp3'
 import Share from './Share'
 import Bottom from './Bottom'
 import { MyObjRowType } from './Bottom/data'
-import { isMobileFu, urlParameter } from '@/utils/history'
+import history, { isMobileFu, urlParameter } from '@/utils/history'
 
 import xiaImg from '@/assets/img/jiantou_w.png'
 import { kankanUrl, panoBaseUrl } from '@/utils/urlRes'
@@ -120,10 +120,16 @@ function A1home() {
           </li>
           <li
             onClick={() => {
-              window.location.href = 'https://airshow.4dkankan.com/index.html'
-              setTimeout(() => {
-                window.location.reload()
-              }, 200)
+              history.replace('/')
+              setAcObj({} as MyObjRowType)
+              clickBtn('首页')
+              // setTimeout(() => {
+              //   clickBtn(pageKey === '室内' ? '室外' : '室内')
+              // }, 200)
+              // window.location.href = 'https://airshow.4dkankan.com/index.html'
+              // setTimeout(() => {
+              //   window.location.reload()
+              // }, 200)
             }}
           >
             <div className='toHome'>
@@ -135,11 +141,14 @@ function A1home() {
       {/* 分享页面 */}
       <Share isShowType={sonPageShow} closeFu={() => setSonPageShow('')} />
       {/* 底部页面 */}
-      <Bottom setTopObj={setAcObjFu} pageKey={pageKey} />
+      {pageKey !== '首页' ? <Bottom setTopObj={setAcObjFu} pageKey={pageKey} /> : null}
+
       {/* 顶部title */}
       {acObj.sceneCode ? (
         <>
-          <div className='A1title'>{acObj.sceneTitle}</div>
+          <div className='A1title'>
+            {acObj.sceneTitle}({pageKey === '室内' ? '展馆' : '展区'})
+          </div>
 
           <div className='iframeBox'>
             {/* 四维看看*/}