提交
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<view>
|
||||
<j-navbar>基本操作</j-navbar>
|
||||
<u-sticky bgColor="#fff">
|
||||
<!-- <u-sticky bgColor="#fff">
|
||||
<u-tabs :list="categoryList" :scrollable="false" @click="changeCategory"></u-tabs>
|
||||
</u-sticky>
|
||||
</u-sticky> -->
|
||||
<view class="p14">
|
||||
<!-- <view class="flex ai-c">
|
||||
<view class="car_item mr10" v-for="(item,index) of carTypeList" :key="index" @tap="chooseCar(item.value)" :class="item.value===tCar?'checked_car':'unchecked_car'">{{item.label}}</view>
|
||||
</view> -->
|
||||
<view class="flex p14lr p20tb bc-fff mb10" style="border-radius: 10rpx;"
|
||||
v-for="(item,index) of videoList" :key="index" @tap="toOperateDetail(item.videoId)">
|
||||
<view class="pic relative" style="overflow: hidden;">
|
||||
<image class="pic" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
|
||||
<view class="pic relative hide" style="overflow: hidden;">
|
||||
<image class="pic" style="position: absolute;left: 0;top:0" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
|
||||
<image class="play_btn_2" src="../../static/image/index/play.png" />
|
||||
</view>
|
||||
<view class="ml10">
|
||||
@@ -51,7 +51,6 @@
|
||||
if(op.type){
|
||||
this.type=op.type
|
||||
}
|
||||
console.log(this.type);
|
||||
this.getDiverType()
|
||||
},
|
||||
methods:{
|
||||
@@ -83,7 +82,6 @@
|
||||
queryProjectList({
|
||||
"carTypeId": storage.get('carType') || '1001',
|
||||
"subject": String(this.subject),
|
||||
"driveType": this.categoryList[this.tCar].configItemCode,
|
||||
"type": this.type
|
||||
}).then(resp => {
|
||||
if(resp.code==='0000'){
|
||||
@@ -156,4 +154,10 @@
|
||||
left: 117.5rpx;
|
||||
top: 52rpx
|
||||
}
|
||||
.hide {
|
||||
backface-visibility: hidden;
|
||||
transform: translate3d(0, 0, 0);
|
||||
-webkit-backface-visibility: hidden;
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
}
|
||||
</style>
|
||||
@@ -1,28 +1,71 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="chapter_item p14" v-for="(item,index) of chapterList" :key="index" @tap="toQuestion(item.configItemCode)">
|
||||
{{item.configItemName}}
|
||||
<u-loading-page :loading="getLoading" loading-text="题库更新中..."></u-loading-page>
|
||||
<view v-if="!getLoading">
|
||||
<view class="chapter_item p14" v-for="(item,index) of chapterList" :key="index" @tap="toQuestion(item.configItemCode)">
|
||||
{{item.configItemName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
querySysConfigList
|
||||
querySysConfigList,
|
||||
queryQuestionId
|
||||
} from '@/jtools/api/question';
|
||||
import {
|
||||
mapState,
|
||||
mapActions
|
||||
} from 'pinia' //引入映射函数
|
||||
import useQuestionStore from '@/jtools/store/question' //引入store
|
||||
import storage from '@/jtools/storage';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
chapterList:[]
|
||||
chapterList:[],
|
||||
subject:'1'
|
||||
}
|
||||
},
|
||||
onLoad(){
|
||||
onLoad(op){
|
||||
if(op.subject){
|
||||
this.subject=op.subject
|
||||
}
|
||||
this.getChapterList()
|
||||
},
|
||||
computed: {
|
||||
...mapState(useQuestionStore, ["loading_subject4", "loading_subject1", "version"]), //映射函数,取出tagslist
|
||||
getLoading() {
|
||||
return this.loading_subject4 && this.loading_subject1
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
...mapActions(useQuestionStore, ['getAllQuestion']),
|
||||
getQuestion(param,title) {
|
||||
queryQuestionId({
|
||||
versionId: this.version,
|
||||
carTypeId: storage.get('carType') || '1001',
|
||||
subject: this.subject,
|
||||
...param,
|
||||
}).then(async (resp) => {
|
||||
if (resp.code === '0000') {
|
||||
const arr = resp.data
|
||||
const listJson = JSON.stringify(arr)
|
||||
uni.navigateTo({
|
||||
url: "/pages/questionBank/questionBank?navTitle=" + title + "&subject=" + this.subject + "&questionIdList=" + listJson
|
||||
})
|
||||
}else if (resp.code === '4001') {
|
||||
uni.showToast({
|
||||
title: '当前题库非最新版,请更新~',
|
||||
icon: 'none'
|
||||
})
|
||||
this.getAllQuestion()
|
||||
}
|
||||
})
|
||||
},
|
||||
getChapterList(){
|
||||
const carTypeId=storage.get('carType') || '1001'
|
||||
const key=this.subject=='1'?'ChapterOfSubjectOne':'ChapterOfSubjectFour'
|
||||
querySysConfigList(carTypeId,'ChapterOfSubjectOne').then(resp=>{
|
||||
if(resp.code==='0000'){
|
||||
this.chapterList=resp.data
|
||||
@@ -30,9 +73,7 @@
|
||||
})
|
||||
},
|
||||
toQuestion(code){
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle=章节技巧&chapter="+code
|
||||
})
|
||||
this.getQuestion({chapter:code},'章节技巧')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@
|
||||
<text>未做题</text>
|
||||
</view>
|
||||
<view class="text-center wp33" @tap="toQuestionBank">
|
||||
<view>{{wrongList.length}}</view>
|
||||
<view>{{wrongList?.length}}</view>
|
||||
<text>看错题</text>
|
||||
</view>
|
||||
<view class="text-center wp33 flex jc-c ai-c" style="flex-direction: column;" @tap="toExams">
|
||||
@@ -108,6 +108,7 @@
|
||||
this.doNotNum=op.doNotNum
|
||||
}
|
||||
if(op.wrongList){
|
||||
console.log(op.wrongList);
|
||||
this.wrongList=JSON.parse(op.wrongList) || []
|
||||
}
|
||||
if(op.score){
|
||||
@@ -124,6 +125,13 @@
|
||||
onReady() {
|
||||
this.getServerData();
|
||||
},
|
||||
onUnload() {
|
||||
//#ifdef MP-WEIXIN
|
||||
uni.reLaunch({
|
||||
url:"/pages/index/index"
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
computed: {
|
||||
...mapState(useUserStore, ["vipOnList"])
|
||||
},
|
||||
@@ -131,7 +139,7 @@
|
||||
...mapActions(useUserStore, ['searchUserVip']),
|
||||
async toVip(){
|
||||
await this.searchUserVip()
|
||||
const res = this.vipOnList.some(item => item.subjects == this.subject)
|
||||
const res = this.vipOnList.some(item => item.subjects.includes(this.subject))
|
||||
if(res){
|
||||
uni.navigateTo({
|
||||
url: '/pages/me/vip'
|
||||
@@ -166,10 +174,17 @@
|
||||
})
|
||||
},
|
||||
toQuestionBank(){
|
||||
const list =JSON.stringify(this.wrongList)
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle=错题&subject="+this.subject+"&questionList="+list
|
||||
})
|
||||
if(this.wrongList.length==0){
|
||||
uni.showToast({
|
||||
title:'当前无错题~',
|
||||
icon:'none'
|
||||
})
|
||||
}else{
|
||||
const list =JSON.stringify(this.wrongList)
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle=错题&subject="+this.subject+"&questionList="+list
|
||||
})
|
||||
}
|
||||
},
|
||||
//重新考试
|
||||
toExams(){
|
||||
|
||||
@@ -1,42 +1,48 @@
|
||||
<template>
|
||||
<view class="p14">
|
||||
<view class="flex jc-sb">
|
||||
<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">
|
||||
<view style="color: #04B13B;font-size: 18px;">图标技巧</view>
|
||||
<text style="color: #04B13B;font-size: 14px;">快速记忆</text>
|
||||
</view>
|
||||
</view>
|
||||
<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>
|
||||
<text style="color: #FF6E02;font-size: 14px;">共5章</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bc-fff pt14" style="border-radius: 20rpx;">
|
||||
<u-grid :border="false" col="4">
|
||||
<u-grid-item v-for="(listItem,listIndex) in list" :key="listIndex" @click="toAnswer(listItem.title,listItem.isError,listItem.isNew)">
|
||||
<view style="width: 84rpx;height: 84rpx;">
|
||||
<image style="width: 84rpx;height: 100rpx;" mode="widthFix" :src="listItem.image"></image>
|
||||
<view>
|
||||
<u-loading-page :loading="getLoading" loading-text="题库更新中..."></u-loading-page>
|
||||
<view class="p14" v-if="!getLoading">
|
||||
<view class="flex jc-sb">
|
||||
<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">
|
||||
<view style="color: #04B13B;font-size: 18px;">图标技巧</view>
|
||||
<text style="color: #04B13B;font-size: 14px;">快速记忆</text>
|
||||
</view>
|
||||
</view>
|
||||
<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>
|
||||
<text style="color: #FF6E02;font-size: 14px;">共5章</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bc-fff pt14" style="border-radius: 20rpx;">
|
||||
<u-grid :border="false" col="4">
|
||||
<u-grid-item v-for="(listItem,listIndex) in list" :key="listIndex"
|
||||
@click="toAnswer(listItem.title,listItem.isError,listItem.isNew)">
|
||||
<view class="mb5" style="width: 84rpx;height: 84rpx;">
|
||||
<image style="width: 84rpx;height:84rpx;" mode="heightFix" :src="listItem.image"></image>
|
||||
</view>
|
||||
<text class="grid-text fs14 cor-000">{{listItem.title}}</text>
|
||||
<text class="grid-text mb10 fs12 cor-999">{{listItem.subTitle}}</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
<view class="mt14 p14 bc-fff" style="border-radius: 20rpx;">
|
||||
<text class="fs18 cor-000 fw600">常见考点</text>
|
||||
<view class="flex ai-c wp100 mt10" style="flex-wrap: wrap;">
|
||||
<view class="wp50 flex ai-c p15tb" style="border-bottom: 1rpx solid #DDDCDC;"
|
||||
v-for="(item,index) of testCenterList" :key="index" @tap="toQuestionBank(item)">
|
||||
<view class="dot_item">{{index+1}}</view>
|
||||
<text class="ml5 topic_cont_text" style="width: calc(100% - 65rpx);">{{item.configItemName}}</text>
|
||||
</view>
|
||||
<text class="grid-text fs14 cor-000">{{listItem.title}}</text>
|
||||
<text class="grid-text mb10 fs12 cor-999">{{listItem.subTitle}}</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
<view class="mt14 p14 bc-fff" style="border-radius: 20rpx;">
|
||||
<text class="fs18 cor-000 fw600">常见考点</text>
|
||||
<view class="flex ai-c wp100 mt10" style="flex-wrap: wrap;">
|
||||
<view class="wp50 flex ai-c p15tb" style="border-bottom: 1rpx solid #DDDCDC;" v-for="(item,index) of testCenterList" :key="index" @tap="toQuestionBank(item)">
|
||||
<view class="dot_item">{{index+1}}</view>
|
||||
<text class="ml5 topic_cont_text" style="width: calc(100% - 65rpx);">{{item.configItemName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -49,8 +55,14 @@
|
||||
import tupianIcon from "../../static/image/index/tupian.png"
|
||||
import {
|
||||
querySysConfigList,
|
||||
querySpecialNum
|
||||
querySpecialNum,
|
||||
queryQuestionId
|
||||
} from '@/jtools/api/question';
|
||||
import {
|
||||
mapState,
|
||||
mapActions
|
||||
} from 'pinia' //引入映射函数
|
||||
import useQuestionStore from '@/jtools/store/question' //引入store
|
||||
import storage from '@/jtools/storage';
|
||||
export default {
|
||||
data() {
|
||||
@@ -58,199 +70,222 @@
|
||||
errorIcon,
|
||||
newRulesIcon,
|
||||
neverWriteIcon,
|
||||
list:[{
|
||||
title:'新规题',
|
||||
subTitle:'392题',
|
||||
isNew:1,
|
||||
isError:0,
|
||||
image:newRulesIcon
|
||||
},{
|
||||
title:'易错题',
|
||||
isNew:0,
|
||||
isError:1,
|
||||
subTitle:'392题',
|
||||
image:errorIcon
|
||||
},{
|
||||
title:'单选题',
|
||||
subTitle:'392题',
|
||||
isNew:0,
|
||||
isError:0,
|
||||
image:danxuanIcon
|
||||
},{
|
||||
title:'判断题',
|
||||
subTitle:'392题',
|
||||
isNew:0,
|
||||
isError:0,
|
||||
image:panduanIcon
|
||||
},{
|
||||
title:'图片题',
|
||||
subTitle:'392题',
|
||||
isNew:0,
|
||||
isError:0,
|
||||
image:tupianIcon
|
||||
list: [{
|
||||
title: '新规题',
|
||||
subTitle: '392题',
|
||||
isNew: 1,
|
||||
isError: 0,
|
||||
image: newRulesIcon
|
||||
}, {
|
||||
title: '易错题',
|
||||
isNew: 0,
|
||||
isError: 1,
|
||||
subTitle: '392题',
|
||||
image: errorIcon
|
||||
}, {
|
||||
title: '单选题',
|
||||
subTitle: '392题',
|
||||
isNew: 0,
|
||||
isError: 0,
|
||||
image: danxuanIcon
|
||||
}, {
|
||||
title: '判断题',
|
||||
subTitle: '392题',
|
||||
isNew: 0,
|
||||
isError: 0,
|
||||
image: panduanIcon
|
||||
}, {
|
||||
title: '图片题',
|
||||
subTitle: '392题',
|
||||
isNew: 0,
|
||||
isError: 0,
|
||||
image: tupianIcon
|
||||
}],
|
||||
testCenterList:[],
|
||||
subject:'1'
|
||||
testCenterList: [],
|
||||
subject: '1'
|
||||
}
|
||||
},
|
||||
onLoad(op){
|
||||
if(op.subject){
|
||||
this.subject=op.subject
|
||||
onLoad(op) {
|
||||
if (op.subject) {
|
||||
this.subject = op.subject
|
||||
}
|
||||
this.getExamPoint()
|
||||
this.getQuestionNum()
|
||||
},
|
||||
computed: {
|
||||
...mapState(useQuestionStore, ["loading_subject4", "loading_subject1", "version"]), //映射函数,取出tagslist
|
||||
getLoading() {
|
||||
return this.loading_subject4 && this.loading_subject1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getQuestionNum(){
|
||||
...mapActions(useQuestionStore, ['getAllQuestion']),
|
||||
getQuestionNum() {
|
||||
querySpecialNum({
|
||||
carTypeId:storage.get('carType') || '1001',
|
||||
subject:this.subject
|
||||
}).then(resp=>{
|
||||
if(resp.code==='0000'){
|
||||
if(this.subject=='1'){
|
||||
this.list=[{
|
||||
title:'新规题',
|
||||
subTitle:resp.data.newQuestionNum+'题',
|
||||
isNew:1,
|
||||
isError:0,
|
||||
image:newRulesIcon
|
||||
},{
|
||||
title:'易错题',
|
||||
isNew:0,
|
||||
isError:1,
|
||||
subTitle:resp.data.errorQuestionNum+'题',
|
||||
image:errorIcon
|
||||
},{
|
||||
title:'单选题',
|
||||
subTitle:resp.data.radioQuestionNum+'题',
|
||||
isNew:0,
|
||||
isError:0,
|
||||
image:danxuanIcon
|
||||
},{
|
||||
title:'判断题',
|
||||
subTitle:resp.data.judgeQuestionNum+'题',
|
||||
isNew:0,
|
||||
isError:0,
|
||||
image:panduanIcon
|
||||
},{
|
||||
title:'图片题',
|
||||
subTitle:resp.data.imageQuestionNum+'题',
|
||||
isNew:0,
|
||||
isError:0,
|
||||
image:tupianIcon
|
||||
carTypeId: storage.get('carType') || '1001',
|
||||
subject: this.subject
|
||||
}).then(resp => {
|
||||
if (resp.code === '0000') {
|
||||
if (this.subject == '1') {
|
||||
this.list = [{
|
||||
title: '新规题',
|
||||
subTitle: resp.data.newQuestionNum + '题',
|
||||
isNew: 1,
|
||||
isError: 0,
|
||||
image: newRulesIcon,
|
||||
}, {
|
||||
title: '易错题',
|
||||
isNew: 0,
|
||||
isError: 1,
|
||||
subTitle: resp.data.errorQuestionNum + '题',
|
||||
image: errorIcon,
|
||||
}, {
|
||||
title: '单选题',
|
||||
subTitle: resp.data.radioQuestionNum + '题',
|
||||
isNew: 0,
|
||||
isError: 0,
|
||||
image: danxuanIcon,
|
||||
}, {
|
||||
title: '判断题',
|
||||
subTitle: resp.data.judgeQuestionNum + '题',
|
||||
isNew: 0,
|
||||
isError: 0,
|
||||
image: panduanIcon,
|
||||
}, {
|
||||
title: '图片题',
|
||||
subTitle: resp.data.imageQuestionNum + '题',
|
||||
isNew: 0,
|
||||
isError: 0,
|
||||
image: tupianIcon,
|
||||
}]
|
||||
}else{
|
||||
this.list=[{
|
||||
title:'新规题',
|
||||
subTitle:resp.data.newQuestionNum+'题',
|
||||
isNew:1,
|
||||
isError:0,
|
||||
image:newRulesIcon
|
||||
},{
|
||||
title:'易错题',
|
||||
isNew:0,
|
||||
isError:1,
|
||||
subTitle:resp.data.errorQuestionNum+'题',
|
||||
image:errorIcon
|
||||
},{
|
||||
title:'单选题',
|
||||
subTitle:resp.data.radioQuestionNum+'题',
|
||||
isNew:0,
|
||||
isError:0,
|
||||
image:danxuanIcon
|
||||
},{
|
||||
title:'多选题',
|
||||
subTitle:resp.data.multipleChoiceQuestionNum+'题',
|
||||
isNew:0,
|
||||
isError:0,
|
||||
image:neverWriteIcon
|
||||
},{
|
||||
title:'判断题',
|
||||
subTitle:resp.data.judgeQuestionNum+'题',
|
||||
isNew:0,
|
||||
isError:0,
|
||||
image:panduanIcon
|
||||
},{
|
||||
title:'图片题',
|
||||
subTitle:resp.data.imageQuestionNum+'题',
|
||||
isNew:0,
|
||||
isError:0,
|
||||
image:tupianIcon
|
||||
} else {
|
||||
this.list = [{
|
||||
title: '新规题',
|
||||
subTitle: resp.data.newQuestionNum + '题',
|
||||
isNew: 1,
|
||||
isError: 0,
|
||||
image: newRulesIcon
|
||||
}, {
|
||||
title: '易错题',
|
||||
isNew: 0,
|
||||
isError: 1,
|
||||
subTitle: resp.data.errorQuestionNum + '题',
|
||||
image: errorIcon,
|
||||
}, {
|
||||
title: '单选题',
|
||||
subTitle: resp.data.radioQuestionNum + '题',
|
||||
isNew: 0,
|
||||
isError: 0,
|
||||
image: danxuanIcon,
|
||||
}, {
|
||||
title: '多选题',
|
||||
subTitle: resp.data.multipleChoiceQuestionNum + '题',
|
||||
isNew: 0,
|
||||
isError: 0,
|
||||
image: neverWriteIcon
|
||||
}, {
|
||||
title: '判断题',
|
||||
subTitle: resp.data.judgeQuestionNum + '题',
|
||||
isNew: 0,
|
||||
isError: 0,
|
||||
image: panduanIcon,
|
||||
}, {
|
||||
title: '图片题',
|
||||
subTitle: resp.data.imageQuestionNum + '题',
|
||||
isNew: 0,
|
||||
isError: 0,
|
||||
image: tupianIcon,
|
||||
}]
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getExamPoint(){
|
||||
const carTypeId=storage.get('carType') || '1001'
|
||||
const examKey = this.subject=='1'?'ExamKeysOfSubjectOne':'ExamKeysOfSubjectFour'
|
||||
querySysConfigList(carTypeId,examKey).then(resp=>{
|
||||
if(resp.code==='0000'){
|
||||
this.testCenterList=resp.data
|
||||
getExamPoint() {
|
||||
const carTypeId = storage.get('carType') || '1001'
|
||||
const examKey = this.subject == '1' ? 'ExamKeysOfSubjectOne' : 'ExamKeysOfSubjectFour'
|
||||
querySysConfigList(carTypeId, examKey).then(resp => {
|
||||
if (resp.code === '0000') {
|
||||
this.testCenterList = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
toAnswer(title,isError,isNew) {
|
||||
if(title=='单选题'){
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle="+title+"&isError="+isError+"&isNew="+isNew+"&type=2"+"&subject="+this.subject
|
||||
})
|
||||
}else if(title=='多选题'){
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle="+title+"&isError="+isError+"&isNew="+isNew+"&type=3"+"&subject="+this.subject
|
||||
})
|
||||
}else if(title=='判断题'){
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle="+title+"&isError="+isError+"&isNew="+isNew+"&type=1"+"&subject="+this.subject
|
||||
})
|
||||
}else if(title=='图片题'){
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle="+title+"&isError="+isError+"&isNew="+isNew+"&isImage=1"+"&subject="+this.subject
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle="+title+"&isError="+isError+"&isNew="+isNew+"&subject="+this.subject
|
||||
getQuestion(param,title) {
|
||||
queryQuestionId({
|
||||
versionId: this.version,
|
||||
carTypeId: storage.get('carType') || '1001',
|
||||
subject: this.subject,
|
||||
...param,
|
||||
}).then(async (resp) => {
|
||||
if (resp.code === '0000') {
|
||||
const arr = resp.data
|
||||
const listJson = JSON.stringify(arr)
|
||||
uni.navigateTo({
|
||||
url: "/pages/questionBank/questionBank?navTitle=" + title + "&subject=" + this.subject + "&questionIdList=" + listJson
|
||||
})
|
||||
}else if (resp.code === '4001') {
|
||||
uni.showToast({
|
||||
title: '当前题库非最新版,请更新~',
|
||||
icon: 'none'
|
||||
})
|
||||
this.getAllQuestion()
|
||||
}
|
||||
},
|
||||
toQuestionBank(val){
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle="+val.configItemName+"&examKey="+val.configItemCode+"&subject="+this.subject
|
||||
})
|
||||
},
|
||||
toIconSkill(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/index/iconSkill"
|
||||
})
|
||||
},
|
||||
toChapterSkill(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/chapterExercise"
|
||||
})
|
||||
})
|
||||
},
|
||||
toAnswer(title, isError, isNew) {
|
||||
if (title == '单选题') {
|
||||
this.getQuestion({type:'2'},title)
|
||||
} else if (title == '多选题') {
|
||||
this.getQuestion({type:'3'},title)
|
||||
} else if (title == '判断题') {
|
||||
this.getQuestion({type:'1'},title)
|
||||
} else if (title == '图片题') {
|
||||
this.getQuestion({isImage:'1'},title)
|
||||
} else {
|
||||
this.getQuestion({isNew:isNew,isError:isError},title)
|
||||
}
|
||||
},
|
||||
toQuestionBank(val) {
|
||||
this.getQuestion({examKey:val.configItemCode},val.configItemName)
|
||||
},
|
||||
toIconSkill() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/iconSkill"
|
||||
})
|
||||
},
|
||||
toChapterSkill() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/questionBank/chapterExercise?subject="+this.subject
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dot_item{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
line-height: 41rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
background: #0BD032;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.topic_cont_text{
|
||||
height:45rpx;
|
||||
.dot_item {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
line-height: 41rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
background: #0BD032;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.topic_cont_text {
|
||||
height: 45rpx;
|
||||
overflow: hidden;
|
||||
word-break: break-all; /* break-all(允许在单词内换行。) */
|
||||
text-overflow: ellipsis; /* 超出部分省略号 */
|
||||
display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/
|
||||
-webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
|
||||
-webkit-line-clamp:1; /** 显示的行数 **/
|
||||
word-break: break-all;
|
||||
/* break-all(允许在单词内换行。) */
|
||||
text-overflow: ellipsis;
|
||||
/* 超出部分省略号 */
|
||||
display: -webkit-box;
|
||||
/** 对象作为伸缩盒子模型显示 **/
|
||||
-webkit-box-orient: vertical;
|
||||
/** 设置或检索伸缩盒对象的子元素的排列方式 **/
|
||||
-webkit-line-clamp: 1;
|
||||
/** 显示的行数 **/
|
||||
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -2,8 +2,9 @@
|
||||
<view>
|
||||
<!-- <u-navbar title="模拟考试" @rightClick="rightClick" :autoBack="true">
|
||||
</u-navbar> -->
|
||||
<j-navbar :isDefineBack="true" @toBack="toBack">{{title}}</j-navbar>
|
||||
<Question ref="question" :tabsList="tabsList" v-model:isSubmit="isSubmit" :type="type" :isShowAll="isShowAll" :subject="subject" :navTitle="title" @changeTab="changeTab" />
|
||||
<j-navbar :isDefineBack="true" @toBack="toBack">{{title}}</j-navbar>
|
||||
<Question ref="question" :tabsList="tabsList" v-model:isSubmit="isSubmit" :type="type" :isShowAll="isShowAll"
|
||||
:subject="subject" @changeTab="changeTab" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -12,9 +13,11 @@
|
||||
mapState,
|
||||
mapActions
|
||||
} from 'pinia' //引入映射函数
|
||||
import useQuestionStore from '@/jtools/store/question' //引入store
|
||||
import useUserStore from '@/jtools/store/user'
|
||||
import {
|
||||
getTestQuestion
|
||||
getTestQuestion,
|
||||
queryQuestionId
|
||||
} from '@/jtools/api/question';
|
||||
import storage from '@/jtools/storage';
|
||||
import Question from './components/Question.vue';
|
||||
@@ -24,63 +27,105 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type:'',
|
||||
isShowAll:true,
|
||||
title:"模拟考试",
|
||||
subject:1,
|
||||
isSubmit:false,
|
||||
tabsList:[{
|
||||
label:"模拟考试",
|
||||
value:0
|
||||
},{
|
||||
label:"考前密卷",
|
||||
value:1
|
||||
type: '',
|
||||
collectList: storage.get(`collectList_subject${this.subject}`) || [],
|
||||
questionArr:[],
|
||||
isShowAll: true,
|
||||
title: "模拟考试",
|
||||
subject: 1,
|
||||
isSubmit: false,
|
||||
tabsList: [{
|
||||
label: "模拟考试",
|
||||
value: 0
|
||||
}, {
|
||||
label: "考前秘卷",
|
||||
value: 1
|
||||
}]
|
||||
}
|
||||
},
|
||||
onLoad(op) {
|
||||
if(op.title){
|
||||
this.title=op.title
|
||||
if (op.title) {
|
||||
this.title = op.title
|
||||
}
|
||||
if(op.subject){
|
||||
this.subject=op.subject
|
||||
const param={}
|
||||
if(op.isExam1){
|
||||
param.isExam1=op.isExam1
|
||||
if (op.subject) {
|
||||
this.subject = op.subject
|
||||
const param = {}
|
||||
if (op.isExam1) {
|
||||
param.isExam1 = op.isExam1
|
||||
}
|
||||
getTestQuestion({
|
||||
carTypeId: storage.get('carType') || '1001',
|
||||
subject: this.subject,
|
||||
...param
|
||||
}).then(async (resp)=>{
|
||||
if(resp.code==='0000'){
|
||||
let arr=resp.data
|
||||
if(this.title==='考前密卷'){
|
||||
await this.searchUserVip()
|
||||
const res = this.vipOnList.some(item => item.subjects == this.subject)
|
||||
if (!res) {
|
||||
arr = arr.slice(0, 3)
|
||||
this.isShowAll = false
|
||||
}
|
||||
}
|
||||
this.type='exam'
|
||||
this.$refs.question.getQuestionList(JSON.stringify(arr))
|
||||
if(op.needVip){
|
||||
this.isShowAll = op.needVip
|
||||
}
|
||||
let arr=[]
|
||||
if(op.questionIdList){
|
||||
const idList=JSON.parse(op.questionIdList)
|
||||
arr = this[`orderQuestion_subject${this.subject}`].filter(qItem=>idList.includes(qItem.questionId))
|
||||
}
|
||||
arr.forEach(item => {
|
||||
let isCollect = false
|
||||
if (this.collectList.includes(item.questionId)) {
|
||||
isCollect = true
|
||||
}
|
||||
this.questionArr.push({
|
||||
isChoose: false,
|
||||
isCollect: isCollect,
|
||||
...item
|
||||
})
|
||||
})
|
||||
this.type = 'exam'
|
||||
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr),this.title)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(useUserStore, ["vipOnList"])
|
||||
...mapState(useUserStore, ["vipOnList","token"]),
|
||||
...mapState(useQuestionStore, ["orderQuestion_subject1", "orderQuestion_subject4", "version"]), //映射函数,取出tagslist
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useUserStore, ['searchUserVip']),
|
||||
toBack(){
|
||||
toBack() {
|
||||
this.$refs.question.submitPaper()
|
||||
},
|
||||
changeTab(val){
|
||||
if(val==1){
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/practiceExams?subject="+this.subject+'&title=考前密卷&isExam1=1'
|
||||
changeTab(val) {
|
||||
if (val == 1) {
|
||||
const param=this.subject=='1'?{isExam1: '1'}:{isExam2: '1'}
|
||||
queryQuestionId({
|
||||
versionId: this.version,
|
||||
carTypeId: storage.get('carType') || '1001',
|
||||
subject: this.subject,
|
||||
...param
|
||||
}).then(async (resp) => {
|
||||
if (resp.code === '0000') {
|
||||
if (this.token) {
|
||||
await this.searchUserVip()
|
||||
const result = this.vipOnList.some(item => item.subjects.includes(this.subject))
|
||||
if (result) {
|
||||
const listJson = JSON.stringify(resp.data)
|
||||
uni.navigateTo({
|
||||
url: "/pages/questionBank/practiceExams?title=考前密卷" + "&subject=" + this.subject + "&questionIdList=" + listJson
|
||||
})
|
||||
} else {
|
||||
if (resp.data && resp.data.length > 3) {
|
||||
const arr = resp.data.slice(0, 3)
|
||||
} else {
|
||||
const arr = resp.data
|
||||
}
|
||||
const listJson = JSON.stringify(arr)
|
||||
uni.navigateTo({
|
||||
url: "/pages/questionBank/practiceExams?title=" + title + "&subject=" + this.subject + "&questionIdList=" + listJson+"&needVip="+result
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
}
|
||||
} else if (resp.code === '4001') {
|
||||
uni.showToast({
|
||||
title: '当前题库非最新版,请更新~',
|
||||
icon: 'none'
|
||||
})
|
||||
this.getAllQuestion()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -89,17 +134,19 @@
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .u-count-down{
|
||||
::v-deep .u-count-down {
|
||||
font-size: 28rpx;
|
||||
color:#fff !important;
|
||||
color: #fff !important;
|
||||
display: inline-block !important;
|
||||
}
|
||||
::v-deep .u-count-down__text{
|
||||
|
||||
::v-deep .u-count-down__text {
|
||||
font-size: 28rpx;
|
||||
color:#fff !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
::v-deep .balckColor .u-count-down__text{
|
||||
|
||||
::v-deep .balckColor .u-count-down__text {
|
||||
font-size: 28rpx;
|
||||
color:#333 !important;
|
||||
color: #333 !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -88,11 +88,18 @@
|
||||
this.subject=op.subject
|
||||
this.allRightList=storage.get(`rightList_subject${this.subject}`) || []
|
||||
this.allWrongList=storage.get(`wrongList_subject${this.subject}`) || []
|
||||
this.percent=(((this.allRightList.length+this.wrongList.length) / this.orderQuestion.length)*100).toFixed(0)
|
||||
this.percent=(((this.allRightList.length+this.wrongList.length) / this[`orderQuestion_subject${this.subject}`].length)*100).toFixed(0)
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
//#ifdef MP-WEIXIN
|
||||
uni.reLaunch({
|
||||
url:"/pages/index/index"
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
computed: {
|
||||
...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject1"]), //映射函数,取出tagslist
|
||||
...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject4"]), //映射函数,取出tagslist
|
||||
getNotDoNum(){
|
||||
return this[`orderQuestion_subject${this.subject}`].length-(this.allRightList.length+this.allWrongList.length)
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- <u-navbar :title="navTitle" @rightClick="rightClick" :autoBack="true">
|
||||
</u-navbar> -->
|
||||
<j-navbar>{{navTitle}}</j-navbar>
|
||||
<Question ref="question" :tabsList="tabsList" :isShowAll="isShowAll" :subject="subject" :navTitle="navTitle"
|
||||
@changeTab="changeTab"></Question>
|
||||
<u-loading-page :loading="loading" :loading-text="loadTxt"></u-loading-page>
|
||||
<view v-if="!loading">
|
||||
<j-navbar>{{navTitle}}</j-navbar>
|
||||
<Question ref="question" :tabsList="tabsList" :isShowAll="isShowAll" :subject="subject" :navTitle="navTitle"
|
||||
@changeTab="changeTab"></Question>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -17,7 +18,8 @@
|
||||
import useUserStore from '@/jtools/store/user'
|
||||
import Question from './components/Question.vue';
|
||||
import {
|
||||
queryQuestion
|
||||
queryQuestion,
|
||||
queryQuestionId
|
||||
} from '@/jtools/api/question';
|
||||
import storage from '@/jtools/storage';
|
||||
export default {
|
||||
@@ -26,6 +28,9 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loadTxt:'加载中...',
|
||||
collectList: storage.get(`collectList_subject${this.subject}`) || [],
|
||||
loading:false,
|
||||
isShowAll: true,
|
||||
needVip: false,
|
||||
subject: 1,
|
||||
@@ -41,94 +46,89 @@
|
||||
}
|
||||
},
|
||||
async onLoad(op) {
|
||||
this.loading=true
|
||||
if (op.needVip) {
|
||||
this.needVip = op.needVip
|
||||
}
|
||||
if(op.subject){
|
||||
this.subject=op.subject
|
||||
if (op.subject) {
|
||||
this.subject = op.subject
|
||||
}
|
||||
if (op && op.navTitle) {
|
||||
this.navTitle = op.navTitle
|
||||
const param = {}
|
||||
let arr=[]
|
||||
let param={}
|
||||
if(op.needVip){
|
||||
this.isShowAll = !Boolean(op.needVip=='true')
|
||||
}
|
||||
if (this.navTitle === '顺序答题') {
|
||||
if(this.subject=='1'){
|
||||
this.questionArr = [...this.orderQuestion_subject1]
|
||||
}else if(this.subject=='4'){
|
||||
this.questionArr = [...this.orderQuestion_subject4]
|
||||
}
|
||||
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr))
|
||||
} else {
|
||||
if (this.navTitle === '错题本') {
|
||||
param.questionIdList = storage.get(`wrongList_subject${this.subject}`) || []
|
||||
} else if (this.navTitle === '收藏夹') {
|
||||
param.questionIdList = storage.get(`collectList_subject${this.subject}`) || []
|
||||
}
|
||||
if (op.questionList) {
|
||||
param.questionIdList = JSON.parse(op.questionList)
|
||||
}
|
||||
if (op.chapter) {
|
||||
param.chapter = op.chapter
|
||||
}
|
||||
if (op.examKey) {
|
||||
param.examKey = op.examKey
|
||||
}
|
||||
if(op.isError&&op.isError=='1'){
|
||||
param.isError=Number(op.isError)
|
||||
}
|
||||
if(op.isNew&&op.isNew=='1'){
|
||||
param.isNew=Number(op.isNew)
|
||||
}
|
||||
if(op.type){
|
||||
param.type=op.type
|
||||
}
|
||||
if(op.isImage){
|
||||
param.isImage=op.isImage
|
||||
if (this.subject == '1') {
|
||||
arr = [...this.orderQuestion_subject1]
|
||||
} else if (this.subject == '4') {
|
||||
arr = [...this.orderQuestion_subject4]
|
||||
}
|
||||
} else if(op.questionIdList){
|
||||
const idList=JSON.parse(op.questionIdList)
|
||||
arr = this[`orderQuestion_subject${this.subject}`].filter(qItem=>idList.includes(qItem.questionId))
|
||||
}else{
|
||||
if(op.isVip){
|
||||
param.isVip=op.isVip
|
||||
}
|
||||
param.subject=this.subject
|
||||
param.carTypeId=storage.get('carType') || '1001'
|
||||
queryQuestion(param).then(async (res) => {
|
||||
if (res.code == '0000') {
|
||||
this.questionArr = res.data
|
||||
if (this.needVip === 'true') {
|
||||
if (this.token) {
|
||||
await this.searchUserVip()
|
||||
const res = this.vipOnList.some(item => item.subjects == this.subject)
|
||||
if (!res) {
|
||||
this.questionArr = this.questionArr.slice(0, 3)
|
||||
this.isShowAll = false
|
||||
}
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
}
|
||||
}
|
||||
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr))
|
||||
}
|
||||
const resp=await queryQuestionId({
|
||||
subject:this.subject,
|
||||
carTypeId:storage.get('carType') || '1001',
|
||||
versionId:this.version,
|
||||
...params
|
||||
})
|
||||
let list=[]
|
||||
if(resp.code==='0000'){
|
||||
await this.searchUserVip()
|
||||
const res = this.vipOnList.some(item => item.subjects.includes(this.subject))
|
||||
if (!res) {
|
||||
list=resp.data.slice(0,3)
|
||||
}else{
|
||||
list=resp.data
|
||||
}
|
||||
}
|
||||
if(op.needVip){
|
||||
this.isShowAll = op.needVip
|
||||
}
|
||||
arr=this[`orderQuestion_subject${this.subject}`].filter(qItem=>list.includes(qItem.questionId))
|
||||
}
|
||||
arr.forEach(item => {
|
||||
let isCollect = false
|
||||
if (this.collectList.includes(item.questionId)) {
|
||||
isCollect = true
|
||||
}
|
||||
this.questionArr.push({
|
||||
isChoose: false,
|
||||
isCollect: isCollect,
|
||||
...item
|
||||
})
|
||||
})
|
||||
this.loading=false
|
||||
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr),this.navTitle)
|
||||
this.$refs.question.getOriginArr(JSON.stringify(this.questionArr))
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject4"]), //映射函数,取出tagslist
|
||||
...mapState(useUserStore, ["vipOnList", "token"])
|
||||
...mapState(useQuestionStore, ["orderQuestion_subject1", "orderQuestion_subject4","version"]), //映射函数,取出tagslist
|
||||
...mapState(useUserStore, ["vipOnList", "token"]),
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useUserStore, ['searchUserVip']),
|
||||
...mapActions(useQuestionStore, ['getAllQuestion']),
|
||||
changeTab(val) {
|
||||
if (val == 1) {
|
||||
let list = JSON.parse(JSON.stringify(this.questionArr))
|
||||
list = list.map(item => {
|
||||
return {
|
||||
...item,
|
||||
clickAnswer: item.trueAnswer
|
||||
clickAnswer: item.trueAnswer,
|
||||
isChoose: true,
|
||||
}
|
||||
})
|
||||
this.$refs.question.isShowBest(true)
|
||||
this.$refs.question.getQuestionList(JSON.stringify(list))
|
||||
this.$refs.question.getQuestionList(JSON.stringify(list),this.navTitle)
|
||||
} else {
|
||||
this.$refs.question.isShowBest(false)
|
||||
this.$refs.question.getQuestionList()
|
||||
|
||||
@@ -25,11 +25,9 @@
|
||||
<view class="skill-sequence-skill-wrapper" v-for="(item, index) in videoList" :key="index"
|
||||
@tap="checkVideo(item.projectId)">
|
||||
<view>
|
||||
<view class="mb10 relative">
|
||||
<view class="contain-box" style="overflow: hidden;">
|
||||
<image class="contain-box" mode="widthFix"
|
||||
<view class="mb10 relative contain-box hide" style="overflow: hidden;">
|
||||
<image class="contain-box" style="position: absolute;left: 0;top: 0;" mode="widthFix"
|
||||
:src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
|
||||
</view>
|
||||
<view v-if="projectId==item.projectId" class="playLogo">播放中</view>
|
||||
<image class="play_btn" src="../../static/image/index/play.png" />
|
||||
<text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">{{item.videoTime}}</text>
|
||||
@@ -48,10 +46,10 @@
|
||||
<text class="fs16 cor-666" @tap="popupShow=false">收起</text>
|
||||
</view>
|
||||
<view style="max-height: 800rpx;overflow-y: scroll;" class="p14lr">
|
||||
<view class="flex bc-fff mt10" style="border-radius: 16rpx;" v-for="(item,index) of videoList" :key="index"
|
||||
<view class="flex bc-fff mb15" style="border-radius: 16rpx;" v-for="(item,index) of videoList" :key="index"
|
||||
@tap="checkVideo(item.projectId)">
|
||||
<view class="pic relative" style="overflow: hidden;">
|
||||
<image class="pic" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
|
||||
<view class="pic relative hide" style="overflow: hidden;">
|
||||
<image class="pic" style="position: absolute;left: 0;top: 0;" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
|
||||
<image class="play_btn_2" src="../../static/image/index/play.png" />
|
||||
<text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">{{item.videoTime}}</text>
|
||||
</view>
|
||||
@@ -266,4 +264,10 @@
|
||||
display: inline-block;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.hide {
|
||||
backface-visibility: hidden;
|
||||
transform: translate3d(0, 0, 0);
|
||||
-webkit-backface-visibility: hidden;
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
}
|
||||
</style>
|
||||
@@ -5,23 +5,22 @@
|
||||
</u-sticky>
|
||||
<view class="p14">
|
||||
<view class="top_box">
|
||||
<view class="tip_box flex ai-c jc-sb" v-if="tIndex==0">
|
||||
<view class="tip_box flex ai-c jc-sb" v-if="tIndex==0&&showTip">
|
||||
<view class="flex ai-c">
|
||||
<u-icon name="error-circle-fill" color="#FF6E02" size="18"></u-icon>
|
||||
<text class="ml10 fs12" style="color: #FF6E02;">{{title}}</text>
|
||||
</view>
|
||||
<u-icon name="close" color="#FF6E02" size="18"></u-icon>
|
||||
<u-icon name="close" color="#FF6E02" size="18" @tap="showTip=false"></u-icon>
|
||||
</view>
|
||||
<view class="p14">
|
||||
<text class="fs18 cor-000 fw600">{{tIndex==0?'错题':'收藏'}}情况</text>
|
||||
<view class="total_box mt10">
|
||||
<view class="total_box mt10" @tap="toPractice">
|
||||
<view class="flex ai-c jc-sb">
|
||||
<view class="text-center">
|
||||
<view style="width: 111rpx;" class="fs30 cor-000">{{tIndex==0?wrongList.length:collectList.length}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="text-align: right;flex-direction: column;justify-content: right" class="flex ai-c"
|
||||
@tap="toPractice">
|
||||
<view style="text-align: right;flex-direction: column;justify-content: right" class="flex ai-c">
|
||||
<u-icon name="arrow-right" size="18"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
@@ -47,41 +46,28 @@
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex jc-sb ai-c mt10" v-if="tIndex==0">
|
||||
<!-- <view class="flex jc-sb ai-c mt10" v-if="tIndex==0">
|
||||
<text>答对后自动移除错题</text>
|
||||
<u-switch v-model="isMoveWrong" activeColor="#0BD032"></u-switch>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view style="margin-top: 30rpx;" v-if="tIndex==0">
|
||||
<view class="video-box">
|
||||
<view class="flex jc-sb ai-c wp100">
|
||||
<text style="color: #05C341;font-size: 36rpx;">科{{subject==1?'一':'四'}}精品视频课</text>
|
||||
<text class="cor-666 fs12">全部10节课 ></text>
|
||||
</view>
|
||||
<view class="flex ai-c mt20">
|
||||
<view class="contain-box relative">
|
||||
<image class="contain-box" src="../../../static/image/index/jpsp.png"></image>
|
||||
<image class="play_btn_2" src="../../static/image/index/play.png" />
|
||||
</view>
|
||||
<!-- <view class="ml15 text-center">
|
||||
<!-- <view class="ml15 text-center">
|
||||
<u-button :customStyle="{width:'200rpx',height:'66rpx',borderRadius: '33rpx'}" iconColor="#fff"
|
||||
text="去看视频" color="linear-gradient(90deg, #11DF20 0%, #00B74F 100%)" icon="play-circle">
|
||||
</u-button>
|
||||
<view class="cor-333 fs15 fw600 mt10">科{{subject==1?'一':'四'}}易错试题</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="top_box mt15 p14">
|
||||
<view class="top_box mt15 p14" v-if="typeList&&typeList.length">
|
||||
<view class="flex jc-sb aic">
|
||||
<text class="fs18 cor-000 fw600">{{tIndex==0?'错题':'收藏题'}}分类</text>
|
||||
<!-- <u-icon name="arrow-right" size="18"></u-icon> -->
|
||||
</view>
|
||||
<view class="flex ai-c jc-sb" style="flex-wrap: wrap;">
|
||||
<view v-for="(item,index) of typeList" :key="index" class="category_item p14 flex jc-sb ai-c mb10">
|
||||
<view class="flex ai-c jc-sb mt10" style="flex-wrap: wrap;">
|
||||
<!-- 这个点击效果没加 -->
|
||||
<view v-for="(item,index) of typeList" :key="index" class="category_item p14 flex jc-sb ai-c mb10" @tap="toCategoryQuestion(item)">
|
||||
<text class="cor-000">{{item.categoryName}}</text>
|
||||
<text class="cor-666">{{item.num}}</text>
|
||||
</view>
|
||||
@@ -92,6 +78,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapActions
|
||||
} from 'pinia' //引入映射函数
|
||||
import useQuestionStore from '@/jtools/store/question' //引入store
|
||||
import storage from '@/jtools/storage';
|
||||
import {
|
||||
questionCategory
|
||||
@@ -99,6 +90,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showTip: true,
|
||||
collectList: [],
|
||||
rightList: storage.get(`rightList_subject${this.subject}`) || [],
|
||||
wrongList: storage.get(`wrongList_subject${this.subject}`) || [],
|
||||
@@ -124,6 +116,7 @@
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(useQuestionStore, ["orderQuestion_subject1", "orderQuestion_subject4"]), //映射函数,取出tagslist
|
||||
getPercent() {
|
||||
return ((this.wrongList.length / (this.wrongList.length + this.rightList.length)) * 100).toFixed(0)
|
||||
}
|
||||
@@ -144,37 +137,49 @@
|
||||
this.tIndex = val.index
|
||||
this.getQuestionCategory()
|
||||
},
|
||||
toCategoryQuestion(item){
|
||||
const jsonString = JSON.stringify(item.errorQuestionIdList)
|
||||
uni.navigateTo({
|
||||
url: "/pages/questionBank/questionBank?navTitle=" + item.categoryName + "&questionIdList=" + jsonString
|
||||
})
|
||||
},
|
||||
toPractice() {
|
||||
const navTitle = this.tIndex == 0 ? '错题本' : '收藏夹'
|
||||
let arr=[]
|
||||
if (navTitle == '错题本') {
|
||||
arr = this.wrongList
|
||||
if (!this.wrongList.length) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '当前无错题,继续保持吧~',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '当前无错题,继续保持吧~',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
return
|
||||
}
|
||||
} else if (navTitle == '收藏夹') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '当前无收藏题~',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
arr=this.collectList
|
||||
if (!this.collectList.length) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '当前无收藏题~',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return
|
||||
});
|
||||
return
|
||||
}
|
||||
}
|
||||
const listJson=JSON.stringify(arr)
|
||||
uni.navigateTo({
|
||||
url: "/pages/questionBank/questionBank?navTitle=" + navTitle + "&subject=" + this.subject
|
||||
url: "/pages/questionBank/questionBank?navTitle=" + navTitle + "&subject=" + this.subject+"&questionIdList="+listJson
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -244,7 +249,7 @@
|
||||
}
|
||||
|
||||
.category_item {
|
||||
width: 312rpx;
|
||||
width: 310rpx;
|
||||
height: 90rpx;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
|
||||
Reference in New Issue
Block a user