Commit 79488961 authored by Damon's avatar Damon

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

parent aa911f30
...@@ -8,48 +8,59 @@ ...@@ -8,48 +8,59 @@
title="答题" title="答题"
title-bold title-bold
></u-navbar> ></u-navbar>
<view class="head" v-if="type !== 3"> <view class="u-flex contents" v-if="list.length > 0 && ![4, 5].includes(type)">
<view class="u-flex tab" v-if="type === 1"> <view class="head" v-if="type !== 3">
<view :class="['tab-list', {'active': model === 1}]" @click="changeModel(1)">答题模式</view> <view class="u-flex tab" v-if="type === 1">
<view :class="['tab-list', {'active': model === 2}]" @click="changeModel(2)">学习模式</view> <view :class="['tab-list', {'active': model === 1}]" @click="changeModel(1)">答题模式</view>
</view> <view :class="['tab-list', {'active': model === 2}]" @click="changeModel(2)">学习模式</view>
<view class="u-flex count-down" v-if="type === 2"> </view>
<view>倒计时:<u-count-down :timestamp="timestamp" bg-color="" :show-hours="false"></u-count-down></view> <view class="u-flex count-down" v-if="type === 2">
</view> <view>倒计时:<u-count-down :timestamp="timestamp" bg-color="" :show-hours="false"></u-count-down></view>
</view>
<view class="swiper">
<swiper-limited-load
ref="swiper"
:swiperHeight="500"
:swiperDuration="swiperDuration"
:list="list"
:current="current"
:type="type"
:model="model"
@answerChange="answerChange"
@change="swiperChange"
>
</swiper-limited-load>
</view>
<view class="u-flex u-row-around bottom">
<view class="u-flex">
<view class="c-list">
<u-icon name="grid" color="#5A6073" size="40"></u-icon>
<text>1/2887</text>
</view> </view>
</view> </view>
<view class="u-flex"> <view class="swiper">
<view class="c-list" v-if="type === 1 || type === 3" @click="collection"> <swiper-limited-load
<u-icon name="star" color="#5A6073" size="40"></u-icon> ref="swiper"
<text>收藏</text> :swiperHeight="500"
:swiperDuration="swiperDuration"
:list="list"
:current="current"
:type="type"
:model="model"
@answerChange="answerChange"
@change="swiperChange"
>
</swiper-limited-load>
</view>
<view class="u-flex u-row-around bottom">
<view class="u-flex">
<view class="c-list">
<u-icon name="grid" color="#5A6073" size="40"></u-icon>
<text>1/2887</text>
</view>
</view> </view>
<view class="c-list" v-if="type === 2" @click="handPapers"> <view class="u-flex">
<u-icon name="file-text" color="#5A6073" size="40"></u-icon> <view class="c-list" v-if="type === 1 || type === 3" @click="collection">
<text>交卷</text> <u-icon name="star" color="#5A6073" size="40"></u-icon>
<text>收藏</text>
</view>
<view class="c-list" v-if="type === 2" @click="handPapers">
<u-icon name="file-text" color="#5A6073" size="40"></u-icon>
<text>交卷</text>
</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
:numberList="result" :numberList="result"
...@@ -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,48 +280,63 @@ export default { ...@@ -259,48 +280,63 @@ 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;
.head { .contents {
width: 100%; width: 100%;
height: 90rpx; flex: 1;
.tab { flex-direction: column;
margin:10rpx auto; .head {
border: 2rpx solid #2953FF; width: 100%;
border-radius: 10rpx; height: 90rpx;
width: 300rpx; .tab {
.tab-list { margin:10rpx auto;
flex: 1; border: 2rpx solid #2953FF;
padding: 10rpx 25rpx; border-radius: 10rpx;
font-size: 24rpx; width: 300rpx;
color: #191C27; .tab-list {
flex: 1;
padding: 10rpx 25rpx;
font-size: 24rpx;
color: #191C27;
}
.active {
background: #2953FF;
color: #fff;
}
} }
.active { .count-down {
background: #2953FF; color: #5A6073;
color: #fff; font-size: 32rpx;
margin:10rpx auto;
width: 230rpx;
} }
} }
.count-down { .swiper {
color: #5A6073; width: 100%;
font-size: 32rpx; flex: 1;
margin:10rpx auto;
width: 230rpx;
} }
} .bottom {
.swiper { width: 100%;
width: 100%; height: 150rpx;
flex: 1; border-top: 2rpx solid #ccc;
} color: #5a6073;
.bottom { font-size: 28rpx;
width: 100%; .c-list {
height: 150rpx; display: flex;
border-top: 2rpx solid #ccc; text {
color: #5a6073; padding-left: 10rpx;
font-size: 28rpx; }
.c-list {
display: flex;
text {
padding-left: 10rpx;
} }
} }
} }
.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