diff --git a/src/components/j-navbar/j-navbar.vue b/src/components/j-navbar/j-navbar.vue
index 67923cd..d025d0e 100644
--- a/src/components/j-navbar/j-navbar.vue
+++ b/src/components/j-navbar/j-navbar.vue
@@ -7,7 +7,7 @@
{{ backText || '' }}
-
+
diff --git a/src/jtools/api/question.js b/src/jtools/api/question.js
index 2f44de5..e521426 100644
--- a/src/jtools/api/question.js
+++ b/src/jtools/api/question.js
@@ -31,4 +31,29 @@ export function submitTest(data) {
method: 'POST',
data,
});
-}
\ No newline at end of file
+}
+
+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,
+ });
+}
diff --git a/src/jtools/store/user.js b/src/jtools/store/user.js
index e2e6e40..47969f4 100644
--- a/src/jtools/store/user.js
+++ b/src/jtools/store/user.js
@@ -62,12 +62,11 @@ const useUserStore = defineStore({
storage.remove('userInfo')
},
// 查询当前用户的vip开通情况
- searchUserVip() {
- queryVip({ carTypeId: this.currentCartype,memberId: null, subject:'' }).then(resp => {
+ async searchUserVip() {
+ const resp=await queryVip({ carTypeId: this.currentCartype,memberId: null, subject:'' })
if(resp.code == '0000') {
this.vipOnList = resp.data
}
- })
},
// 查询所有的vip
queryVipList() {
diff --git a/src/pages/index/components/Subject1.vue b/src/pages/index/components/Subject1.vue
index 74a2ca0..b5f4d22 100644
--- a/src/pages/index/components/Subject1.vue
+++ b/src/pages/index/components/Subject1.vue
@@ -6,7 +6,7 @@
-
+
顺序练习
{{rightList.length+wrongList.length}}/{{orderQuestion.length}}
@@ -35,7 +35,7 @@
VIP课程
-
+
@@ -134,9 +134,9 @@
url:"/pages/questionBank/baseOperate"
})
},
- toAnswer(title) {
+ toAnswer(title,val) {
uni.navigateTo({
- url:"/pages/questionBank/questionBank?navTitle="+title+"&subject="+this.subject
+ url:"/pages/questionBank/questionBank?navTitle="+title+"&subject="+this.subject+"&needVip="+val
})
},
toExams(){
diff --git a/src/pages/index/components/Subject2.vue b/src/pages/index/components/Subject2.vue
index e6de032..7fe8f7b 100644
--- a/src/pages/index/components/Subject2.vue
+++ b/src/pages/index/components/Subject2.vue
@@ -1,25 +1,25 @@
-
+
-
+
-
+
科二考试项目讲解
-
- 自动挡
+
+ {{diverTypeList[diverTypeIndex].configItemName}}
- {{item.label}}
+ {{item.description}}
-
+
@@ -35,27 +35,56 @@
diff --git a/src/pages/questionBank/practiceExams.vue b/src/pages/questionBank/practiceExams.vue
index 9c2f2e1..eef5241 100644
--- a/src/pages/questionBank/practiceExams.vue
+++ b/src/pages/questionBank/practiceExams.vue
@@ -3,7 +3,7 @@
模拟考试
-
+
diff --git a/src/pages/questionBank/practiceResult.vue b/src/pages/questionBank/practiceResult.vue
index 1fb9dd7..1b900f0 100644
--- a/src/pages/questionBank/practiceResult.vue
+++ b/src/pages/questionBank/practiceResult.vue
@@ -3,16 +3,16 @@
本次练题结果
-
+
太棒了!正确率很高了!
-
- 1/3
+
+ {{wrongList.length}}/{{allDoNum}}
本次错题
-
+
继续做题
@@ -27,10 +27,10 @@
累计练题
33题
- 未做题2311题
+ 未做题{{getNotDoNum}}题
-
+
@@ -47,6 +47,12 @@
diff --git a/src/pages/questionBank/questionBank.vue b/src/pages/questionBank/questionBank.vue
index 8f10b65..73653e2 100644
--- a/src/pages/questionBank/questionBank.vue
+++ b/src/pages/questionBank/questionBank.vue
@@ -3,7 +3,7 @@
{{navTitle}}
-
+
@@ -13,6 +13,7 @@
mapActions
} from 'pinia' //引入映射函数
import useQuestionStore from '@/jtools/store/question' //引入store
+ import useUserStore from '@/jtools/store/user'
import Question from './components/Question.vue';
import {
queryQuestion
@@ -24,6 +25,8 @@
},
data() {
return {
+ isShowAll:true,
+ needVip:false,
subject:1,
navTitle:'',
tabsList:[{
@@ -36,36 +39,60 @@
questionArr:[]
}
},
- onLoad(op) {
+ async onLoad(op) {
+ if(op.needVip){
+ this.needVip=op.needVip
+ }
if(op&&op.navTitle){
this.navTitle=op.navTitle
const param={}
- if(this.navTitle==='顺序答题'){
+ if(this.navTitle==='顺序答题'||this.navTitle==='精简500题'){
this.questionArr=[...this.orderQuestion]
+ if(this.needVip==='true'){
+ if(this.token){
+ await this.searchUserVip()
+ const res=this.vipOnList.some(item=>item.subject==this.subject)
+ if(!res){
+ this.questionArr=this.questionArr.slice(0,3)
+ this.isShowAll=false
+ }
+ }else{
+ uni.redirectTo({
+ url: '/pages/login/login'
+ });
+ }
+ }
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.questionList=JSON.parse(op.questionList)
- }
- queryQuestion(param).then(res => {
- if (res.code == '0000') {
- this.questionArr = res.data
- 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){
this.subject=op.subject
}
},
computed: {
- ...mapState(useQuestionStore, ["orderQuestion"]) //映射函数,取出tagslist
+ ...mapState(useQuestionStore, ["orderQuestion"]) ,//映射函数,取出tagslist
+ ...mapState(useUserStore, ["vipOnList","token"])
},
methods: {
+ ...mapActions(useUserStore,['searchUserVip']),
rightClick() {
console.log('返回');
},
diff --git a/src/static/image/index/subject2_bg.png b/src/static/image/index/subject2_bg.png
new file mode 100644
index 0000000..43dd4fc
Binary files /dev/null and b/src/static/image/index/subject2_bg.png differ
diff --git a/src/static/image/index/vipAds.png b/src/static/image/index/vipAds.png
deleted file mode 100644
index 45ea569..0000000
Binary files a/src/static/image/index/vipAds.png and /dev/null differ