Commit 60c8e301 authored by Facius's avatar Facius

fix: 【ID1001406】 【小程序-首页-专项练习】:隐藏掉试题未0的题型

parent b1d8a742
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<view class="selected-list-content"> <view class="selected-list-content">
<view class="label-content"> <view class="label-content">
<view <view
v-for="(item, index) in lables" v-for="(item, index) in showLabels"
:key="index" :key="index"
class="special-item" class="special-item"
hover-class="hover-class" hover-class="hover-class"
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<image :src="item.image" class="item-image"></image> <image :src="item.image" class="item-image"></image>
<view class="item-title">{{ item.title }}</view> <view class="item-title">{{ item.title }}</view>
<view <view
>共<text class="item-count">{{ info[item.key] }}</text >共<text class="item-count">{{ item.number }}</text
>道</view >道</view
> >
</view> </view>
...@@ -43,35 +43,39 @@ export default { ...@@ -43,35 +43,39 @@ export default {
}, },
computed: { computed: {
// 1.顺序答题 2.随机练习 3.模拟考试 4.收藏答题 5.错题答题 6.专项练习-单选 7.专项练习-多选 8.专项练习-判断 9.专项练习-答案是 // 1.顺序答题 2.随机练习 3.模拟考试 4.收藏答题 5.错题答题 6.专项练习-单选 7.专项练习-多选 8.专项练习-判断 9.专项练习-答案是
lables() { lables() {
return [ return [
{ {
key: 'oneAnswerCount', number: this.info['oneAnswerCount'],
title: '单选题', title: '单选题',
source: 6, source: 6,
image: process.uniEnv.qn_base_url + 'danxuan.png', image: process.uniEnv.qn_base_url + 'danxuan.png',
}, },
{ {
key: 'anyAnswerCount', number: this.info['anyAnswerCount'],
title: '多选题', title: '多选题',
source: 7, source: 7,
image: process.uniEnv.qn_base_url + 'duoxuan.png', image: process.uniEnv.qn_base_url + 'duoxuan.png',
}, },
{ {
key: 'trueOrFalseCount', number: this.info['trueOrFalseCount'],
title: '判断题', title: '判断题',
source: 8, source: 8,
image: process.uniEnv.qn_base_url + 'panduan.png', image: process.uniEnv.qn_base_url + 'panduan.png',
}, },
{ {
key: 'trueAnswerCount', number: this.info['trueAnswerCount'],
title: '判断题(结果为正确)', title: '判断题(结果为正确)',
source: 9, source: 9,
image: process.uniEnv.qn_base_url + 'zhengquepanduanti.png', image: process.uniEnv.qn_base_url + 'zhengquepanduanti.png',
}, },
] ]
}, },
showLabels() {
return this.lables.filter((item) => {
return item.number > 0
})
},
}, },
onLoad(e) { onLoad(e) {
this.getPageInfo() this.getPageInfo()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment