dev-hxf #6
@@ -117,6 +117,13 @@
|
||||
"navigationBarTitleText": "图标技巧",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/questionBank/chapterExercise",
|
||||
"style": {
|
||||
"navigationBarTitleText": "章节练习",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
width: 218rpx;
|
||||
border-radius: 0 0 16rpx 12rpx;
|
||||
background-color: #FF6E02;
|
||||
color:#fff
|
||||
}
|
||||
.tag{
|
||||
width: 122rpx;
|
||||
|
||||
42
src/pages/questionBank/chapterExercise.vue
Normal file
42
src/pages/questionBank/chapterExercise.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="chapter_item p14" v-for="(item,index) of chapterList" :key="index" @tap="toQuestion">
|
||||
{{item.label}}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
chapterList:[
|
||||
{label:'驾驶证申请相关'},
|
||||
{label:'驾驶证申请相关'},
|
||||
{label:'驾驶证登记处罚'},
|
||||
{label:'机动车强制报废'},
|
||||
{label:'其他考点'},
|
||||
{label:'驾驶证登记处罚'},
|
||||
{label:'机动车强制报废'},
|
||||
{label:'其他考点'}]
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
toQuestion(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle="+章节技巧
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.chapter_item{
|
||||
border-bottom: 1px solid rgb(210,209,214);
|
||||
background-color: #fff;
|
||||
}
|
||||
.chapter_item:hover{
|
||||
background-color: rgb(210,209,214);
|
||||
}
|
||||
</style>
|
||||
@@ -186,6 +186,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import storage from '@/jtools/storage';
|
||||
export default {
|
||||
props:{
|
||||
tabsList:{
|
||||
@@ -217,6 +218,7 @@ export default {
|
||||
qIndex:0,
|
||||
rightList:[],
|
||||
wrongList:[],
|
||||
collectList:storage.get('collectList') || [],
|
||||
questionList: [],//数据源
|
||||
swiperList: [], // 轮播图数据列表
|
||||
swiperIndex: 0, // 轮播图当前位置
|
||||
@@ -265,18 +267,24 @@ export default {
|
||||
},
|
||||
toCollect(){
|
||||
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
|
||||
uni.showToast({
|
||||
title:"取消收藏",
|
||||
icon:'none'
|
||||
})
|
||||
}else{
|
||||
this.collectList.push(this.questionList[this.topicIndex].questionId)
|
||||
this.questionList[this.topicIndex].isCollect=true
|
||||
uni.showToast({
|
||||
title:"已收藏",
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
storage.set('collectList',this.collectList)
|
||||
},
|
||||
cancel(){
|
||||
this.tipShow=false
|
||||
@@ -369,7 +377,7 @@ export default {
|
||||
}
|
||||
console.log(this.rightList);
|
||||
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)
|
||||
}
|
||||
if(this.topicIndex<this.questionList.length-1){
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<view class="p14">
|
||||
<view class="flex jc-sb">
|
||||
<view class="relative mr5">
|
||||
<view class="relative mr5" @tap="toIconSkill">
|
||||
<image style="width: 336rpx;height: 152rpx;" src="../../static/image/practice/errorprone_bg.png">
|
||||
</image>
|
||||
<view style="position: absolute;left: 0;top: 0;" class="p10" @tap="toIconSkill">
|
||||
<view style="color: #04B13B;font-size: 18px;">图表技巧</view>
|
||||
<view style="position: absolute;left: 0;top: 0;" class="p10">
|
||||
<view style="color: #04B13B;font-size: 18px;">图标技巧</view>
|
||||
<text style="color: #04B13B;font-size: 14px;">快速记忆</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative ml5">
|
||||
<view class="relative ml5" @tap="toChapterSkill">
|
||||
<image style="width: 363rpx;height: 170rpx;" src="../../static/image/practice/chapter_bg.png"></image>
|
||||
<view style="position: absolute;left: 0;top: 0;" class="p10">
|
||||
<view style="color: #FF6E02;font-size: 18px;">章节练习</view>
|
||||
@@ -96,6 +96,11 @@
|
||||
uni.navigateTo({
|
||||
url:"/pages/index/iconSkill"
|
||||
})
|
||||
},
|
||||
toChapterSkill(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/chapterExercise"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- <u-navbar :title="navTitle" @rightClick="rightClick" :autoBack="true">
|
||||
</u-navbar> -->
|
||||
<j-navbar>{{navTitle}}</j-navbar>
|
||||
<Question :tabsList="tabsList" :isShowAll="false" />
|
||||
<Question :tabsList="tabsList" :isShowAll="true" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user