提交
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<view class="u-back-text u-line-1 u-m-l-20" v-if="backText" :style="[backTextStyle]">{{ backText || '' }}</view>
|
<view class="u-back-text u-line-1 u-m-l-20" v-if="backText" :style="[backTextStyle]">{{ backText || '' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<slot name="left"></slot>
|
<slot name="left"></slot>
|
||||||
<view class="content fs32 fwb" :style="[{ top: statusBarHeight + 'px' }]"><slot></slot></view>
|
<view class="content fs16" :style="[{ top: statusBarHeight + 'px' }]"><slot></slot></view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<slot name="right"></slot>
|
<slot name="right"></slot>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -31,4 +31,29 @@ export function submitTest(data) {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function testTotal(data) {
|
||||||
|
return request({
|
||||||
|
url: 'driver-api/tdQuestionTest/testTotal',
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取配置
|
||||||
|
export function querySysConfigList(carTypeId,configKey) {
|
||||||
|
return request({
|
||||||
|
url: 'driver-api/tdSysConfigList/querySysConfigList?configKey='+configKey+'&carTypeId='+carTypeId,
|
||||||
|
method: 'GET',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取项目列表 (考试项目和基础操作)
|
||||||
|
export function queryProjectList(data) {
|
||||||
|
return request({
|
||||||
|
url: 'driver-api/tdTestProject/queryProjectList',
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@@ -62,12 +62,11 @@ const useUserStore = defineStore({
|
|||||||
storage.remove('userInfo')
|
storage.remove('userInfo')
|
||||||
},
|
},
|
||||||
// 查询当前用户的vip开通情况
|
// 查询当前用户的vip开通情况
|
||||||
searchUserVip() {
|
async searchUserVip() {
|
||||||
queryVip({ carTypeId: this.currentCartype,memberId: null, subject:'' }).then(resp => {
|
const resp=await queryVip({ carTypeId: this.currentCartype,memberId: null, subject:'' })
|
||||||
if(resp.code == '0000') {
|
if(resp.code == '0000') {
|
||||||
this.vipOnList = resp.data
|
this.vipOnList = resp.data
|
||||||
}
|
}
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 查询所有的vip
|
// 查询所有的vip
|
||||||
queryVipList() {
|
queryVipList() {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<view class="box-item flex ai-c jc-c">
|
<view class="box-item flex ai-c jc-c">
|
||||||
<view class="flex jc-c ai-c" style="width: 230rpx;height: 230rpx;background-image: url(../../../static/image/index/green_bg.png);background-size: 100% 100%;">
|
<view class="flex jc-c ai-c" style="width: 230rpx;height: 230rpx;background-image: url(../../../static/image/index/green_bg.png);background-size: 100% 100%;">
|
||||||
<view class="btn-item flex ai-c jc-c">
|
<view class="btn-item flex ai-c jc-c">
|
||||||
<view class="text-center cor-fff" style="line-height: 40rpx;" @tap="toAnswer('顺序答题')">
|
<view class="text-center cor-fff" style="line-height: 40rpx;" @tap="toAnswer('顺序答题',false)">
|
||||||
<view class="fs16">顺序练习</view>
|
<view class="fs16">顺序练习</view>
|
||||||
<text class="fs14">{{rightList.length+wrongList.length}}/{{orderQuestion.length}}</text>
|
<text class="fs14">{{rightList.length+wrongList.length}}/{{orderQuestion.length}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<view class="mt5">VIP课程</view>
|
<view class="mt5">VIP课程</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="wp33 flex ai-c jc-c" @tap="toAnswer('精简500题')">
|
<view class="wp33 flex ai-c jc-c" @tap="toAnswer('精简500题',true)">
|
||||||
<view class="text-center wp100">
|
<view class="text-center wp100">
|
||||||
<image style="width: 72rpx;height: 72rpx;margin: 0 auto"
|
<image style="width: 72rpx;height: 72rpx;margin: 0 auto"
|
||||||
src="../../static/image/index/500icon.png">
|
src="../../static/image/index/500icon.png">
|
||||||
@@ -134,9 +134,9 @@
|
|||||||
url:"/pages/questionBank/baseOperate"
|
url:"/pages/questionBank/baseOperate"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toAnswer(title) {
|
toAnswer(title,val) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/questionBank/questionBank?navTitle="+title+"&subject="+this.subject
|
url:"/pages/questionBank/questionBank?navTitle="+title+"&subject="+this.subject+"&needVip="+val
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toExams(){
|
toExams(){
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="box-nav">
|
<view class="box-nav">
|
||||||
<image style="width: 100%;" src="../../static/image/index/index_bg.png"></image>
|
<image style="width: 100%;" src="../../../static/image/index/index_bg.jpg"></image>
|
||||||
<view style="width: 100%;position: absolute;top: 80px;left: 0;" class="flex jc-c">
|
<view style="width: 100%;position: absolute;top: 80px;left: 0;" class="flex jc-c">
|
||||||
<image style="width: 694rpx;" mode="widthFix" src="../../../static/image/index/vipAds.png"></image>
|
<image style="width: 694rpx" mode="widthFix" src="../../../static/image/index/subject2_bg.png"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="p14lr" style="margin-top: -20px;">
|
<view class="p14lr" style="margin-top: -20px;">
|
||||||
<view class="video_box">
|
<view class="video_box">
|
||||||
<view class="flex ai-c jc-sb">
|
<view class="flex ai-c jc-sb mt5">
|
||||||
<text class="fs18 cor-000">科二考试项目讲解</text>
|
<text class="fs18 cor-000">科二考试项目讲解</text>
|
||||||
<view class="flex ai-c" style="height: 34rpx;line-height: 34rpx;">
|
<view class="flex ai-c" style="height: 34rpx;line-height: 34rpx;" @tap="changeDiverType">
|
||||||
<text style="color:#05C341;font-size: 16px;">自动挡</text>
|
<text style="color:#05C341;font-size: 16px;">{{diverTypeList[diverTypeIndex].configItemName}}</text>
|
||||||
<u-icon name="list" color="#05C341" size="18"></u-icon>
|
<u-icon name="list" color="#05C341" size="18"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex ai-c jc-sb mt15">
|
<view class="flex ai-c jc-sb mt15">
|
||||||
<view class="tab_iem" :class="videoIndex===item.value?'checked_tab':''" v-for="(item,index) of operateList" :key="index" @tap="checkVideo(item.value)">{{item.label}}</view>
|
<view class="tab_iem" :class="videoIndex===item.value?'checked_tab':''" v-for="(item,index) of operateList" :key="index" @tap="checkVideo(index)">{{item.description}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt15">
|
<view class="mt15">
|
||||||
<video style="width: 100%;height: 362rpx;border-radius: 16rpx;" id="myVideo" src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4"></video>
|
<video style="width: 100%;height: 362rpx;border-radius: 16rpx;" id="myVideo" :src="operateList[videoIndex].videoList[0].videoUrl"></video>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="video_box mt10">
|
<view class="video_box mt10">
|
||||||
@@ -35,27 +35,56 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
querySysConfigList,
|
||||||
|
queryProjectList
|
||||||
|
} from '@/jtools/api/question';
|
||||||
|
import storage from '@/jtools/storage';
|
||||||
export default {
|
export default {
|
||||||
name: "Subject2",
|
name: "Subject2",
|
||||||
data(){
|
props:{
|
||||||
return{
|
subject:{
|
||||||
videoIndex:0,
|
type:[String,Number]
|
||||||
operateList:[{
|
|
||||||
label:"侧方停车",
|
|
||||||
value:0,
|
|
||||||
},{
|
|
||||||
label:"倒车入库",
|
|
||||||
value:1
|
|
||||||
},{
|
|
||||||
label:"曲线行驶",
|
|
||||||
value:2
|
|
||||||
},{
|
|
||||||
label:"直角转弯",
|
|
||||||
value:3
|
|
||||||
}]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
diverTypeIndex:0,
|
||||||
|
diverTypeList:[],
|
||||||
|
videoIndex:0,
|
||||||
|
operateList:[]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async mounted(){
|
||||||
|
await this.getDiverType()
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
getVideoList(){
|
||||||
|
console.log('index',this.diverTypeIndex);
|
||||||
|
console.log(this.diverTypeList[this.diverTypeIndex]);
|
||||||
|
queryProjectList({
|
||||||
|
"carTypeId": storage.get('carType') || '1001',
|
||||||
|
"driveType": this.diverTypeList[this.diverTypeIndex].configItemCode,
|
||||||
|
"subject": String(this.subject),
|
||||||
|
"projectId":'1001',
|
||||||
|
"type": "1"
|
||||||
|
}).then(resp=>{
|
||||||
|
this.operateList=resp.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDiverType(){
|
||||||
|
const carTypeId=storage.get('carType') || '1001'
|
||||||
|
querySysConfigList(carTypeId,'DriveType').then(resp=>{
|
||||||
|
if(resp.code==='0000'){
|
||||||
|
this.diverTypeList=resp.data
|
||||||
|
this.getVideoList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
changeDiverType(){
|
||||||
|
this.diverTypeIndex=this.diverTypeIndex==0?1:0
|
||||||
|
this.getVideoList()
|
||||||
|
},
|
||||||
checkVideo(val){
|
checkVideo(val){
|
||||||
this.videoIndex=val
|
this.videoIndex=val
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<u-sticky bgColor="#fff">
|
<u-sticky bgColor="#fff">
|
||||||
<u-tabs :list="categoryList" :scrollable="false" @click="changeCategory"></u-tabs>
|
<u-tabs :list="categoryList" :scrollable="false" @change="changeCategory"></u-tabs>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<view style="height: 100vh;background-color: rgb(245, 245, 245);">
|
<view style="height: 100vh;background-color: rgb(245, 245, 245);">
|
||||||
<template v-if="tIndex===0 || tIndex===3">
|
<template v-if="tIndex===0 || tIndex===3">
|
||||||
<Subject1 :subject="tIndex+1" />
|
<Subject1 :subject="tIndex+1" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<subject2 />
|
<subject2 :subject="tIndex+1" />
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -40,10 +40,15 @@
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
...mapActions(useQuestionStore,['getOrderQuestion']),
|
||||||
//切换科目
|
//切换科目
|
||||||
changeCategory(val){
|
changeCategory(val){
|
||||||
this.tIndex=val.index
|
this.tIndex=val.index
|
||||||
console.log(this.tIndex);
|
if(this.tIndex==0){
|
||||||
|
this.getOrderQuestion('1')
|
||||||
|
}else if(this.tIndex==3){
|
||||||
|
this.getOrderQuestion('4')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +1,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="chapter_item p14" v-for="(item,index) of chapterList" :key="index" @tap="toQuestion">
|
<view class="chapter_item p14" v-for="(item,index) of chapterList" :key="index" @tap="toQuestion(item.configItemCode)">
|
||||||
{{item.label}}
|
{{item.configItemName}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
querySysConfigList
|
||||||
|
} from '@/jtools/api/question';
|
||||||
|
import storage from '@/jtools/storage';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chapterList:[
|
chapterList:[]
|
||||||
{label:'驾驶证申请相关'},
|
|
||||||
{label:'驾驶证申请相关'},
|
|
||||||
{label:'驾驶证登记处罚'},
|
|
||||||
{label:'机动车强制报废'},
|
|
||||||
{label:'其他考点'},
|
|
||||||
{label:'驾驶证登记处罚'},
|
|
||||||
{label:'机动车强制报废'},
|
|
||||||
{label:'其他考点'}]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(){
|
||||||
|
this.getChapterList()
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
toQuestion(){
|
getChapterList(){
|
||||||
|
const carTypeId=storage.get('carType') || '1001'
|
||||||
|
querySysConfigList(carTypeId,'ChapterOfSubjectOne').then(resp=>{
|
||||||
|
if(resp.code==='0000'){
|
||||||
|
this.chapterList=resp.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toQuestion(code){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/questionBank/questionBank?navTitle="+章节技巧
|
url:"/pages/questionBank/questionBank?navTitle=章节技巧&chapter="+code
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,7 +141,7 @@
|
|||||||
<text class="cor-666">题板</text>
|
<text class="cor-666">题板</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex ai-c jc-sb p14" style="flex-wrap: wrap;max-height: 400px;overflow-y: scroll;">
|
<view class="flex ai-c jc-fs p14" style="flex-wrap: wrap;max-height: 400px;overflow-y: scroll;">
|
||||||
<view v-for="(item,index) of questionList" :key="index" style="width:20%;" class="flex ai-c jc-c" @tap="chooseQueston(index)">
|
<view v-for="(item,index) of questionList" :key="index" style="width:20%;" class="flex ai-c jc-c" @tap="chooseQueston(index)">
|
||||||
<view class="tCircle mb10" :class="{
|
<view class="tCircle mb10" :class="{
|
||||||
'active':index == topicIndex,
|
'active':index == topicIndex,
|
||||||
@@ -316,20 +316,23 @@ export default {
|
|||||||
"carTypeId": storage.get('carType') || '1001',
|
"carTypeId": storage.get('carType') || '1001',
|
||||||
"score": score,
|
"score": score,
|
||||||
"testTime": 60*60-restTime,
|
"testTime": 60*60-restTime,
|
||||||
|
subject:this.subject
|
||||||
}).then(resp=>{
|
}).then(resp=>{
|
||||||
const doNotNum=this.questionList.length-this.rightList.length-this.wrongList.length
|
const doNotNum=this.questionList.length-this.rightList.length-this.wrongList.length
|
||||||
const list = JSON.stringify(this.wrongList)
|
const list = JSON.stringify(this.wrongList)
|
||||||
if(resp.code==='0000'){
|
if(resp.code==='0000'){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/questionBank/examResult?doNotNum="+doNotNum+"&wrongList="+list+"&score="+score+"&subject="+this.subject
|
url:"/pages/questionBank/examResult?doNotNum="+doNotNum+"&wrongList="+list+"&score="+score+"&subject="+this.subject+"&navTitle="+this.navTitle
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//查看考试结果
|
//查看考试结果
|
||||||
toResult(){
|
toResult(){
|
||||||
|
const allDoNum=this.wrongList.length+this.rightList.length
|
||||||
|
const list = JSON.stringify(this.wrongList)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/questionBank/practiceResult"
|
url:"/pages/questionBank/practiceResult?allDoNum="+allDoNum+"&wrongList="+list+"&subject="+this.subject+"&navTitle="+this.navTitle
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toCollect(){
|
toCollect(){
|
||||||
@@ -430,6 +433,7 @@ export default {
|
|||||||
// 选择题目
|
// 选择题目
|
||||||
pickerTopic(index) {
|
pickerTopic(index) {
|
||||||
this.topicIndex = index;
|
this.topicIndex = index;
|
||||||
|
this.index=this.topicIndex
|
||||||
this.getCurrentIndex(this.topicIndex,this.subject)
|
this.getCurrentIndex(this.topicIndex,this.subject)
|
||||||
this.renderSwiper(index);
|
this.renderSwiper(index);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<view>{{wrongList.length}}</view>
|
<view>{{wrongList.length}}</view>
|
||||||
<text>看错题</text>
|
<text>看错题</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-center wp33 flex jc-c ai-c" style="flex-direction: column;">
|
<view class="text-center wp33 flex jc-c ai-c" style="flex-direction: column;" @tap="toExams">
|
||||||
<u-icon name="edit-pen" size="28"></u-icon>
|
<u-icon name="edit-pen" size="28"></u-icon>
|
||||||
<text>重新考试</text>
|
<text>重新考试</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -40,18 +40,26 @@
|
|||||||
<text style="color: #00B74F;position: absolute;right:33px;top:-13px">及格线</text>
|
<text style="color: #00B74F;position: absolute;right:33px;top:-13px">及格线</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="wp100 text-center bc-fff pb10">
|
||||||
|
<text>近五次模考成绩</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import GradesChart from "./components/GradesChart.vue"
|
import GradesChart from "./components/GradesChart.vue"
|
||||||
|
import storage from '@/jtools/storage';
|
||||||
|
import {
|
||||||
|
testTotal
|
||||||
|
} from '@/jtools/api/question';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
GradesChart
|
GradesChart
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
navTitle:"模拟考试",
|
||||||
subject:1,
|
subject:1,
|
||||||
doNotNum:0,
|
doNotNum:0,
|
||||||
wrongList:undefined,
|
wrongList:undefined,
|
||||||
@@ -104,33 +112,49 @@
|
|||||||
if(op.subject){
|
if(op.subject){
|
||||||
this.subject=op.subject
|
this.subject=op.subject
|
||||||
}
|
}
|
||||||
|
if(op.navTitle){
|
||||||
|
this.navTitle=op.navTitle
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
this.getServerData();
|
this.getServerData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getServerData() {
|
getServerData() {
|
||||||
//模拟从服务器获取数据时的延时
|
testTotal({
|
||||||
setTimeout(() => {
|
"carTypeId": storage.get('carType') || '1001',
|
||||||
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
|
"subject": this.subject
|
||||||
let res = {
|
}).then(resp=>{
|
||||||
categories: ["2018","2019","2020","2021","2022","2023"],
|
if(resp.code==='0000'){
|
||||||
series: [{
|
if(resp.data&&resp.data.recentTestList&&resp.data.recentTestList.length){
|
||||||
name: "",
|
const scoreList =resp.data.recentTestList.map(item=>{
|
||||||
data: [this.score]
|
return item.score
|
||||||
},
|
})
|
||||||
]
|
let res = {
|
||||||
};
|
categories: ["第一次","第二次","第三次","第四次","第五次"],
|
||||||
this.chartData = JSON.parse(JSON.stringify(res));
|
series: [{
|
||||||
}, 500);
|
name: "",
|
||||||
|
data: scoreList
|
||||||
|
},
|
||||||
|
]
|
||||||
|
};
|
||||||
|
this.chartData = JSON.parse(JSON.stringify(res));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
toQuestionBank(){
|
toQuestionBank(){
|
||||||
console.log('result');
|
|
||||||
const list =JSON.stringify(this.wrongList)
|
const list =JSON.stringify(this.wrongList)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/questionBank/questionBank?navTitle=错题&subject="+this.subject+"&questionList="+list
|
url:"/pages/questionBank/questionBank?navTitle=错题&subject="+this.subject+"&questionList="+list
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
//重新考试
|
||||||
|
toExams(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/questionBank/practiceExams?subject="+this.subject
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!-- <u-navbar title="模拟考试" @rightClick="rightClick" :autoBack="true">
|
<!-- <u-navbar title="模拟考试" @rightClick="rightClick" :autoBack="true">
|
||||||
</u-navbar> -->
|
</u-navbar> -->
|
||||||
<j-navbar :isDefineBack="true" @toBack="toBack">模拟考试</j-navbar>
|
<j-navbar :isDefineBack="true" @toBack="toBack">模拟考试</j-navbar>
|
||||||
<Question ref="question" :tabsList="tabsList" v-model:isSubmit="isSubmit" type="exam" :subject="subject" />
|
<Question ref="question" :tabsList="tabsList" v-model:isSubmit="isSubmit" type="exam" :subject="subject" navTitle="模拟考试" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -3,16 +3,16 @@
|
|||||||
<!-- <u-navbar title="本次练题结果" @rightClick="rightClick" :autoBack="true"></u-navbar>-->
|
<!-- <u-navbar title="本次练题结果" @rightClick="rightClick" :autoBack="true"></u-navbar>-->
|
||||||
<j-navbar backPath="/pages/index/index">本次练题结果</j-navbar>
|
<j-navbar backPath="/pages/index/index">本次练题结果</j-navbar>
|
||||||
<view class="p14 wp100">
|
<view class="p14 wp100">
|
||||||
<GradesChart />
|
<GradesChart :titleName="rightPencentDesc" :actualValue="Number(rightPencent)" />
|
||||||
<view class="top_box flex jc-c" style="flex-direction: column;">
|
<view class="top_box flex jc-c" style="flex-direction: column;">
|
||||||
<view class="wp100 text-center" >
|
<view class="wp100 text-center" >
|
||||||
<text>太棒了!正确率很高了!</text>
|
<text>太棒了!正确率很高了!</text>
|
||||||
<view class="flex ai-c jc-c mt10">
|
<view class="flex ai-c jc-c mt10">
|
||||||
<view class="text-center wp50">
|
<view class="text-center wp50" @tap="toQuestionBank">
|
||||||
<view>1/3</view>
|
<view>{{wrongList.length}}/{{allDoNum}}</view>
|
||||||
<text>本次错题</text>
|
<text>本次错题</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-center wp50 flex jc-c ai-c" style="flex-direction: column;">
|
<view class="text-center wp50 flex jc-c ai-c" style="flex-direction: column;" @tap="toContiune">
|
||||||
<u-icon name="file-text" size="28"></u-icon>
|
<u-icon name="file-text" size="28"></u-icon>
|
||||||
<text>继续做题</text>
|
<text>继续做题</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -27,10 +27,10 @@
|
|||||||
<text class="fs18 cor-000 fw600">累计练题</text>
|
<text class="fs18 cor-000 fw600">累计练题</text>
|
||||||
<text class="fs14 cor-666 ml10">33题</text>
|
<text class="fs14 cor-666 ml10">33题</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="fs14 cor-666">未做题2311题</text>
|
<text class="fs14 cor-666">未做题{{getNotDoNum}}题</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt10">
|
<view class="mt10">
|
||||||
<u-line-progress :percentage="20" activeColor="#05C341" height="16"></u-line-progress>
|
<u-line-progress :percentage="percent" activeColor="#05C341" height="16"></u-line-progress>
|
||||||
</view>
|
</view>
|
||||||
<view class="p14 mt10 flex ai-c jc-sb" style="border-radius: 20rpx;background-color: rgb(253,249,238);">
|
<view class="p14 mt10 flex ai-c jc-sb" style="border-radius: 20rpx;background-color: rgb(253,249,238);">
|
||||||
<view>
|
<view>
|
||||||
@@ -47,6 +47,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
mapState,
|
||||||
|
mapActions
|
||||||
|
} from 'pinia' //引入映射函数
|
||||||
|
import storage from '@/jtools/storage';
|
||||||
|
import useQuestionStore from '@/jtools/store/question' //引入store
|
||||||
import GradesChart from "./components/GradesChart.vue"
|
import GradesChart from "./components/GradesChart.vue"
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -54,11 +60,54 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
rightPencent:0,
|
||||||
|
rightPencentDesc:'',
|
||||||
|
allDoNum:0,
|
||||||
|
wrongList:[],
|
||||||
|
subject:1,
|
||||||
|
allRightList:[],
|
||||||
|
allWrongList:[],
|
||||||
|
percent:undefined,
|
||||||
|
navTitle:'顺序练习',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(op){
|
||||||
|
if(op.allDoNum){
|
||||||
|
this.allDoNum=op.allDoNum
|
||||||
|
}
|
||||||
|
if(op.navTitle){
|
||||||
|
this.navTitle=op.navTitle
|
||||||
|
}
|
||||||
|
if(op.wrongList){
|
||||||
|
this.wrongList=JSON.parse(op.wrongList)
|
||||||
|
this.rightPencent=((this.allDoNum-this.wrongList.length)/this.allDoNum).toFixed(2)
|
||||||
|
this.rightPencentDesc=(this.rightPencent*100).toFixed(0)+'%'
|
||||||
|
}
|
||||||
|
if(op.subject){
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(useQuestionStore, ["orderQuestion"]), //映射函数,取出tagslist
|
||||||
|
getNotDoNum(){
|
||||||
|
return this.orderQuestion.length-(this.allRightList.length+this.allWrongList.length)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
toQuestionBank(){
|
||||||
|
const list =JSON.stringify(this.wrongList)
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/questionBank/questionBank?navTitle=错题&subject="+this.subject+"&questionList="+list
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toContiune(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/questionBank/questionBank?navTitle="+this.navTitle+"&subject="+this.subject
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!-- <u-navbar :title="navTitle" @rightClick="rightClick" :autoBack="true">
|
<!-- <u-navbar :title="navTitle" @rightClick="rightClick" :autoBack="true">
|
||||||
</u-navbar> -->
|
</u-navbar> -->
|
||||||
<j-navbar>{{navTitle}}</j-navbar>
|
<j-navbar>{{navTitle}}</j-navbar>
|
||||||
<Question ref="question" :tabsList="tabsList" :isShowAll="true" :subject="subject" :navTitle="navTitle"></Question>
|
<Question ref="question" :tabsList="tabsList" :isShowAll="isShowAll" :subject="subject" :navTitle="navTitle"></Question>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
mapActions
|
mapActions
|
||||||
} from 'pinia' //引入映射函数
|
} from 'pinia' //引入映射函数
|
||||||
import useQuestionStore from '@/jtools/store/question' //引入store
|
import useQuestionStore from '@/jtools/store/question' //引入store
|
||||||
|
import useUserStore from '@/jtools/store/user'
|
||||||
import Question from './components/Question.vue';
|
import Question from './components/Question.vue';
|
||||||
import {
|
import {
|
||||||
queryQuestion
|
queryQuestion
|
||||||
@@ -24,6 +25,8 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isShowAll:true,
|
||||||
|
needVip:false,
|
||||||
subject:1,
|
subject:1,
|
||||||
navTitle:'',
|
navTitle:'',
|
||||||
tabsList:[{
|
tabsList:[{
|
||||||
@@ -36,36 +39,60 @@
|
|||||||
questionArr:[]
|
questionArr:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(op) {
|
async onLoad(op) {
|
||||||
|
if(op.needVip){
|
||||||
|
this.needVip=op.needVip
|
||||||
|
}
|
||||||
if(op&&op.navTitle){
|
if(op&&op.navTitle){
|
||||||
this.navTitle=op.navTitle
|
this.navTitle=op.navTitle
|
||||||
const param={}
|
const param={}
|
||||||
if(this.navTitle==='顺序答题'){
|
if(this.navTitle==='顺序答题'||this.navTitle==='精简500题'){
|
||||||
this.questionArr=[...this.orderQuestion]
|
this.questionArr=[...this.orderQuestion]
|
||||||
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr))
|
if(this.needVip==='true'){
|
||||||
}else if(this.navTitle==='错题本'){
|
if(this.token){
|
||||||
param.questionIdList=storage.get(`wrongList_subject${this.subject}`) || []
|
await this.searchUserVip()
|
||||||
}else if(this.navTitle==='收藏夹'){
|
const res=this.vipOnList.some(item=>item.subject==this.subject)
|
||||||
param.questionIdList=storage.get(`collectList_subject${this.subject}`) || []
|
if(!res){
|
||||||
}
|
this.questionArr=this.questionArr.slice(0,3)
|
||||||
if(op.questionList){
|
this.isShowAll=false
|
||||||
param.questionList=JSON.parse(op.questionList)
|
}
|
||||||
}
|
}else{
|
||||||
queryQuestion(param).then(res => {
|
uni.redirectTo({
|
||||||
if (res.code == '0000') {
|
url: '/pages/login/login'
|
||||||
this.questionArr = res.data
|
});
|
||||||
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr))
|
}
|
||||||
}
|
}
|
||||||
})
|
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
|
||||||
|
}
|
||||||
|
queryQuestion(param).then(res => {
|
||||||
|
if (res.code == '0000') {
|
||||||
|
this.questionArr = res.data
|
||||||
|
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(op.subject){
|
if(op.subject){
|
||||||
this.subject=op.subject
|
this.subject=op.subject
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useQuestionStore, ["orderQuestion"]) //映射函数,取出tagslist
|
...mapState(useQuestionStore, ["orderQuestion"]) ,//映射函数,取出tagslist
|
||||||
|
...mapState(useUserStore, ["vipOnList","token"])
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions(useUserStore,['searchUserVip']),
|
||||||
rightClick() {
|
rightClick() {
|
||||||
console.log('返回');
|
console.log('返回');
|
||||||
},
|
},
|
||||||
|
|||||||
BIN
src/static/image/index/subject2_bg.png
Normal file
BIN
src/static/image/index/subject2_bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB |
Reference in New Issue
Block a user