Commit 79488961 authored by Damon's avatar Damon

feat: 缺题记录 && 收藏记录缺省页

parent aa911f30
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
title="答题" title="答题"
title-bold title-bold
></u-navbar> ></u-navbar>
<view class="u-flex contents" v-if="list.length > 0 && ![4, 5].includes(type)">
<view class="head" v-if="type !== 3"> <view class="head" v-if="type !== 3">
<view class="u-flex tab" v-if="type === 1"> <view class="u-flex tab" v-if="type === 1">
<view :class="['tab-list', {'active': model === 1}]" @click="changeModel(1)">答题模式</view> <view :class="['tab-list', {'active': model === 1}]" @click="changeModel(1)">答题模式</view>
...@@ -49,6 +50,16 @@ ...@@ -49,6 +50,16 @@
</view> </view>
</view> </view>
</view> </view>
</view>
<view class="u-flex default" v-if="list.length === 0 && [4, 5].includes(type)">
<view>
<image :src="defaultImg" />
</view>
<view class="no-result">
{{ type === 4 ? '当前暂无错题记录' : '当前暂无收藏题目' }}
</view>
</view>
<answer-operation-tips :show.sync="show" /> <answer-operation-tips :show.sync="show" />
<answer-complete-pop <answer-complete-pop
...@@ -92,7 +103,17 @@ export default { ...@@ -92,7 +103,17 @@ export default {
result: [1, 2, 3] result: [1, 2, 3]
} }
}, },
computed: {}, computed: {
defaultImg() {
let name = ''
if (this.type === 4) {
name = 'no-error.png'
} else if (this.type === 5) {
name = 'no-collect.png'
}
return process.uniEnv.qn_base_url + name
},
},
created() { created() {
const lists = [ const lists = [
{ {
...@@ -259,6 +280,10 @@ export default { ...@@ -259,6 +280,10 @@ export default {
background-image: linear-gradient(to top, #f8fafd 0%, #e9f3ff 50%); background-image: linear-gradient(to top, #f8fafd 0%, #e9f3ff 50%);
background-size: 100% 520rpx; background-size: 100% 520rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
.contents {
width: 100%;
flex: 1;
flex-direction: column;
.head { .head {
width: 100%; width: 100%;
height: 90rpx; height: 90rpx;
...@@ -302,5 +327,16 @@ export default { ...@@ -302,5 +327,16 @@ export default {
} }
} }
} }
}
.default {
flex-flow: column;
flex: 1;
justify-content: center;
.no-result {
color: #9EA5BB;
font-size: 28rpx;
}
}
} }
</style> </style>
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