From bd09ddbe5eae5e780393d37b72b4da6d4e92fdb8 Mon Sep 17 00:00:00 2001 From: LiuWenHaoU <964324856@qq.com> Date: Mon, 18 May 2020 00:15:17 +0800 Subject: [PATCH] 部分修改及新增功能 --- 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