将学习时长的结果转换成小时显示。

This commit is contained in:
weinan2087
2022-10-18 17:47:41 +08:00
parent 8a4acbba2e
commit 442d41f366

View File

@@ -125,7 +125,7 @@
我的排名 : <span> {{learningDurationTotalData.rankNo}}</span>
</div>
<div class="myexperience">
我的学习时长: <span> {{learningDurationTotalData.rankValue}}</span> h
我的学习时长: <span> {{formatSecondToHour(learningDurationTotalData.rankValue)}}</span> h
</div>
</div>
<div class="exp-table" style="margin-top:20px;height:600px;overflow-y:auto">
@@ -151,10 +151,10 @@
</div>
</div>
<div class="jy tab-jy">
<div v-if="learningDuration.field == 'total'" style="font-size: 18px;color: #333333;font-weight: 600;">{{lan.total}}</div>
<div v-if="learningDuration.field == 'months'" style="font-size: 18px;color: #333333;font-weight: 600;">{{lan.months}}</div>
<div v-if="learningDuration.field == 'years'" style="font-size: 18px;color: #333333;font-weight: 600;">{{lan.years}}</div>
<div v-if="learningDuration.field == 'weeks'" style="font-size: 18px;color: #333333;font-weight: 600;">{{lan.weeks}}</div>
<div v-if="learningDuration.field == 'total'" style="font-size: 18px;color: #333333;font-weight: 600;">{{formatSecondToHour(lan.total)}}</div>
<div v-if="learningDuration.field == 'months'" style="font-size: 18px;color: #333333;font-weight: 600;">{{formatSecondToHour(lan.months)}}</div>
<div v-if="learningDuration.field == 'years'" style="font-size: 18px;color: #333333;font-weight: 600;">{{formatSecondToHour(lan.years)}}</div>
<div v-if="learningDuration.field == 'weeks'" style="font-size: 18px;color: #333333;font-weight: 600;">{{formatSecondToHour(lan.weeks)}}</div>
</div>
</div>
</div>
@@ -275,7 +275,7 @@
import apiStat from '@/api/phase2/stat.js';
import { mapGetters } from 'vuex';
import authorImg from '@/components/Portal/authorImg.vue';
import {translate,experienceValue} from "@/utils/tools.js";
import {translate,experienceValue,formatSecondToHour} from "@/utils/tools.js";
export default {
computed: {
...mapGetters(['userInfo']),
@@ -292,6 +292,7 @@ export default {
endValue:0 // 累计经验值进度条最大值
},
translate,
formatSecondToHour:formatSecondToHour,
experience:{
field:'total',
name:'累计',