diff --git a/.env.development b/.env.development
index 5b6f2bd..5968371 100644
--- a/.env.development
+++ b/.env.development
@@ -5,7 +5,7 @@ VITE_APP_TITLE = 金武联驾校
VITE_APP_ENV = 'development'
# 金武联驾校/开发环境
-VITE_APP_BASE_API = 'http://118.31.23.45:8888/'
+VITE_APP_BASE_API = 'http://192.168.1.2:8888/'
#
-VITE_WEB_BASE_URL = 'http://118.31.23.45:8888/'
+VITE_WEB_BASE_URL = 'http://192.168.1.2:8888/'
diff --git a/src/App.vue b/src/App.vue
index a257c09..430980b 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,9 +1,11 @@
diff --git a/src/pages/index/testRoom.vue b/src/pages/index/testRoom.vue
new file mode 100644
index 0000000..5fe318b
--- /dev/null
+++ b/src/pages/index/testRoom.vue
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+ {{item.label}}
+
+
+
+
+ 八一考场
+
+ 共9条路线视频
+ 蜀山区
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/questionBank/components/Question.vue b/src/pages/questionBank/components/Question.vue
index 25b5e61..d51f7b3 100644
--- a/src/pages/questionBank/components/Question.vue
+++ b/src/pages/questionBank/components/Question.vue
@@ -5,23 +5,23 @@
{{item.label}}
-
+
- {{quesItem.questionTypeDesc}}
- {{quesItem.questionDesc}}
+ {{getQuestType(quesItem.type)}}
+ {{quesItem.question}}
+ :key="item.op" @tap="answerQues(item.opValue,index)">
-
+ v-if="quesItem.clickAnswer&&quesItem.trueAnswer.includes(item.opValue)">
+
-
+ v-else-if="quesItem.clickAnswer&&quesItem.clickAnswer.includes(item.opValue)&&!quesItem.trueAnswer.includes(item.opValue)">
+
{{item.op}}
@@ -29,17 +29,17 @@
{{item.opDesc}}
+ v-if="quesItem.clickAnswer&&!quesItem.trueAnswer.includes(quesItem.clickAnswer) || tCurrent===1">
- 答案:{{quesItem.rightOp}}
- 这里是相关解释文字,这里是相关解释文字相关解释文字
+ 答案:{{getRightOp(quesItem.trueAnswer)}}
+ {{quesItem.bestAnswer}}
-
+
@@ -219,7 +219,7 @@ export default {
rightList:[],
wrongList:[],
collectList:storage.get('collectList') || [],
- questionList: [],//数据源
+ questionList: [{isCollect:true}],//数据源
swiperList: [], // 轮播图数据列表
swiperIndex: 0, // 轮播图当前位置
isChange: false, // 是否切换
@@ -228,10 +228,33 @@ export default {
}
},
onLoad() {
- this.getQuestionList()
this.renderSwiper(0)
},
methods: {
+ //获取正确选项
+ getRightOp(val){
+ let rightOp=''
+ this.questionList[this.topicIndex].optionList.forEach(item=>{
+ if(this.questionList[this.topicIndex].trueAnswer.includes(item.opValue)){
+ if(rightOp){
+ rightOp=rightOp+'、'+item.op
+ }else{
+ rightOp=item.op
+ }
+ }
+ })
+ return rightOp
+ },
+ //获取题类型
+ getQuestType(val){
+ if(val=='1'){
+ return '判断'
+ }else if(val=='2'){
+ return '单选'
+ }else if(val=='3'){
+ return '多选'
+ }
+ },
//开通VIP
toVip(){
this.showVip=true
@@ -364,22 +387,37 @@ export default {
this.topicIndex = index;
this.renderSwiper(index);
},
+ isArrEqual(arr1, arr2){
+ return arr1.length === arr2.length && arr1.every((ele) => arr2.includes(ele));
+ },
//答题
answerQues(op, index) {
- if (!this.questionList[this.topicIndex].clickAnswer) {
- this.questionList[this.topicIndex].optionList[index].chooseOption = op
- this.questionList[this.topicIndex].clickAnswer = op
- }
+ const falseList =storage.get('wrongList') || []
+ const trueList =storage.get('rightList') || []
+ if (!this.questionList[this.topicIndex].clickAnswer) {
+ this.questionList[this.topicIndex].optionList[index].chooseOption =`${this.questionList[this.topicIndex].optionList[index].chooseOption?this.questionList[this.topicIndex].optionList[index].chooseOption:''}${op}`
+ this.questionList[this.topicIndex].clickAnswer = `${this.questionList[this.topicIndex].optionList[index].clickAnswer?this.questionList[this.topicIndex].optionList[index].clickAnswer:''}${op}`
+ }
if(this.tCurrent!==1){
- if(this.questionList[this.topicIndex].clickAnswer===this.questionList[this.topicIndex].rightOp){
+ const arr1=this.questionList[this.topicIndex].clickAnswer.split('')
+ const arr2=this.questionList[this.topicIndex].trueAnswer.split('')
+ if(this.isArrEqual(arr1,arr2)){
if(!this.rightList.includes(this.questionList[this.topicIndex].questionId)){
this.rightList.push(this.questionList[this.topicIndex].questionId)
}
- console.log(this.rightList);
+ if(!trueList.includes(this.questionList[this.topicIndex].questionId)){
+ trueList.push(this.questionList[this.topicIndex].questionId)
+ storage.set('rightList',trueList)
+ }
if(this.wrongList.includes(this.questionList[this.topicIndex].questionId)){
const wIndex=this.wrongList.indexOf(this.questionList[this.topicIndex].questionId)
this.wrongList.splice(wIndex,1)
}
+ if(falseList.includes(this.questionList[this.topicIndex].questionId)){
+ const wIndex=falseList.indexOf(this.questionList[this.topicIndex].questionId)
+ falseList.splice(wIndex,1)
+ storage.set('wrongList',falseList)
+ }
if(this.topicIndex{
- return{
- ...item,
- clickAnswer:item.rightOp
- }
- })
- }
+ getQuestionList(val) {
+ console.log(val);
+ this.questionList=val.map(item=>{
+ let isCollect=false
+ if(this.collectList.includes(item.questionId)){
+ isCollect=true
+ }
+ return {
+ isCollect:isCollect,
+ ...item
+ }
+ })
}
}
}
diff --git a/src/pages/questionBank/questionBank.vue b/src/pages/questionBank/questionBank.vue
index 7b48fdf..08cf2d9 100644
--- a/src/pages/questionBank/questionBank.vue
+++ b/src/pages/questionBank/questionBank.vue
@@ -3,7 +3,7 @@
{{navTitle}}
-
+
@@ -27,16 +27,21 @@
},{
label:"背题",
value:1
- }]
+ }],
+ questionArr:[]
}
},
onLoad(op) {
if(op&&op.navTitle){
this.navTitle=op.navTitle
+ if(this.navTitle==='顺序答题'){
+ this.questionArr=[...this.orderQuestion]
+ this.$refs.question.getQuestionList(this.questionArr)
+ }
}
},
computed: {
- ...mapState(useQuestionStore, ["orderQuestionList"]) //映射函数,取出tagslist
+ ...mapState(useQuestionStore, ["orderQuestion"]) //映射函数,取出tagslist
},
methods: {
rightClick() {
diff --git a/src/pages/questionBank/videoDetail.vue b/src/pages/questionBank/videoDetail.vue
index 755c73a..a463c08 100644
--- a/src/pages/questionBank/videoDetail.vue
+++ b/src/pages/questionBank/videoDetail.vue
@@ -2,12 +2,18 @@
+
+
+ {{item.label}}
+
+
C1捷达-基础操作视频讲解
-
+
更多
+ 共9条路线
@@ -53,6 +59,30 @@
export default{
data(){
return{
+ videoIndex:0,
+ testList:[{
+ label:"八一考场",
+ value:0,
+ },{
+ label:"富凯考场",
+ value:1
+ },{
+ label:"新亚考场",
+ value:2
+ },{
+ label:"庐江考场",
+ value:3
+ },{
+ label:"富凯考场",
+ value:4
+ },{
+ label:"新亚考场",
+ value:5
+ },{
+ label:"庐江考场",
+ value:6
+ }],
+ videoType:'',
popupShow:false,
nowVideo:0,
videoList:[{
@@ -82,7 +112,15 @@
}]
}
},
+ onLoad(op){
+ if(op.type){
+ this.videoType=op.type
+ }
+ },
methods:{
+ checkTest(val){
+ this.videoIndex=val
+ },
checkVideo(val){
this.nowVideo=val
}
@@ -130,4 +168,17 @@
background: #00B74F;
border-radius: 8rpx;
}
+ .tab_iem{
+ width: 145rpx;
+ height: 56rpx;
+ line-height: 56rpx;
+ text-align: center;
+ background: #F5F5F5;
+ border-radius: 10rpx;
+ color:#333
+ }
+ .checked_tab{
+ background: linear-gradient(90deg, #11DF20 0%, #01B74F 100%);
+ color:#fff
+ }
\ No newline at end of file
diff --git a/src/static/image/index/green_bg.png b/src/static/image/index/green_bg.png
new file mode 100644
index 0000000..d8e86e4
Binary files /dev/null and b/src/static/image/index/green_bg.png differ
diff --git a/src/static/image/index/orange_bg.png b/src/static/image/index/orange_bg.png
new file mode 100644
index 0000000..3ba375d
Binary files /dev/null and b/src/static/image/index/orange_bg.png differ