From 9ba3f6ed48e920ff888dd0c689daad7db6bf1c75 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=84=86=E7=9A=AE=E9=B8=AD?= <1003092440@qq.com>
Date: Tue, 17 Oct 2023 12:00:58 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../questionBank/components/Question.vue | 31 ++++++++++++-------
src/pages/questionBank/practiceExams.vue | 5 ++-
src/pages/questionBank/practiceResult.vue | 2 +-
src/pages/questionBank/questionBank.vue | 2 +-
src/pages/questionBank/wrongQuestion.vue | 21 +++++++++++--
5 files changed, 43 insertions(+), 18 deletions(-)
diff --git a/src/pages/questionBank/components/Question.vue b/src/pages/questionBank/components/Question.vue
index 31c2154..08331a4 100644
--- a/src/pages/questionBank/components/Question.vue
+++ b/src/pages/questionBank/components/Question.vue
@@ -125,11 +125,11 @@
{{collectList.includes(questionList[topicIndex].questionId)?'已收藏':'收藏'}}
- {{type=='exam'?rightList.length:storageRightList.length}}
+ {{navTitle !== '顺序答题'?rightList.length:storageRightList.length}}
答对
- {{type=='exam'?wrongList.length:storageWrongList.length}}
+ {{navTitle !== '顺序答题'?wrongList.length:storageWrongList.length}}
答错
@@ -217,11 +217,11 @@
{{collectList.includes(questionList[topicIndex].questionId)?'已收藏':'收藏'}}
- {{type=='exam'?rightList.length:storageRightList.length}}
+ {{navTitle !== '顺序答题'?rightList.length:storageRightList.length}}
答对
- {{type=='exam'?wrongList.length:storageWrongList.length}}
+ {{navTitle !== '顺序答题'?wrongList.length:storageWrongList.length}}
答错
@@ -313,14 +313,11 @@
isShowAll: {
type: Boolean,
default: true
- },
- subject: {
- type: [String, Number],
- default: 1,
- },
+ }
},
data() {
return {
+ subject:'1',
showSkillInfo:'hidden',
currentType:storage.get('carType') || '1001',
onoff:'0',
@@ -768,10 +765,17 @@
// this.renderSwiper(0)
this.$emit('changeTab', index)
},
- getQuestionList(val, title) {
+ getQuestionList(val, title, subject) {
if (title) {
this.navTitle = title
}
+ if(subject){
+ this.subject = subject
+ console.log(this.subject);
+ this.storageRightList=storage.get(`rightList_subject${subject}`) || []
+ this.storageWrongList=storage.get(`wrongList_subject${subject}`) || []
+ this.collectList=storage.get(`collectList_subject${subject}`) || []
+ }
if (val && val.length) {
this.questionList = JSON.parse(val)
} else {
@@ -779,7 +783,12 @@
}
console.log(this.questionList);
if (this.navTitle === '顺序答题') {
- this.pickerTopic(this[`currentIndex_subject${this.subject}`])
+ if(subject){
+ this.pickerTopic(this[`currentIndex_subject${subject}`])
+ }else{
+ this.pickerTopic(this[`currentIndex_subject${this.subject}`])
+ }
+
} else {
this.pickerTopic(this.topicIndex)
}
diff --git a/src/pages/questionBank/practiceExams.vue b/src/pages/questionBank/practiceExams.vue
index b936aba..c5b35cb 100644
--- a/src/pages/questionBank/practiceExams.vue
+++ b/src/pages/questionBank/practiceExams.vue
@@ -3,8 +3,7 @@
{{title}}
-
+
@@ -72,7 +71,7 @@
}
}
this.type = 'exam'
- this.$refs.question.getQuestionList(JSON.stringify(this.questionArr), this.title)
+ this.$refs.question.getQuestionList(JSON.stringify(this.questionArr), this.title,this.subject)
}
},
computed: {
diff --git a/src/pages/questionBank/practiceResult.vue b/src/pages/questionBank/practiceResult.vue
index bad9958..a69663b 100644
--- a/src/pages/questionBank/practiceResult.vue
+++ b/src/pages/questionBank/practiceResult.vue
@@ -6,7 +6,7 @@
- 太棒了!正确率很高了!
+ 太棒了!正确率很高了!
继续努力吧,正确率有点低~
diff --git a/src/pages/questionBank/questionBank.vue b/src/pages/questionBank/questionBank.vue
index f769af2..301e817 100644
--- a/src/pages/questionBank/questionBank.vue
+++ b/src/pages/questionBank/questionBank.vue
@@ -77,7 +77,7 @@
}
}
this.loading = false
- this.$refs.question.getQuestionList(JSON.stringify(this.questionArr), this.navTitle)
+ this.$refs.question.getQuestionList(JSON.stringify(this.questionArr), this.navTitle , this.subject)
this.$refs.question.getOriginArr(JSON.stringify(this.questionArr))
}
},
diff --git a/src/pages/questionBank/wrongQuestion.vue b/src/pages/questionBank/wrongQuestion.vue
index a52ebaf..b5af297 100644
--- a/src/pages/questionBank/wrongQuestion.vue
+++ b/src/pages/questionBank/wrongQuestion.vue
@@ -68,7 +68,9 @@
- {{item.categoryName}}
+
+ {{item.categoryName}}
+
{{item.num}}
@@ -139,8 +141,9 @@
},
toCategoryQuestion(item){
const jsonString = JSON.stringify(item.errorQuestionIdList)
+ console.log(item);
uni.navigateTo({
- url: "/pages/questionBank/questionBank?navTitle=" + item.categoryName + "&questionIdList=" + jsonString
+ url: "/pages/questionBank/questionBank?navTitle=" + item.categoryName + "&questionIdList=" + jsonString+"&subject="+this.subject
})
},
toPractice() {
@@ -264,4 +267,18 @@
left: 165.5rpx;
top: 78rpx
}
+ .topic_cont_text {
+ overflow: hidden;
+ word-break: break-all;
+ /* break-all(允许在单词内换行。) */
+ text-overflow: ellipsis;
+ /* 超出部分省略号 */
+ display: -webkit-box;
+ /** 对象作为伸缩盒子模型显示 **/
+ -webkit-box-orient: vertical;
+ /** 设置或检索伸缩盒对象的子元素的排列方式 **/
+ -webkit-line-clamp: 1;
+ /** 显示的行数 **/
+
+ }
\ No newline at end of file
--
2.38.1.windows.1