mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-07-26 09:09:46 +08:00
Compare commits
No commits in common. "f1985d0b8f11c9652f95a7b80edad4e02bfe6905" and "66fd8486db9ce73000b04a1fc0dd3c63b152b934" have entirely different histories.
f1985d0b8f
...
66fd8486db
@ -298,17 +298,27 @@ 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)[1] || 0}{" "}
|
{studyTimeFormat(stats.today_learn_duration)[2] || 0}{" "}
|
||||||
</strong>
|
</strong>
|
||||||
分钟
|
分钟
|
||||||
<strong>
|
<strong>
|
||||||
{" "}
|
{" "}
|
||||||
{studyTimeFormat(stats.today_learn_duration)[2] || 0}{" "}
|
{studyTimeFormat(stats.today_learn_duration)[3] || 0}{" "}
|
||||||
</strong>
|
</strong>
|
||||||
秒
|
秒
|
||||||
</div>
|
</div>
|
||||||
@ -321,17 +331,27 @@ 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)[1] || 0}{" "}
|
{studyTimeFormat(stats.learn_duration || 0)[2] || 0}{" "}
|
||||||
</strong>
|
</strong>
|
||||||
分钟
|
分钟
|
||||||
<strong>
|
<strong>
|
||||||
{" "}
|
{" "}
|
||||||
{studyTimeFormat(stats.learn_duration || 0)[2] || 0}{" "}
|
{studyTimeFormat(stats.learn_duration || 0)[3] || 0}{" "}
|
||||||
</strong>
|
</strong>
|
||||||
秒
|
秒
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,6 +28,7 @@ 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