This commit is contained in:
杨航
2025-09-02 18:40:13 +08:00
parent e71ab74127
commit bc8a042217
2 changed files with 38 additions and 29 deletions
+5 -4
View File
@@ -514,12 +514,13 @@ import { onShow } from "@dcloudio/uni-app"
}
.model-filter-list{
position: fixed;
width: 100vw;
height: 100vh;
width: calc(100vw - 33rpx);
height: 80vh;
overflow: hidden;
top: 0;
left: 0;
top: 500rpx;
left: 17rpx;
z-index: 1;
background-color: rgba(0,0,0,.2);
}
.filter-list,
.model-filter-list{
+33 -25
View File
@@ -72,6 +72,9 @@
<view class="view-list">
<TaskItem :item="item" v-for="(item, index) in taskList"></TaskItem>
</view>
<view class="view-tips" v-if="activeTab === 'task'">
{{ hasMore ? '滚动加载更多' : '加载完成' }}
</view>
<view class="view-result" v-show="taskList.length === 0">暂无数据</view>
</view>
<view class="test-view model-view" v-show="showModelList('test')">
@@ -90,6 +93,9 @@
<view class="view-list">
<ExamItem class="exam-list" :item="item" v-for="item in examList"></ExamItem>
</view>
<view class="view-tips" v-if="activeTab === 'exam'">
{{ hasMore ? '滚动加载更多' : '加载完成' }}
</view>
<view class="view-result" v-show="examList.length === 0">暂无数据</view>
</view>
</scroll-view>
@@ -154,7 +160,7 @@ const tabList = ref([
])
const abilityListShow = computed(() => {
if (searchValue.value) {
let _arr = abilityList.value.filter(t => t.title.includes(searchValue.value))
let _arr = abilityList.value.filter(t => t.title.includes(searchValue.value.toUpperCase()))
let _sum = 4 - (_arr.length % 4)
if (_sum !== 4) {
for (let i = 0; i < _sum; i++) {
@@ -287,39 +293,41 @@ const getData = (flag = null) => {
}
let _isCourse = fromType.value === 'course' || activeTab.value==='course'
appSearchCrsApi({
type: _isCourse ? '01' : '00', //00 首页搜索 01课程搜索
type: _isCourse ? '01'
: activeTab.value==='exam' ? '02'
: activeTab.value==='task' ? '03'
: '00', //00 首页搜索 01课程搜索 '02' 考试搜索 '03' 任务搜索
searchName: searchValue.value,
page: pageInfo.value.page,
limit: pageInfo.value.limit
}).then(res => {
courseList.value = courseList.value.concat(res.body.traCrsInfoVoList || [])
if (fromType.value !== 'course') {
examList.value = examList.value.concat(res.body.traExamPapersExtVoList || [])
taskList.value = taskList.value.concat(res.body.traTaskInfoExtVoList || [])
}
switch (activeTab.value) {
case 'all':
break
case 'ability':
break
case 'course':
pageInfo.value.total = res.total || 0
break
case 'task':
pageInfo.value.total = res.total || 0
break
case 'test':
pageInfo.value.total = res.total || 0
break
case 'exam':
pageInfo.value.total = res.total || 0
break
default:
pageInfo.value.total = res.total || 0
break
}
pageInfo.value.total = res.total || 0
// switch (activeTab.value) {
// case 'all':
// break
// case 'ability':
// break
// case 'course':
// pageInfo.value.total = res.total || 0
// break
// case 'task':
// pageInfo.value.total = res.total || 0
// break
// case 'test':
// pageInfo.value.total = res.total || 0
// break
// case 'exam':
// pageInfo.value.total = res.total || 0
// break
// default:
// pageInfo.value.total = res.total || 0
// break
// }
})
}
const hasMore = computed(() => {