张延森 před 4 roky
rodič
revize
aaeaf47f06
1 změnil soubory, kde provedl 5 přidání a 3 odebrání
  1. 5
    3
      src/pages/ShouYe/index.jsx

+ 5
- 3
src/pages/ShouYe/index.jsx Zobrazit soubor

@@ -31,9 +31,11 @@ export default function Index (props) {
31 31
   const [NewsList, setNewsList] = useState([])
32 32
 
33 33
   useEffect(() => {
34
-    console.log(user, `user`)
35
-    OnRefresh()
36
-  }, [])
34
+    if (user) {
35
+      console.log(user, `user`)
36
+      OnRefresh()
37
+    }
38
+  }, [user])
37 39
 
38 40
   const Init = (done = () => { }) => { // 初始化
39 41
     let DownCount = 0