搜索页等
This commit is contained in:
@@ -99,8 +99,9 @@
|
||||
const click_list_item = (list_item) => {
|
||||
const examLenTm = 666;
|
||||
const papersName = item.value.examName;
|
||||
|
||||
common.navigateTo(
|
||||
`/pages/examination/result?execId=${list_item.execId}&examLenTm=${examLenTm}&papersName=${papersName}`
|
||||
`/pages/examination/result?execId=${list_item.execId}&examLenTm=${examLenTm}&papersName=${papersName}&mode=record`
|
||||
);
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</view>
|
||||
<view class="prompt_div">
|
||||
<view class="prompt_div_left">
|
||||
<view class="top">{{ formatSeconds(item.stdyTm) || '' }}</view>
|
||||
<view class="top">{{ secondsToHours(item.stdyTm) }}h</view>
|
||||
<view class="bottom">学习时长</view>
|
||||
</view>
|
||||
<view class="prompt_div_line"></view>
|
||||
@@ -58,7 +58,6 @@
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, reactive } from 'vue';
|
||||
import { formatSeconds } from '@/common/common';
|
||||
import common from '@/common/common';
|
||||
import { queryStdyBatchByCrsId } from '@/api/courseRecord.js';
|
||||
const status = ref('loadmore'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
@@ -81,7 +80,14 @@
|
||||
return data_list.length * 136 + 'rpx';
|
||||
}
|
||||
});
|
||||
|
||||
const secondsToHours = (seconds) => {
|
||||
console.log('typeof seconds', typeof seconds);
|
||||
if (typeof seconds === 'number') {
|
||||
// 转换为小时并保留一位小数
|
||||
return (seconds / 3600).toFixed(1);
|
||||
}
|
||||
return '0.0';
|
||||
};
|
||||
// 点击获取详情
|
||||
const show_list_click = () => {
|
||||
show_list_state.value = !show_list_state.value;
|
||||
@@ -99,11 +105,10 @@
|
||||
// 跳转到详情
|
||||
const click_list_item = (list_item) => {
|
||||
common.navigateTo(
|
||||
`/pages/courseRecord/courseStudyRecordDetail?stdyId=${list_item.stdyBatch}&crsName=${item.value.crsName}`
|
||||
`/pages/courseRecord/courseStudyRecordDetail?stdyId=${list_item.stdyBatch}&crsName=${item.value.crsName || ''}`
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// 计算两个标准时间的时间差值
|
||||
const formatDuration = (startTm, endTm) => {
|
||||
// 解析时间字符串为时间戳(毫秒)
|
||||
|
||||
@@ -104,7 +104,6 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
padding-top: var(--status-bar-height);
|
||||
.top-bg {
|
||||
background: linear-gradient(16deg, rgba(234, 246, 255, 0) 0%, #e6eafd 100%);
|
||||
height: 480rpx;
|
||||
@@ -128,7 +127,8 @@
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: v-bind(pageTopPadding);
|
||||
|
||||
padding-top: var(--status-bar-height);
|
||||
|
||||
.body-title {
|
||||
height: 90rpx;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
import common from '@/common/common.js';
|
||||
const listItemRefs = ref([]);
|
||||
const taskRef = ref(null);
|
||||
const tabAct = ref(1);
|
||||
const tabAct = ref(0);
|
||||
const tabList = ref([
|
||||
{
|
||||
name: '学习记录'
|
||||
|
||||
Reference in New Issue
Block a user