|  |  | 
 |  |  |     const { styles } = useStyles(); | 
 |  |  |     const refContainer = useRef(); | 
 |  |  |  | 
 |  |  |     const { data, curLocNo, setCurLocNo } = props; | 
 |  |  |     const { data, curFloor, curLocNo, setCurLocNo } = props; | 
 |  |  |     const [loading, setLoading] = React.useState(false); | 
 |  |  |  | 
 |  |  |     useEffect(() => { | 
 |  |  |         const originLocNo = data.no + '-' + curFloor; | 
 |  |  |  | 
 |  |  |         endThree(); | 
 |  |  |         setLoading(true); | 
 |  |  |  | 
 |  |  |         const fetchShelfInfo = async (locNo) => { | 
 |  |  |             console.log("api-" + locNo); | 
 |  |  |             const res = await Http.doGet('/api/map/shelf/info', { locNo: locNo }); | 
 |  |  |             if (res?.data && shelfThree) { | 
 |  |  |                 shelfThree.generateMesh((addObject) => { | 
 |  |  | 
 |  |  |  | 
 |  |  |         setTimeout(() => { | 
 |  |  |             startThree(refContainer.current); | 
 |  |  |             shelfThree.handleClick = (locNo) => { | 
 |  |  |                 setCurLocNo(locNo); | 
 |  |  |             shelfThree.handleClick = (objName) => { | 
 |  |  |                 setCurLocNo(objName); | 
 |  |  |             } | 
 |  |  |             fetchShelfInfo(curLocNo);   // curLoc更新不及时 | 
 |  |  |             fetchShelfInfo(originLocNo);   // curLoc更新不及时 | 
 |  |  |             setLoading(false); | 
 |  |  |         }, 300) | 
 |  |  |  |