|
|
@ -39,7 +39,7 @@ |
|
|
|
</scroll-view> |
|
|
|
</scroll-view> |
|
|
|
</swiper-item> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
|
</swiper> |
|
|
|
<view class="wp100 flex jc-sb ai-c p14 bc-fff" style="position: fixed;bottom: 0;left: 0;"> |
|
|
|
<view class="wp100 flex jc-sb ai-c p14 bc-fff" v-if="isShowAll" style="position: fixed;bottom: 0;left: 0;"> |
|
|
|
<view style="width: 220rpx;"> |
|
|
|
<view style="width: 220rpx;"> |
|
|
|
<button v-if="type==='practice'" class="btn">四步学科一</button> |
|
|
|
<button v-if="type==='practice'" class="btn">四步学科一</button> |
|
|
|
<view v-else class="btn" style="text-align: center;" @tap="submitPaper"> |
|
|
|
<view v-else class="btn" style="text-align: center;" @tap="submitPaper"> |
|
|
@ -65,6 +65,9 @@ |
|
|
|
<text class="cor-666">题板</text> |
|
|
|
<text class="cor-666">题板</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view v-else class="wp100 p14" style="position: fixed;bottom: 30rpx;left: 0;"> |
|
|
|
|
|
|
|
<button class="vip_btn" @click="toVip">立即查看全部题目</button> |
|
|
|
|
|
|
|
</view> |
|
|
|
<u-modal :show="tipShow"> |
|
|
|
<u-modal :show="tipShow"> |
|
|
|
<view class="relative wp100"> |
|
|
|
<view class="relative wp100"> |
|
|
|
<view class="text-center"> |
|
|
|
<view class="text-center"> |
|
|
@ -149,10 +152,41 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</u-popup> |
|
|
|
</u-popup> |
|
|
|
</view> |
|
|
|
<u-popup :show="showVip" mode="bottom" :closeOnClickOverlay="true" :round="16" @close="showVip=false"> |
|
|
|
|
|
|
|
<view class="p14" style="z-index: 9;"> |
|
|
|
|
|
|
|
<view class="wp100 flex ai-c jc-sb"> |
|
|
|
|
|
|
|
<text class="fs30 fw600 cor-000">VIP题库</text> |
|
|
|
|
|
|
|
<u-icon name="close" color="#c2c2c2" size="20" @tap="showVip=false"></u-icon> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<text class="fs16 cor-666">精准刷题,更高效</text> |
|
|
|
|
|
|
|
<view style="width:100%;height: 110rpx;background-image: url(../../static/image/practice/vip_question.png);background-size: 100% 100%;" class="mt15 relative"> |
|
|
|
|
|
|
|
<view style="position: absolute;left:0,top:0;height: 110rpx;" class="wp100 flex jc-c ai-c"> |
|
|
|
|
|
|
|
<text class="fs16" style="color: #994800;">科一+科四精简500题</text> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<image style="width: 65rpx;height: 65rpx; position: absolute;right: 20px;top: -5px;" src="../../static/image/practice/vip_include.png"></image> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view style="width:100%;height: 110rpx;background-image: url(../../static/image/practice/vip_test.png);background-size: 100% 100%;z-index: 9;" class="mt15 relative"> |
|
|
|
|
|
|
|
<view style="position: absolute;left:0,top:0;height: 110rpx;" class="wp100 flex jc-c ai-c"> |
|
|
|
|
|
|
|
<text class="fs16" style="color: #994800;">科一+科四考前密卷2套</text> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<image style="width: 65rpx;height: 65rpx; position: absolute;right: 20px;top: -5px;" src="../../static/image/practice/vip_include.png"></image> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view style="height: 528rpx;width: 100%;background-image: url(../../static/image/practice/vip_bg.png);background-size: 100% 100%;margin-top: -65px;position: relative;"> |
|
|
|
|
|
|
|
<text style="position: absolute;top: 138px;left:100px;rotate: 16deg;" class="fs25 cor-fff">VIP题库</text> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="wp100 p14" style="position: absolute;left: 0;bottom:20px"> |
|
|
|
|
|
|
|
<view class="sub_btn flex ai-c jc-sb"> |
|
|
|
|
|
|
|
<text class="cor-fff fs14">¥<text class="fs24 cor-fff">{{nowPrice}}</text></text> |
|
|
|
|
|
|
|
<image style="width: 276rpx;height: 88rpx;margin-top: -5px;" src="../../static/image/index/buy.png"></image> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</u-popup> |
|
|
|
|
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
|
|
|
|
import storage from '@/jtools/storage'; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
props:{ |
|
|
|
props:{ |
|
|
|
tabsList:{ |
|
|
|
tabsList:{ |
|
|
@ -165,10 +199,16 @@ export default { |
|
|
|
isSubmit:{ |
|
|
|
isSubmit:{ |
|
|
|
type:Boolean, |
|
|
|
type:Boolean, |
|
|
|
default:false |
|
|
|
default:false |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
isShowAll:{ |
|
|
|
|
|
|
|
type:Boolean, |
|
|
|
|
|
|
|
default:true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
|
|
|
|
nowPrice:68, |
|
|
|
|
|
|
|
showVip:false, |
|
|
|
popupShow:false, |
|
|
|
popupShow:false, |
|
|
|
content:'太棒啦,已答完最后一题~', |
|
|
|
content:'太棒啦,已答完最后一题~', |
|
|
|
tipShow:false, |
|
|
|
tipShow:false, |
|
|
@ -178,6 +218,7 @@ export default { |
|
|
|
qIndex:0, |
|
|
|
qIndex:0, |
|
|
|
rightList:[], |
|
|
|
rightList:[], |
|
|
|
wrongList:[], |
|
|
|
wrongList:[], |
|
|
|
|
|
|
|
collectList:storage.get('collectList') || [], |
|
|
|
questionList: [],//数据源 |
|
|
|
questionList: [],//数据源 |
|
|
|
swiperList: [], // 轮播图数据列表 |
|
|
|
swiperList: [], // 轮播图数据列表 |
|
|
|
swiperIndex: 0, // 轮播图当前位置 |
|
|
|
swiperIndex: 0, // 轮播图当前位置 |
|
|
@ -191,6 +232,10 @@ export default { |
|
|
|
this.renderSwiper(0) |
|
|
|
this.renderSwiper(0) |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
//开通VIP |
|
|
|
|
|
|
|
toVip(){ |
|
|
|
|
|
|
|
this.showVip=true |
|
|
|
|
|
|
|
}, |
|
|
|
submitPaper(){ |
|
|
|
submitPaper(){ |
|
|
|
this.$refs.countDown_1.pause(); |
|
|
|
this.$refs.countDown_1.pause(); |
|
|
|
this.$refs.countDown_2.pause(); |
|
|
|
this.$refs.countDown_2.pause(); |
|
|
@ -222,18 +267,24 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
toCollect(){ |
|
|
|
toCollect(){ |
|
|
|
if(this.questionList[this.topicIndex].isCollect){ |
|
|
|
if(this.questionList[this.topicIndex].isCollect){ |
|
|
|
|
|
|
|
if(this.collectList.includes(this.questionList[this.topicIndex].questionId)){ |
|
|
|
|
|
|
|
const idx=this.collectList.indexOf(this.questionList[this.topicIndex].questionId) |
|
|
|
|
|
|
|
this.collectList.splice(idx,1) |
|
|
|
|
|
|
|
} |
|
|
|
this.questionList[this.topicIndex].isCollect=false |
|
|
|
this.questionList[this.topicIndex].isCollect=false |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title:"取消收藏", |
|
|
|
title:"取消收藏", |
|
|
|
icon:'none' |
|
|
|
icon:'none' |
|
|
|
}) |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
|
|
|
|
this.collectList.push(this.questionList[this.topicIndex].questionId) |
|
|
|
this.questionList[this.topicIndex].isCollect=true |
|
|
|
this.questionList[this.topicIndex].isCollect=true |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title:"已收藏", |
|
|
|
title:"已收藏", |
|
|
|
icon:'none' |
|
|
|
icon:'none' |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
storage.set('collectList',this.collectList) |
|
|
|
}, |
|
|
|
}, |
|
|
|
cancel(){ |
|
|
|
cancel(){ |
|
|
|
this.tipShow=false |
|
|
|
this.tipShow=false |
|
|
@ -292,8 +343,13 @@ export default { |
|
|
|
// 轮播图动画结束 |
|
|
|
// 轮播图动画结束 |
|
|
|
onAnimationfinish(e) { |
|
|
|
onAnimationfinish(e) { |
|
|
|
if(this.index>=this.questionList.length){ |
|
|
|
if(this.index>=this.questionList.length){ |
|
|
|
this.tipShow=true |
|
|
|
if(this.isShowAll){ |
|
|
|
|
|
|
|
this.tipShow=true |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.showVip=true |
|
|
|
|
|
|
|
} |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
|
|
|
|
this.showVip=false |
|
|
|
this.tipShow=false |
|
|
|
this.tipShow=false |
|
|
|
} |
|
|
|
} |
|
|
|
if (!this.isChange) return; |
|
|
|
if (!this.isChange) return; |
|
|
@ -321,7 +377,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(this.rightList); |
|
|
|
console.log(this.rightList); |
|
|
|
if(this.wrongList.includes(this.questionList[this.topicIndex].questionId)){ |
|
|
|
if(this.wrongList.includes(this.questionList[this.topicIndex].questionId)){ |
|
|
|
const wIndex=this.wrongList.findIndex(this.questionList[this.topicIndex].questionId) |
|
|
|
const wIndex=this.wrongList.indexOf(this.questionList[this.topicIndex].questionId) |
|
|
|
this.wrongList.splice(wIndex,1) |
|
|
|
this.wrongList.splice(wIndex,1) |
|
|
|
} |
|
|
|
} |
|
|
|
if(this.topicIndex<this.questionList.length-1){ |
|
|
|
if(this.topicIndex<this.questionList.length-1){ |
|
|
@ -766,4 +822,23 @@ export default { |
|
|
|
.content{ |
|
|
|
.content{ |
|
|
|
padding-top: calc(var(--window-top) + 10px); |
|
|
|
padding-top: calc(var(--window-top) + 10px); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.vip_btn{ |
|
|
|
|
|
|
|
width:100%; |
|
|
|
|
|
|
|
height: 100rpx; |
|
|
|
|
|
|
|
line-height: 100rpx; |
|
|
|
|
|
|
|
text-align: center; |
|
|
|
|
|
|
|
font-size: 18px; |
|
|
|
|
|
|
|
color:#fff; |
|
|
|
|
|
|
|
background: linear-gradient(90deg, #FF9804 0%, #E95B0E 100%); |
|
|
|
|
|
|
|
border-radius: 50rpx; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.sub_btn{ |
|
|
|
|
|
|
|
width:100%; |
|
|
|
|
|
|
|
height: 110rpx; |
|
|
|
|
|
|
|
border: 4px solid #F59B26; |
|
|
|
|
|
|
|
background: linear-gradient(0deg, #E66501 0%, #F8A42C 100%); |
|
|
|
|
|
|
|
box-shadow: 0rpx 16rpx 20rpx 1rpx rgba(245,155,38,0.78); |
|
|
|
|
|
|
|
border-radius: 55rpx; |
|
|
|
|
|
|
|
padding: 14rpx; |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|