diff --git a/src/components/Floors/Floors.js b/src/components/Floors/Floors.js index b154849..5335fe6 100644 --- a/src/components/Floors/Floors.js +++ b/src/components/Floors/Floors.js @@ -59,7 +59,7 @@ const Floors = ({ ) : (
-
+
{floors[sceneIndex][1]}
); diff --git a/src/components/NavBottom/NavBottom.js b/src/components/NavBottom/NavBottom.js index 163e927..002955d 100644 --- a/src/components/NavBottom/NavBottom.js +++ b/src/components/NavBottom/NavBottom.js @@ -1,20 +1,10 @@ -import React, { useState, useEffect } from "react"; +import React from "react"; import "./NavBottom.scss"; -import followDirection from "./followDirection.png"; -import notFollowDirection from "./notFollowDirection.png"; -import play from "./play.png"; -import pause from "./pause.png"; import closeButton from "./close.png"; import left from "./left.png"; import right from "./right.png"; import straight from "./straight.png"; import back from "./back.png"; -import bubble from "./bubble.png"; -import arpng from "./ar.png"; -import nav from "./nav.png"; -import navActive from "./nav_active.png"; -import des from "./des.png"; -import desActive from "./des_active.png"; const getImgByRouteSearchText = (txt) => txt.includes("左前") @@ -81,7 +71,9 @@ const NavBottom = ({
- {end.logoPath && } + {end.logoPath && ( + 图标 + )} 关闭 { const baseHeight = long ? window.innerHeight : 312; useEffect(() => { setdoTransition(true); - setHeight(baseHeight); + setHeight(long ? window.innerHeight : 312); setTimeout(() => { setdoTransition(false); }, 500); diff --git a/src/components/Shop/Shop.js b/src/components/Shop/Shop.js index 072f1ca..a82463e 100644 --- a/src/components/Shop/Shop.js +++ b/src/components/Shop/Shop.js @@ -31,7 +31,7 @@ const Shop = ({ onClickActive(); }} > - +
{name}
)} diff --git a/src/components/ShopList/ShopList.js b/src/components/ShopList/ShopList.js index 564cd99..28180b5 100644 --- a/src/components/ShopList/ShopList.js +++ b/src/components/ShopList/ShopList.js @@ -1,4 +1,4 @@ -import React, { useState, useRef, useEffect } from "react"; +import React, { useState, useRef } from "react"; import Shop from "../Shop/Shop"; import "./ShopList.scss"; import InfiniteScroll from "react-infinite-scroller"; diff --git a/src/js/helpers/data-helper.js b/src/js/helpers/data-helper.js index 47b456a..b161fa3 100644 --- a/src/js/helpers/data-helper.js +++ b/src/js/helpers/data-helper.js @@ -179,7 +179,7 @@ const getMallInfo = async () => { floors: mall.floors.reduce((acc, { name, floorOrder, url }) => { acc[floorOrder] = [url, name]; return acc; - }, new Array()), + }, []), theme, }); const mallInfo = { mall, shopInfo, images }; diff --git a/src/pages/Index/Index.js b/src/pages/Index/Index.js index dc6e85b..6f82d31 100644 --- a/src/pages/Index/Index.js +++ b/src/pages/Index/Index.js @@ -340,17 +340,19 @@ const Index = () => { useEffect(() => { if (focusTextClicked) { - if (shop) { - setEnd(shop); - map.startNavigate({ - start, - end: shop, - }); - } + if (shop) handleEndSet(shop); setFocusTextClicked(false); } }, [focusTextClicked]); + const handleEndSet = (end) => { + setEnd(end); + map.startNavigate({ + start, + end, + }); + }; + return (
@@ -438,13 +440,7 @@ const Index = () => { > ) } - onClickActive={(end) => { - setEnd(end); - map.startNavigate({ - start, - end, - }); - }} + onClickActive={handleEndSet} > )} {showNav && ( diff --git a/src/pages/Shops/Shops.js b/src/pages/Shops/Shops.js index 191abab..ae95369 100644 --- a/src/pages/Shops/Shops.js +++ b/src/pages/Shops/Shops.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from "react"; +import React, { useState } from "react"; import Modal from "react-modal"; import "./Shops.scss"; import ShopList from "../../components/ShopList/ShopList.js"; @@ -17,7 +17,7 @@ const Shops = ({ mall, isOpen, onRequestClose, onClick, onClose }) => { onRequestClose={() => onRequestClose()} >
- onClose()} /> + 返回 onClose()} />