mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-06-09 04:16:19 +08:00
commit
f1985d0b8f
@ -298,27 +298,17 @@ const IndexPage = () => {
|
|||||||
{studyTimeFormat(stats.today_learn_duration)[0] ||
|
{studyTimeFormat(stats.today_learn_duration)[0] ||
|
||||||
0}{" "}
|
0}{" "}
|
||||||
</strong>
|
</strong>
|
||||||
天
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{studyTimeFormat(stats.today_learn_duration)[1] !== 0 && (
|
|
||||||
<>
|
|
||||||
<strong>
|
|
||||||
{" "}
|
|
||||||
{studyTimeFormat(stats.today_learn_duration)[1] ||
|
|
||||||
0}{" "}
|
|
||||||
</strong>
|
|
||||||
小时
|
小时
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<strong>
|
<strong>
|
||||||
{" "}
|
{" "}
|
||||||
{studyTimeFormat(stats.today_learn_duration)[2] || 0}{" "}
|
{studyTimeFormat(stats.today_learn_duration)[1] || 0}{" "}
|
||||||
</strong>
|
</strong>
|
||||||
分钟
|
分钟
|
||||||
<strong>
|
<strong>
|
||||||
{" "}
|
{" "}
|
||||||
{studyTimeFormat(stats.today_learn_duration)[3] || 0}{" "}
|
{studyTimeFormat(stats.today_learn_duration)[2] || 0}{" "}
|
||||||
</strong>
|
</strong>
|
||||||
秒
|
秒
|
||||||
</div>
|
</div>
|
||||||
@ -331,27 +321,17 @@ const IndexPage = () => {
|
|||||||
{studyTimeFormat(stats.learn_duration || 0)[0] ||
|
{studyTimeFormat(stats.learn_duration || 0)[0] ||
|
||||||
0}{" "}
|
0}{" "}
|
||||||
</strong>
|
</strong>
|
||||||
天
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{studyTimeFormat(stats.learn_duration || 0)[1] !== 0 && (
|
|
||||||
<>
|
|
||||||
<strong>
|
|
||||||
{" "}
|
|
||||||
{studyTimeFormat(stats.learn_duration || 0)[1] ||
|
|
||||||
0}{" "}
|
|
||||||
</strong>
|
|
||||||
小时
|
小时
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<strong>
|
<strong>
|
||||||
{" "}
|
{" "}
|
||||||
{studyTimeFormat(stats.learn_duration || 0)[2] || 0}{" "}
|
{studyTimeFormat(stats.learn_duration || 0)[1] || 0}{" "}
|
||||||
</strong>
|
</strong>
|
||||||
分钟
|
分钟
|
||||||
<strong>
|
<strong>
|
||||||
{" "}
|
{" "}
|
||||||
{studyTimeFormat(stats.learn_duration || 0)[3] || 0}{" "}
|
{studyTimeFormat(stats.learn_duration || 0)[2] || 0}{" "}
|
||||||
</strong>
|
</strong>
|
||||||
秒
|
秒
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,7 +28,6 @@ export function durationFormat(dateStr: number) {
|
|||||||
export function studyTimeFormat(dateStr: number) {
|
export function studyTimeFormat(dateStr: number) {
|
||||||
var d = moment.duration(dateStr / 1000, "seconds");
|
var d = moment.duration(dateStr / 1000, "seconds");
|
||||||
let value = [];
|
let value = [];
|
||||||
value.push(Math.floor(d.asDays()));
|
|
||||||
value.push(d.hours());
|
value.push(d.hours());
|
||||||
value.push(d.minutes());
|
value.push(d.minutes());
|
||||||
value.push(d.seconds());
|
value.push(d.seconds());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user