From 9c7c21e8eacda173feb418bdfe739f7f97358233 Mon Sep 17 00:00:00 2001
From: liuwh <hugeinfo123>
Date: Sun, 29 Mar 2020 17:28:46 +0800
Subject: [PATCH] bug修复

---
 SunshineIns/src/page/SignIn.jsx |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/SunshineIns/src/page/SignIn.jsx b/SunshineIns/src/page/SignIn.jsx
index b1c8084..e865382 100644
--- a/SunshineIns/src/page/SignIn.jsx
+++ b/SunshineIns/src/page/SignIn.jsx
@@ -30,15 +30,18 @@
     }
 
     componentDidMount() {
-
         document.title = '签到上墙';
-        this.getData();
+        setInterval(() => this.getData(), 5000)
+    }
+
+    componentWillMount() {
+        this.getData()
     }
 
     getData = () => {
         // signinfo
         const { id } = this.props.match.params;
-        this.setState({ loading: true })
+        // this.setState({ loading: true })
         Fetch.signinfo(id)
             .then(res => {
                 console.log(res)
@@ -46,7 +49,7 @@
                     code: res.data.code,
                     personList: res.data.personList,
                     activityName: res.data.activityName,
-                    loading: false,
+                    // loading: false,
                 });
             })
     }
@@ -90,7 +93,7 @@
                                         </div>
                                         {
                                             item.signStatus == 3 ?
-                                                <div style={{ padding: '0 12px',width:'168px' }}>
+                                                <div style={{ padding: '0 12px', width: '168px' }}>
                                                     <div>签到人:{item.proposerName}</div>
                                                     <div>签到时间:{moment(item.updateTime).format(format)}</div>
                                                 </div> : ''

--
Gitblit v1.8.0