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 01475db..430980b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,7 +5,7 @@ export default { onLaunch: function () { useUserStore().queryVipList() if(useUserStore().isLogin) { - useQuestionStore().getQuestionList() + useQuestionStore().getOrderQuestion('1') useUserStore().getUserInfo() useUserStore().searchUserVip() } diff --git a/src/jtools/store/question.js b/src/jtools/store/question.js index 403c057..1018b56 100644 --- a/src/jtools/store/question.js +++ b/src/jtools/store/question.js @@ -1,26 +1,32 @@ -import { defineStore } from 'pinia'; +import { + defineStore +} from 'pinia'; import http from '@/jtools/request/index'; -import { queryQuestion } from '@/jtools/api/question'; +import { + queryQuestion +} from '@/jtools/api/question'; import storage from '@/jtools/storage'; const question = defineStore({ - id: 'question', - state: () => ({ + id: 'question', + state: () => ({ currentCartype: storage.get('carType') || '1001', - orderQuestionList: [], //顺序做题 - }), + orderQuestion: [], //顺序做题 + }), - actions: { - // 获取顺序做题 - getQuestionList() { - console.log(11111); - queryQuestion({carTypeId:this.currentCartype,subject:'1'}).then(res=>{ - if(res.code=='0000'){ - this.orderQuestionList=res.data - } - }) - }, - } + actions: { + // 获取顺序做题 + getOrderQuestion(val) { + queryQuestion({ + carTypeId: this.currentCartype, + subject: val + }).then(res => { + if (res.code == '0000') { + this.orderQuestion = res.data + } + }) + }, + } }); -export default question; +export default question; \ No newline at end of file diff --git a/src/pages.json b/src/pages.json index e0757ac..bd9bae1 100644 --- a/src/pages.json +++ b/src/pages.json @@ -124,6 +124,13 @@ "navigationBarTitleText": "章节练习", "enablePullDownRefresh": false } + }, + { + "path": "pages/index/testRoom", + "style": { + "navigationBarTitleText": "考场实况", + "enablePullDownRefresh": false + } } ], diff --git a/src/pages/index/components/Subject1.vue b/src/pages/index/components/Subject1.vue index d9f264d..01f0f2d 100644 --- a/src/pages/index/components/Subject1.vue +++ b/src/pages/index/components/Subject1.vue @@ -4,19 +4,23 @@ - - - 顺序练习 - 0/2344 - + + + + 顺序练习 + {{rightList.length+wrongList.length}}/{{orderQuestion.length}} + + - - - 模拟考试 - 去考试 - + + + + 模拟考试 + 去考试 + + @@ -47,7 +51,7 @@ 专项练习 - + @@ -92,6 +96,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)"> @@ -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