This commit is contained in:
2023-08-24 16:53:11 +08:00
14 changed files with 197 additions and 134 deletions

View File

@@ -190,7 +190,7 @@
</view>
</view>
</u-popup>
<u-popup :show="showVip" mode="bottom" :closeOnClickOverlay="true" :round="16" @close="showVip=false">
<!-- <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>
@@ -219,7 +219,7 @@
<image style="width: 276rpx;height: 88rpx;margin-top: -5px;" src="../../static/image/index/buy.png"></image>
</view>
</view>
</u-popup>
</u-popup> -->
</view>
</template>
@@ -333,16 +333,13 @@ export default {
this.topicIndex ++;
this.qIndex=this.topicIndex
setTimeout(()=>{
console.log(12345);
this.renderSwiper(this.topicIndex);
},1000)
}
if(this.topicIndex<=this.questionList.length-1){
this.qIndex=this.topicIndex
}else{
this.qIndex++
if(this.topicIndex===this.questionList.length-1){
this.qIndex=this.topicIndex+1
}
if(this.qIndex>=this.questionList.length-1){
if(this.qIndex>this.questionList.length-1){
setTimeout(()=>{
this.tipShow=true
},1000)
@@ -405,7 +402,9 @@ export default {
},
//开通VIP
toVip(){
this.showVip=true
uni.navigateTo({
url:"/pages/index/videoVip?subject="+this.subject
})
},
submitPaper(){
this.$refs.countDown_1.pause();
@@ -565,9 +564,14 @@ export default {
this.questionList[this.topicIndex].optionList[index].chooseOption =`${this.questionList[this.topicIndex].optionList[index].chooseOption?this.questionList[this.topicIndex].optionList[index].chooseOption:''}${op}`
this.questionList[this.topicIndex].clickAnswer = `${this.questionList[this.topicIndex].optionList[index].clickAnswer?this.questionList[this.topicIndex].optionList[index].clickAnswer:''}${op}`
}else{
//如果是多选 点击的选项中不包含该选项则拼接进去,如果包含则能删除
if(this.questionList[this.topicIndex].type=='3'&&!this.questionList[this.topicIndex].clickAnswer.includes(op)){
this.questionList[this.topicIndex].optionList[index].chooseOption =`${this.questionList[this.topicIndex].optionList[index].chooseOption?this.questionList[this.topicIndex].optionList[index].chooseOption:''}${op}`
this.questionList[this.topicIndex].clickAnswer =`${this.questionList[this.topicIndex].clickAnswer}${op}`
}else if(this.questionList[this.topicIndex].type=='3'&&this.questionList[this.topicIndex].clickAnswer.includes(op)){
this.questionList[this.topicIndex].optionList[index].chooseOption =''
let reg2 = new RegExp(op); // 不加'g',仅删除字符串里第一个"a"
this.questionList[this.topicIndex].clickAnswer = this.questionList[this.topicIndex].clickAnswer.replace(reg2,"");
}
}
if(this.tCurrent!==1&&this.questionList[this.topicIndex].type!='3'){
@@ -600,12 +604,10 @@ export default {
this.renderSwiper(this.topicIndex);
},1000)
}
if(this.topicIndex<=this.questionList.length-1){
this.qIndex=this.topicIndex
}else{
this.qIndex++
if(this.topicIndex===this.questionList.length-1){
this.qIndex=this.topicIndex+1
}
if(this.qIndex>=this.questionList.length-1){
if(this.qIndex>this.questionList.length-1){
setTimeout(()=>{
this.tipShow=true
},1000)