提交
This commit is contained in:
@@ -27,4 +27,5 @@ export default {
|
|||||||
/*每个页面公共css */
|
/*每个页面公共css */
|
||||||
@import "uni_modules/uview-plus/index.scss";
|
@import "uni_modules/uview-plus/index.scss";
|
||||||
@import "static/style/index.scss";
|
@import "static/style/index.scss";
|
||||||
|
button::after{ border: none;}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -140,8 +140,8 @@ export default {
|
|||||||
.cu-bar {
|
.cu-bar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.content {
|
.content {
|
||||||
// width: 350rpx;
|
width: 350rpx;
|
||||||
display: flex;
|
// display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ export function questionCategory(data) {
|
|||||||
return request({
|
return request({
|
||||||
url: 'driver-api/tdQuestion/questionCategory',
|
url: 'driver-api/tdQuestion/questionCategory',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data,
|
||||||
|
noToken: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +46,8 @@ export function testTotal(data) {
|
|||||||
export function querySysConfigList(carTypeId, configKey) {
|
export function querySysConfigList(carTypeId, configKey) {
|
||||||
return request({
|
return request({
|
||||||
url: 'driver-api/tdSysConfigList/querySysConfigList?configKey=' + configKey + '&carTypeId=' + carTypeId,
|
url: 'driver-api/tdSysConfigList/querySysConfigList?configKey=' + configKey + '&carTypeId=' + carTypeId,
|
||||||
method: 'GET'
|
method: 'GET',
|
||||||
|
noToken: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,6 +56,7 @@ export function queryProjectList(data) {
|
|||||||
return request({
|
return request({
|
||||||
url: 'driver-api/tdTestProject/queryProjectList',
|
url: 'driver-api/tdTestProject/queryProjectList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data,
|
||||||
|
noToken:true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,10 @@
|
|||||||
<image style="width: 100%;" src="../../static/image/index/index_bg.jpg"></image>
|
<image style="width: 100%;" src="../../static/image/index/index_bg.jpg"></image>
|
||||||
<view class="center-box flex jc-sb ai-c">
|
<view class="center-box flex jc-sb ai-c">
|
||||||
<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 relative" style="width: 230rpx;height: 230rpx;" @tap="toAnswer('顺序答题',false)">
|
||||||
|
<image style="width: 230rpx;height: 230rpx;position: absolute;left: 0;top: 0;" src="../../../static/image/index/green_bg.png"></image>
|
||||||
<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('顺序答题',false)">
|
<view class="text-center cor-fff" style="line-height: 40rpx;">
|
||||||
<view class="fs16">顺序练习</view>
|
<view class="fs16">顺序练习</view>
|
||||||
<text class="fs14">{{getDoNum}}/{{subject=='1'?orderQuestion_subject1.length:orderQuestion_subject4.length}}</text>
|
<text class="fs14">{{getDoNum}}/{{subject=='1'?orderQuestion_subject1.length:orderQuestion_subject4.length}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -14,9 +15,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<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/orange_bg.png);background-size: 100% 100%;">
|
<view class="flex jc-c ai-c relative" style="width: 230rpx;height: 230rpx;" @tap="toExams">
|
||||||
|
<image style="width: 230rpx;height: 230rpx;position: absolute;left: 0;top: 0;" src="../../../static/image/index/orange_bg.png"></image>
|
||||||
<view class="btn2-item flex ai-c jc-c">
|
<view class="btn2-item flex ai-c jc-c">
|
||||||
<view class="text-center cor-fff" style="line-height: 40rpx;" @tap="toExams">
|
<view class="text-center cor-fff" style="line-height: 40rpx;">
|
||||||
<view class="fs16">模拟考试</view>
|
<view class="fs16">模拟考试</view>
|
||||||
<text class="fs14">去考试</text>
|
<text class="fs14">去考试</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -174,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
toExclusive(){
|
toExclusive(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/questionBank/exclusiveExercise"
|
url:"/pages/questionBank/exclusiveExercise?subject="+this.subject
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toWrongList(){
|
toWrongList(){
|
||||||
|
|||||||
@@ -74,6 +74,15 @@ export default {
|
|||||||
await this.getDiverType()
|
await this.getDiverType()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
getOperateList(){
|
||||||
|
queryProjectList({
|
||||||
|
"carTypeId": storage.get('carType') || '1001',
|
||||||
|
"subject": String(this.subject),
|
||||||
|
"type": "2"
|
||||||
|
}).then(resp=>{
|
||||||
|
console.log(resp);
|
||||||
|
})
|
||||||
|
},
|
||||||
toVideo(){
|
toVideo(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/questionBank/videoDetail?driveType="+this.diverTypeList[this.diverTypeIndex].configItemCode+"&subject="+this.subject+"&projectId="+this.projectId+"&type=1"
|
url:"/pages/questionBank/videoDetail?driveType="+this.diverTypeList[this.diverTypeIndex].configItemCode+"&subject="+this.subject+"&projectId="+this.projectId+"&type=1"
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
<u-tabs :list="categoryList" :current="curTab" :scrollable="false" @change="changeCategory"></u-tabs>
|
<u-tabs :list="categoryList" :current="curTab" :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="subject=='1' || subject=='4'">
|
||||||
<Subject1 :subject="tIndex+1" :rightList="rightList" :wrongList="wrongList" />
|
<Subject1 :subject="subject" :rightList="rightList" :wrongList="wrongList" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<subject2 :subject="tIndex+1" ref="subjectRef" />
|
<subject2 :subject="subject" ref="subjectRef" />
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -17,53 +17,66 @@
|
|||||||
import { mapState,mapActions } from 'pinia' //引入映射函数
|
import { mapState,mapActions } from 'pinia' //引入映射函数
|
||||||
import useQuestionStore from '@/jtools/store/question' //引入store
|
import useQuestionStore from '@/jtools/store/question' //引入store
|
||||||
import storage from '@/jtools/storage';
|
import storage from '@/jtools/storage';
|
||||||
|
import {
|
||||||
|
querySysConfigList,
|
||||||
|
} from '@/jtools/api/question';
|
||||||
import Subject1 from "./components/Subject1";
|
import Subject1 from "./components/Subject1";
|
||||||
import Subject2 from "./components/Subject2";
|
import Subject2 from "./components/Subject2";
|
||||||
export default {
|
export default {
|
||||||
components: {Subject1,Subject2},
|
components: {Subject1,Subject2},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
subject:storage.get('curSubject') || '1',
|
||||||
curTab:Number(storage.get('curSubject'))-1,
|
curTab:Number(storage.get('curSubject'))-1,
|
||||||
tIndex:Number(storage.get('curSubject'))-1,
|
|
||||||
searchValue:'',
|
searchValue:'',
|
||||||
cityName:'',
|
cityName:'',
|
||||||
categoryList:[{
|
categoryList:[],
|
||||||
name:'科目1'
|
rightList:storage.get(`rightList_subject${this.subject}`) || [],
|
||||||
},{
|
wrongList:storage.get(`wrongList_subject${this.subject}`) || [],
|
||||||
name:'科目2'
|
|
||||||
},{
|
|
||||||
name:'科目3'
|
|
||||||
},{
|
|
||||||
name:'科目4'
|
|
||||||
}],
|
|
||||||
rightList:storage.get(`rightList_subject${this.tIndex+1}`) || [],
|
|
||||||
wrongList:storage.get(`wrongList_subject${this.tIndex+1}`) || [],
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad(){
|
||||||
|
this.getSubjectConfig()
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if(this.tIndex==0||this.tIndex==3){
|
if(this.subject=='1'||this.subject=='4'){
|
||||||
this.rightList=storage.get(`rightList_subject${this.tIndex+1}`) || []
|
this.rightList=storage.get(`rightList_subject${this.subject}`) || []
|
||||||
this.wrongList=storage.get(`wrongList_subject${this.tIndex+1}`) || []
|
this.wrongList=storage.get(`wrongList_subject${this.subject}`) || []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
...mapActions(useQuestionStore,['getOrderQuestion_sub4','getOrderQuestion_sub1','changeSubject']),
|
...mapActions(useQuestionStore,['getOrderQuestion_sub4','getOrderQuestion_sub1','changeSubject']),
|
||||||
|
//获取科目配置
|
||||||
|
getSubjectConfig(){
|
||||||
|
const carTypeId=storage.get('carType') || '1001'
|
||||||
|
querySysConfigList(carTypeId,'Subject').then(resp=>{
|
||||||
|
if(resp.code==='0000'){
|
||||||
|
this.categoryList=resp.data.map(item=>{
|
||||||
|
return{
|
||||||
|
...item,
|
||||||
|
name:item.configItemName
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
//切换科目
|
//切换科目
|
||||||
async changeCategory(val){
|
async changeCategory(val){
|
||||||
this.tIndex=val.index
|
this.subject=val.configItemCode
|
||||||
if(this.tIndex==0){
|
console.log();
|
||||||
|
if(this.subject=='1'){
|
||||||
await this.getOrderQuestion_sub1()
|
await this.getOrderQuestion_sub1()
|
||||||
}else if(this.tIndex==3){
|
}else if(this.subject=='4'){
|
||||||
await this.getOrderQuestion_sub4()
|
await this.getOrderQuestion_sub4()
|
||||||
}else{
|
}else{
|
||||||
this.changeSubject(val.index+1)
|
this.changeSubject(this.subject)
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.$refs.subjectRef.getDiverType()
|
this.$refs.subjectRef.getDiverType()
|
||||||
},100)
|
},100)
|
||||||
}
|
}
|
||||||
if(this.tIndex==0||this.tIndex==3){
|
if(this.subject=='1'||this.subject=='4'){
|
||||||
this.rightList=storage.get(`rightList_subject${this.tIndex+1}`) || []
|
this.rightList=storage.get(`rightList_subject${this.subject}`) || []
|
||||||
this.wrongList=storage.get(`wrongList_subject${this.tIndex+1}`) || []
|
this.wrongList=storage.get(`wrongList_subject${this.subject}`) || []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="m14lr">
|
<view class="m14lr">
|
||||||
<text class="tag_box">{{getQuestType(quesItem.type)}}</text>
|
<text class="tag_box">{{getQuestType(quesItem.type)}}</text>
|
||||||
<text class="fs18">{{quesItem.question}}</text>
|
<text class="fs18" style="line-height: 42rpx;vertical-align: middle;">{{quesItem.question}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="p14" v-if="quesItem.imageUrl">
|
<view class="p14" v-if="quesItem.imageUrl">
|
||||||
<image style="width: 100%;" mode="widthFix" :src="quesItem.imageUrl"></image>
|
<image style="width: 100%;" mode="widthFix" :src="quesItem.imageUrl"></image>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
<view class="m14lr mt30"
|
<view class="m14lr mt30"
|
||||||
v-if="quesItem.clickAnswer&&!quesItem.trueAnswer.includes(quesItem.clickAnswer)">
|
v-if="quesItem.clickAnswer&&!quesItem.trueAnswer.includes(quesItem.clickAnswer) || showBestAnswer">
|
||||||
<view class="answer_box">
|
<view class="answer_box">
|
||||||
<text class="fs18 fw600 cor-000">答案:{{getRightOp(quesItem.trueAnswer)}}</text>
|
<text class="fs18 fw600 cor-000">答案:{{getRightOp(quesItem.trueAnswer)}}</text>
|
||||||
<view class="fs18 cor-000" style="text-indent:2em;"> {{quesItem.bestAnswer}}</view>
|
<view class="fs18 cor-000" style="text-indent:2em;"> {{quesItem.bestAnswer}}</view>
|
||||||
@@ -263,6 +263,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showBestAnswer:false,
|
||||||
nowPrice:68,
|
nowPrice:68,
|
||||||
showVip:false,
|
showVip:false,
|
||||||
popupShow:false,
|
popupShow:false,
|
||||||
@@ -304,6 +305,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(useQuestionStore,['getCurrentIndex']),
|
...mapActions(useQuestionStore,['getCurrentIndex']),
|
||||||
|
isShowBest(val){
|
||||||
|
this.showBestAnswer=val
|
||||||
|
},
|
||||||
duoxuan(val){
|
duoxuan(val){
|
||||||
if(val&&val.length>1){
|
if(val&&val.length>1){
|
||||||
this.questionList[this.topicIndex].isChoose=true
|
this.questionList[this.topicIndex].isChoose=true
|
||||||
@@ -694,6 +698,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tag_box {
|
.tag_box {
|
||||||
|
vertical-align: middle;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 78rpx;
|
width: 78rpx;
|
||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<u-grid :border="false" col="4">
|
<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)">
|
<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;">
|
<view style="width: 84rpx;height: 84rpx;">
|
||||||
<image style="width: 84rpx;" mode="widthFix" :src="listItem.image"></image>
|
<image style="width: 84rpx;height: 100rpx;" mode="widthFix" :src="listItem.image"></image>
|
||||||
</view>
|
</view>
|
||||||
<text class="grid-text fs14 cor-000">{{listItem.title}}</text>
|
<text class="grid-text fs14 cor-000">{{listItem.title}}</text>
|
||||||
<text class="grid-text mb10 fs12 cor-999">{{listItem.subTitle}}</text>
|
<text class="grid-text mb10 fs12 cor-999">{{listItem.subTitle}}</text>
|
||||||
@@ -30,10 +30,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="mt14 p14 bc-fff" style="border-radius: 20rpx;">
|
<view class="mt14 p14 bc-fff" style="border-radius: 20rpx;">
|
||||||
<text class="fs18 cor-000 fw600">常见考点</text>
|
<text class="fs18 cor-000 fw600">常见考点</text>
|
||||||
<view class="flex ai-c wp100 mt15" style="flex-wrap: wrap;">
|
<view class="flex ai-c wp100 mt10" style="flex-wrap: wrap;">
|
||||||
<view class="wp50 flex ai-c mb25" v-for="(item,index) of testCenterList" :key="index" @tap="toQuestionBank(item)">
|
<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>
|
<view class="dot_item">{{index+1}}</view>
|
||||||
<text class="ml5">{{item.configItemName}}</text>
|
<text class="ml5 topic_cont_text" style="width: calc(100% - 65rpx);">{{item.configItemName}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -85,16 +85,21 @@
|
|||||||
isError:0,
|
isError:0,
|
||||||
image:neverWriteIcon
|
image:neverWriteIcon
|
||||||
}],
|
}],
|
||||||
testCenterList:[]
|
testCenterList:[],
|
||||||
|
subject:'1'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(op){
|
||||||
|
if(op.subject){
|
||||||
|
this.subject=op.subject
|
||||||
|
}
|
||||||
this.getExamPoint()
|
this.getExamPoint()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getExamPoint(){
|
getExamPoint(){
|
||||||
const carTypeId=storage.get('carType') || '1001'
|
const carTypeId=storage.get('carType') || '1001'
|
||||||
querySysConfigList(carTypeId,'ExamKeys').then(resp=>{
|
const examKey = this.subject=='1'?'ExamKeysOfSubjectOne':'ExamKeysOfSubjectFour'
|
||||||
|
querySysConfigList(carTypeId,examKey).then(resp=>{
|
||||||
if(resp.code==='0000'){
|
if(resp.code==='0000'){
|
||||||
this.testCenterList=resp.data
|
this.testCenterList=resp.data
|
||||||
}
|
}
|
||||||
@@ -128,10 +133,20 @@
|
|||||||
.dot_item{
|
.dot_item{
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
line-height: 40rpx;
|
line-height: 41rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: #0BD032;
|
background: #0BD032;
|
||||||
border-radius: 50%;
|
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; /** 显示的行数 **/
|
||||||
|
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -116,8 +116,10 @@
|
|||||||
clickAnswer: item.trueAnswer
|
clickAnswer: item.trueAnswer
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.$refs.question.isShowBest(true)
|
||||||
this.$refs.question.getQuestionList(JSON.stringify(list))
|
this.$refs.question.getQuestionList(JSON.stringify(list))
|
||||||
} else {
|
} else {
|
||||||
|
this.$refs.question.isShowBest(false)
|
||||||
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr))
|
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user