Compare commits

...

3 Commits

  1. 31
      src/pages/questionBank/components/Question.vue
  2. 5
      src/pages/questionBank/practiceExams.vue
  3. 2
      src/pages/questionBank/practiceResult.vue
  4. 2
      src/pages/questionBank/questionBank.vue
  5. 21
      src/pages/questionBank/wrongQuestion.vue

@ -125,11 +125,11 @@
<text class="cor-666">{{collectList.includes(questionList[topicIndex].questionId)?'已收藏':'收藏'}}</text>
</view>
<view class="text-center">
<view style="color: #00B74F;">{{type=='exam'?rightList.length:storageRightList.length}}</view>
<view style="color: #00B74F;">{{navTitle !== '顺序答题'?rightList.length:storageRightList.length}}</view>
<text class="cor-666">答对</text>
</view>
<view class="text-center">
<view style="color: #FF6E02;">{{type=='exam'?wrongList.length:storageWrongList.length}}</view>
<view style="color: #FF6E02;">{{navTitle !== '顺序答题'?wrongList.length:storageWrongList.length}}</view>
<text class="cor-666">答错</text>
</view>
<view class="text-center" @tap="popupShow=!popupShow">
@ -217,11 +217,11 @@
<text class="cor-666">{{collectList.includes(questionList[topicIndex].questionId)?'已收藏':'收藏'}}</text>
</view>
<view class="text-center">
<view style="color: #00B74F;">{{type=='exam'?rightList.length:storageRightList.length}}</view>
<view style="color: #00B74F;">{{navTitle !== '顺序答题'?rightList.length:storageRightList.length}}</view>
<text class="cor-666">答对</text>
</view>
<view class="text-center">
<view style="color: #FF6E02;">{{type=='exam'?wrongList.length:storageWrongList.length}}</view>
<view style="color: #FF6E02;">{{navTitle !== '顺序答题'?wrongList.length:storageWrongList.length}}</view>
<text class="cor-666">答错</text>
</view>
<view class="text-center" @tap="popupShow=!popupShow">
@ -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)
}

@ -3,8 +3,7 @@
<!-- <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" @changeTab="changeTab" />
<Question ref="question" :tabsList="tabsList" v-model:isSubmit="isSubmit" :type="type" :isShowAll="isShowAll" @changeTab="changeTab" />
</view>
</template>
@ -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: {

@ -6,7 +6,7 @@
<GradesChart :titleName="rightPencentDesc" :actualValue="Number(rightPencent)" />
<view class="top_box flex jc-c" style="flex-direction: column;">
<view class="wp100 text-center" style="margin-top: -80px;">
<text v-if="Number(rightPencent)>=90">太棒了正确率很高了</text>
<text v-if="Number(rightPencent * 100)>=90">太棒了正确率很高了</text>
<text v-else>继续努力吧正确率有点低~</text>
<view class="flex ai-c jc-c mt10">
<view class="text-center wp50" @tap="toQuestionBank">

@ -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))
}
},

@ -68,7 +68,9 @@
<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>
<view class="topic_cont_text" style="max-width: 75%;">
<text class="cor-000">{{item.categoryName}}</text>
</view>
<text class="cor-666">{{item.num}}</text>
</view>
</view>
@ -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;
/** 显示的行数 **/
}
</style>
Loading…
Cancel
Save