From 9409cd90cffe99486545f5103729db8d9a9f8bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 18 Mar 2020 01:15:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/Videostatisticscomtwo.js | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js index 004425c63..4bb725cec 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js @@ -156,9 +156,13 @@ class Videostatisticscomtwo extends Component { ` } - {moment(record.start_at).format('YYYY-MM-DD HH:mm:ss')} + { + record.start_at? + {moment(record.start_at).format('YYYY-MM-DD HH:mm:ss')} + : + -- + } ), }, @@ -184,9 +188,16 @@ class Videostatisticscomtwo extends Component { ` } - {moment(record.end_at).format('YYYY-MM-DD HH:mm:ss')} + { + record.end_at? + {moment(record.end_at).format('YYYY-MM-DD HH:mm:ss')} + : + -- + + } + ), } @@ -275,8 +286,8 @@ class Videostatisticscomtwo extends Component { is_finished: response.data.data[i].is_finished, total_duration: response.data.data[i].total_duration?formatSeconds(response.data.data[i].total_duration):0, feq: response.data.data[i].feq, - start_at: response.data.data[i].start_at, - end_at: response.data.data[i].end_at, + start_at: response.data.data[i].start_at?response.data.data[i].start_at:null, + end_at: response.data.data[i].end_at?response.data.data[i].end_at:null, title: response.data.data[i].title, }) }