pull/24/head
脆皮鸭 1 year ago
parent 89c72e336b
commit 287f123ac7
  1. 6
      src/App.vue
  2. 30
      src/jtools/api/question.js
  3. 2
      src/jtools/request/index.js
  4. 239
      src/jtools/store/question.js
  5. 11
      src/pages.json
  6. 313
      src/pages/index/components/Subject1.vue
  7. 13
      src/pages/index/components/Subject2.vue
  8. 113
      src/pages/index/index.vue
  9. 139
      src/pages/index/secretPapers.vue
  10. 43
      src/pages/index/trueTest.vue
  11. 2
      src/pages/index/videoVip.vue
  12. 6
      src/pages/login/login.vue
  13. 6
      src/pages/me/index.vue
  14. 9
      src/pages/me/info.vue
  15. 244
      src/pages/me/tijian.vue
  16. 6
      src/pages/me/uploadPic.vue
  17. 14
      src/pages/me/vip.vue
  18. 16
      src/pages/questionBank/baseOperate.vue
  19. 57
      src/pages/questionBank/chapterExercise.vue
  20. 1582
      src/pages/questionBank/components/Question.vue
  21. 27
      src/pages/questionBank/examResult.vue
  22. 429
      src/pages/questionBank/exclusiveExercise.vue
  23. 147
      src/pages/questionBank/practiceExams.vue
  24. 11
      src/pages/questionBank/practiceResult.vue
  25. 132
      src/pages/questionBank/questionBank.vue
  26. 18
      src/pages/questionBank/videoDetail.vue
  27. 97
      src/pages/questionBank/wrongQuestion.vue
  28. BIN
      src/static/image/index/index_bg.jpg
  29. BIN
      src/static/image/index/subject2_bg.png
  30. BIN
      src/static/image/index/subject3_bg.png
  31. BIN
      src/static/image/index/vip_bg.jpg
  32. BIN
      src/static/image/mine/mine_bg.png
  33. BIN
      src/static/image/mine/vip_bg.png
  34. BIN
      src/static/image/mine/vip_card.png
  35. BIN
      src/static/image/practice/error_icon.png
  36. BIN
      src/static/image/practice/neverWrite_icon.png
  37. BIN
      src/static/image/practice/newRules_icon.png

@ -4,11 +4,7 @@ import useQuestionStore from '@/jtools/store/question' //引入store
export default { export default {
onLaunch: function () { onLaunch: function () {
useUserStore().queryVipList() useUserStore().queryVipList()
if(useQuestionStore().curSubject=='1'){ useQuestionStore().getAllQuestion()
useQuestionStore().getOrderQuestion_sub1()
}else if(useQuestionStore().curSubject=='4'){
useQuestionStore().getOrderQuestion_sub4()
}
if(useUserStore().isLogin) { if(useUserStore().isLogin) {
useUserStore().getUserInfo() useUserStore().getUserInfo()
useUserStore().searchUserVip() useUserStore().searchUserVip()

@ -71,3 +71,33 @@ export function querySpecialNum(data) {
noToken:true noToken:true
}); });
} }
//获取题库版本
export function getVersion(carTypeId) {
return request({
url: '/driver-api/tdQuestionVersion/currentVersion?carTypeId='+carTypeId,
method: 'GET',
noToken:true
});
}
//获取题目ID
export function queryQuestionId(data) {
return request({
url: '/driver-api/tdQuestion/queryQuestionId',
method: 'POST',
data,
noToken:true
});
}
//获取模拟考试ID
export function getTestQuestionId(data) {
return request({
url: '/driver-api/tdQuestion/getTestQuestionId',
method: 'POST',
data,
noToken:true
});
}

@ -32,7 +32,7 @@ function service(options = {}) {
useUserStore().logout() useUserStore().logout()
//请求成功 //请求成功
resolved(res.data); resolved(res.data);
} else if(res.data.code != '0000') { } else if(res.data.code != '0000'&&res.data.code !='4001') {
uni.showToast({ uni.showToast({
title: res?.data?.message || '访问出错', title: res?.data?.message || '访问出错',
icon: 'none' icon: 'none'

@ -3,7 +3,8 @@ import {
} from 'pinia'; } from 'pinia';
import http from '@/jtools/request/index'; import http from '@/jtools/request/index';
import { import {
queryQuestion queryQuestion,
getVersion
} from '@/jtools/api/question'; } from '@/jtools/api/question';
import storage from '@/jtools/storage'; import storage from '@/jtools/storage';
@ -11,82 +12,212 @@ const question = defineStore({
id: 'question', id: 'question',
state: () => ({ state: () => ({
currentCartype: storage.get('carType') || '1001', currentCartype: storage.get('carType') || '1001',
orderQuestion_subject1: [], //科目一顺序做题 orderQuestion_subject1:storage.get('question_subject1') || [], //科目一顺序做题
orderQuestion_subject4:[],//科目顺序做题 orderQuestion_subject4:storage.get('question_subject4') ||[],//科目顺序做题
currentIndex_subject1:0,//科目一索引 顺序做题 currentIndex_subject1:0,//科目一索引 顺序做题
currentIndex_subject4:0,//科目四索引 顺序做题 currentIndex_subject4:0,//科目四索引 顺序做题
curSubject:storage.get('curSubject') || '1' curSubject:storage.get('curSubject') || '1',
loading_subject1:false,
loading_subject4:false,
version:storage.get('version') || ''
}), }),
actions: { actions: {
getAllQuestion(){
getVersion(this.currentCartype).then(resp=>{
if(resp.code==='0000'){
if(this.version!=resp.data){
this.version=resp.data
storage.set('version',resp.data)
this.getOrderQuestion_sub1(true)
this.getOrderQuestion_sub4(true)
}else{
this.getOrderQuestion_sub1()
this.getOrderQuestion_sub4()
}
}
})
},
divideArray(array, numChunks) {
var chunkSize = Math.ceil(array.length / numChunks);
var dividedArray = [];
for (var i = 0; i < array.length; i += chunkSize) {
dividedArray.push(array.slice(i, i + chunkSize));
}
return dividedArray;
},
//改变当前科目 //改变当前科目
changeSubject(val){ changeSubject(val){
this.curSubject=val this.curSubject=val
storage.set('curSubject',val) storage.set('curSubject',val)
}, },
// 获取顺序做题科目1 // 获取顺序做题科目1
getOrderQuestion_sub1() { getOrderQuestion_sub1(isUpdate) {
this.curSubject='1' if(isUpdate){
storage.set('curSubject','1') this.loading_subject1=true
if(!this.orderQuestion_subject1.length){ queryQuestion({
queryQuestion({ carTypeId: this.currentCartype,
carTypeId: this.currentCartype, subject: '1',
subject: '1', // questionIdList:[10982,10983,10985,10986]
// questionIdList:[10982,10983,10985,10986] }).then(res => {
}).then(res => { if (res.code == '0000') {
if (res.code == '0000') { this.loading_subject1=false
this.orderQuestion_subject1 = res.data uni.showToast({
const falseList =storage.get('wrongList_subject1') || [] title:'题库加载完成!'
const trueList =storage.get('rightList_subject1')|| [] })
const falseArr=[] this.orderQuestion_subject1 = res.data
const rightArr=[] const diveList=this.divideArray(this.orderQuestion_subject1,5)
this.orderQuestion_subject1.forEach(item=>{ uni.setStorageSync('questionOneSub1', diveList[0])
if(falseList.includes(item.questionId)){ uni.setStorageSync('questionOneSub2', diveList[1])
falseArr.push(item.questionId) uni.setStorageSync('questionOneSub3', diveList[2])
} uni.setStorageSync('questionOneSub4', diveList[3])
if(trueList.includes(item.questionId)){ uni.setStorageSync('questionOneSub5', diveList[4])
rightArr.push(item.questionId) const falseList =storage.get('wrongList_subject1') || []
const trueList =storage.get('rightList_subject1')|| []
const falseArr=[]
const rightArr=[]
this.orderQuestion_subject1.forEach(item=>{
if(falseList.includes(item.questionId)){
falseArr.push(item.questionId)
}
if(trueList.includes(item.questionId)){
rightArr.push(item.questionId)
}
})
storage.set('wrongList_subject1',falseArr)
storage.set('rightList_subject1',rightArr)
}
})
}else{
const list1 = uni.getStorageSync('questionOneSub1') || []
const list2 = uni.getStorageSync('questionOneSub2') || []
const list3 = uni.getStorageSync('questionOneSub3') || []
const list4 = uni.getStorageSync('questionOneSub4') || []
const list5 = uni.getStorageSync('questionOneSub5') || []
this.orderQuestion_subject1=[...list1,...list2,...list3,...list4,...list5]
if(this.orderQuestion_subject1&&this.orderQuestion_subject1.length){
}else{
this.loading_subject1=true
queryQuestion({
carTypeId: this.currentCartype,
subject: '1',
// questionIdList:[10982,10983,10985,10986]
}).then(res => {
if (res.code == '0000') {
this.loading_subject1=false
uni.showToast({
title:'题库加载完成!'
})
this.orderQuestion_subject1 = res.data
const diveList=this.divideArray(this.orderQuestion_subject1,5)
uni.setStorageSync('questionOneSub1', diveList[0])
uni.setStorageSync('questionOneSub2', diveList[1])
uni.setStorageSync('questionOneSub3', diveList[2])
uni.setStorageSync('questionOneSub4', diveList[3])
uni.setStorageSync('questionOneSub5', diveList[4])
const falseList =storage.get('wrongList_subject1') || []
const trueList =storage.get('rightList_subject1')|| []
const falseArr=[]
const rightArr=[]
this.orderQuestion_subject1.forEach(item=>{
if(falseList.includes(item.questionId)){
falseArr.push(item.questionId)
}
if(trueList.includes(item.questionId)){
rightArr.push(item.questionId)
}
})
storage.set('wrongList_subject1',falseArr)
storage.set('rightList_subject1',rightArr)
} }
}) })
storage.set('wrongList_subject1',falseArr) }
storage.set('rightList_subject1',rightArr)
}
})
} }
}, },
// 获取顺序做题科目4 // 获取顺序做题科目4
getOrderQuestion_sub4() { getOrderQuestion_sub4(isUpdate) {
this.curSubject='4' if(isUpdate){
storage.set('curSubject','4') this.loading_subject4=true
if(!this.orderQuestion_subject4.length){ queryQuestion({
queryQuestion({ carTypeId: this.currentCartype,
carTypeId: this.currentCartype, subject: '4',
subject: '4', // questionIdList:[10982,10983,10985,10986]
// questionIdList:[10982,10983,10985,10986] }).then(res => {
}).then(res => { if (res.code == '0000') {
if (res.code == '0000') { this.loading_subject4=false
this.orderQuestion_subject4 = res.data this.orderQuestion_subject4 = res.data
const falseList =storage.get('wrongList_subject4') || [] const diveList=this.divideArray(this.orderQuestion_subject4,5)
const trueList =storage.get('rightList_subject4')|| [] uni.setStorageSync('questionFourSub1', diveList[0])
const falseArr=[] uni.setStorageSync('questionFourSub2', diveList[1])
const rightArr=[] uni.setStorageSync('questionFourSub3', diveList[2])
this.orderQuestion_subject4.forEach(item=>{ uni.setStorageSync('questionFourSub4', diveList[3])
if(falseList.includes(item.questionId)){ uni.setStorageSync('questionFourSub5', diveList[4])
falseArr.push(item.questionId) const falseList =storage.get('wrongList_subject4') || []
} const trueList =storage.get('rightList_subject4')|| []
if(trueList.includes(item.questionId)){ const falseArr=[]
rightArr.push(item.questionId) const rightArr=[]
this.orderQuestion_subject4.forEach(item=>{
if(falseList.includes(item.questionId)){
falseArr.push(item.questionId)
}
if(trueList.includes(item.questionId)){
rightArr.push(item.questionId)
}
})
storage.set('wrongList_subject4',falseArr)
storage.set('rightList_subject4',rightArr)
}
})
}else{
const list1 = uni.getStorageSync('questionFourSub1') || []
const list2 = uni.getStorageSync('questionFourSub2') || []
const list3 = uni.getStorageSync('questionFourSub3') || []
const list4 = uni.getStorageSync('questionFourSub4') || []
const list5 = uni.getStorageSync('questionFourSub5') || []
this.orderQuestion_subject4=[...list1,...list2,...list3,...list4,...list5]
if(this.orderQuestion_subject4&&this.orderQuestion_subject4.length){
}else{
this.loading_subject4=true
queryQuestion({
carTypeId: this.currentCartype,
subject: '4',
// questionIdList:[10982,10983,10985,10986]
}).then(res => {
if (res.code == '0000') {
this.loading_subject4=false
this.orderQuestion_subject4 = res.data
const diveList=this.divideArray(this.orderQuestion_subject4,5)
uni.setStorageSync('questionFourSub1', diveList[0])
uni.setStorageSync('questionFourSub2', diveList[1])
uni.setStorageSync('questionFourSub3', diveList[2])
uni.setStorageSync('questionFourSub4', diveList[3])
uni.setStorageSync('questionFourSub5', diveList[4])
const falseList =storage.get('wrongList_subject4') || []
const trueList =storage.get('rightList_subject4')|| []
const falseArr=[]
const rightArr=[]
this.orderQuestion_subject4.forEach(item=>{
if(falseList.includes(item.questionId)){
falseArr.push(item.questionId)
}
if(trueList.includes(item.questionId)){
rightArr.push(item.questionId)
}
})
storage.set('wrongList_subject4',falseArr)
storage.set('rightList_subject4',rightArr)
} }
}) })
storage.set('wrongList_subject4',falseArr) }
storage.set('rightList_subject4',rightArr)
}
})
} }
}, },
//获取索引 //获取索引
getCurrentIndex(index,val){ getCurrentIndex(index,val){
this[`currentIndex_subject${val}`]=index this[`currentIndex_subject${val}`]=index
console.log(`currentIndex_subject${val}`,this[`currentIndex_subject${val}`]);
} }
} }
}); });

@ -86,7 +86,7 @@
{ {
"path": "pages/me/tijian", "path": "pages/me/tijian",
"style": { "style": {
"navigationBarTitleText": "我的体检", "navigationBarTitleText": "上传证件照",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
@ -151,6 +151,13 @@
"navigationBarTitleText": "上传证件照", "navigationBarTitleText": "上传证件照",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path": "pages/index/secretPapers",
"style": {
"navigationBarTitleText": "考前密卷",
"enablePullDownRefresh": false
}
} }
], ],
@ -162,7 +169,7 @@
}, },
"tabBar": { "tabBar": {
"borderStyle": "white", "borderStyle": "white",
"selectedColor": "#333333", "selectedColor": "#05C341",
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"color": "#999999", "color": "#999999",
"list": [{ "list": [{

@ -1,28 +1,33 @@
<template> <template>
<view> <view>
<view class="box-nav"> <view class="box-nav">
<image style="width: 100%;" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E9%A6%96%E9%A1%B5_20230830213855.png"></image> <image style="width: 100%;"
src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E9%A6%96%E9%A1%B5_20230830213855.png">
</image>
<view class="center-box flex jc-sb ai-c"> <view class="center-box flex jc-sb ai-c">
<view class="box-item flex ai-c jc-c"> <view class="box-item flex ai-c jc-c">
<view class="flex jc-c ai-c relative" style="width: 230rpx;height: 230rpx;" @tap="toAnswer('顺序答题',false)"> <view class="flex jc-c ai-c relative" style="width: 230rpx;height: 230rpx;" @tap="toAnswer('顺序答题',false)">
<image style="width: 230rpx;height: 230rpx;position: absolute;left: 0;top: 0;" src="../../../static/image/index/green_bg.png"></image> <image style="width: 230rpx;height: 230rpx;position: absolute;left: 0;top: 0;"
<view class="btn-item flex ai-c jc-c"> src="../../../static/image/index/green_bg.png"></image>
<view class="text-center cor-fff" style="line-height: 40rpx;"> <view class="btn-item flex ai-c jc-c">
<view class="fs16">顺序练习</view> <view class="text-center cor-fff" style="line-height: 40rpx;">
<text class="fs14">{{getDoNum}}/{{subject=='1'?orderQuestion_subject1.length:orderQuestion_subject4.length}}</text> <view class="fs16">顺序练习</view>
</view> <text
class="fs14">{{getDoNum}}/{{subject=='1'?orderQuestion_subject1.length:orderQuestion_subject4.length}}</text>
</view> </view>
</view>
</view> </view>
</view> </view>
<view class="box-item flex ai-c jc-c"> <view class="box-item flex ai-c jc-c">
<view class="flex jc-c ai-c relative" style="width: 230rpx;height: 230rpx;" @tap="toExams('title=模拟考试')"> <view class="flex jc-c ai-c relative" style="width: 230rpx;height: 230rpx;" @tap="toExams('模拟考试')">
<image style="width: 230rpx;height: 230rpx;position: absolute;left: 0;top: 0;" src="../../../static/image/index/orange_bg.png"></image> <image style="width: 230rpx;height: 230rpx;position: absolute;left: 0;top: 0;"
<view class="btn2-item flex ai-c jc-c"> src="../../../static/image/index/orange_bg.png"></image>
<view class="text-center cor-fff" style="line-height: 40rpx;"> <view class="btn2-item flex ai-c jc-c">
<view class="fs16">模拟考试</view> <view class="text-center cor-fff" style="line-height: 40rpx;">
<text class="fs14">去考试</text> <view class="fs16">模拟考试</view>
</view> <text class="fs14">去考试</text>
</view> </view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -31,46 +36,43 @@
<view class="tabs-box"> <view class="tabs-box">
<view class="wp33 flex ai-c jc-c" @tap="toVip"> <view class="wp33 flex ai-c jc-c" @tap="toVip">
<view class="text-center wp100"> <view class="text-center wp100">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto" <image style="width: 72rpx;height: 72rpx;margin: 0 auto" src="../../static/image/index/vipicon.png">
src="../../static/image/index/vipicon.png">
</image> </image>
<view class="mt5">VIP课程</view> <view class="mt5">VIP课程</view>
</view> </view>
</view> </view>
<view class="wp33 flex ai-c jc-c" @tap="toAnswer('精简500题',true)"> <view class="wp33 flex ai-c jc-c" @tap="toAnswer('精简500题',true)">
<view class="text-center wp100"> <view class="text-center wp100">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto" <image style="width: 72rpx;height: 72rpx;margin: 0 auto" src="../../static/image/index/500icon.png">
src="../../static/image/index/500icon.png">
</image> </image>
<view class="mt5">精简500题</view> <view class="mt5">精简500题</view>
</view> </view>
</view> </view>
<view class="wp33 flex ai-c jc-c" @tap="toExclusive"> <view class="wp33 flex ai-c jc-c" @tap="toExclusive">
<view class="text-center wp100"> <view class="text-center wp100">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto" <image style="width: 72rpx;height: 72rpx;margin: 0 auto" src="../../static/image/index/zxicon.png">
src="../../static/image/index/zxicon.png">
</image> </image>
<view class="mt5">专项练习</view> <view class="mt5">专项练习</view>
</view> </view>
</view> </view>
<view class="wp33 flex ai-c jc-c" @tap="toTestRoom"> <view class="wp33 flex ai-c jc-c" @tap="toTestRoom">
<view class="text-center wp100"> <view class="text-center wp100">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto;" <image style="width: 72rpx;height: 72rpx;margin: 0 auto;" src="../../static/image/index/realicon.png">
src="../../static/image/index/realicon.png"></image> </image>
<view class="mt5">真实考场模拟</view> <view class="mt5">真实考场模拟</view>
</view> </view>
</view> </view>
<view class="wp33 flex ai-c jc-c" @tap="toExams('title=考前密卷&isExam1=1')"> <view class="wp33 flex ai-c jc-c" @tap="toExams('考前秘卷')">
<view class="text-center wp100"> <view class="text-center wp100">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto" <image style="width: 72rpx;height: 72rpx;margin: 0 auto" src="../../static/image/index/testbeforeicon.png">
src="../../static/image/index/testbeforeicon.png"></image> </image>
<view class="mt5">考前</view> <view class="mt5">考前</view>
</view> </view>
</view> </view>
<view class="wp33 flex ai-c jc-c" @tap="toWrongList"> <view class="wp33 flex ai-c jc-c" @tap="toWrongList">
<view class="text-center wp100"> <view class="text-center wp100">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto" <image style="width: 72rpx;height: 72rpx;margin: 0 auto" src="../../static/image/index/worryicon.png">
src="../../static/image/index/worryicon.png"></image> </image>
<view class="mt5">错题收藏</view> <view class="mt5">错题收藏</view>
</view> </view>
</view> </view>
@ -80,7 +82,7 @@
<view class="video-box"> <view class="video-box">
<view class="flex jc-sb ai-c wp100"> <view class="flex jc-sb ai-c wp100">
<text style="color: #05C341;font-size: 36rpx;">{{subject==1?'一':'四'}}精品视频课</text> <text style="color: #05C341;font-size: 36rpx;">{{subject==1?'一':'四'}}精品视频课</text>
<text class="cor-666 fs12">全部10节课 ></text> <!-- <text class="cor-666 fs12">全部10节课 ></text> -->
</view> </view>
<view class="flex ai-c mt20"> <view class="flex ai-c mt20">
<view class="contain-box relative"> <view class="contain-box relative">
@ -88,66 +90,108 @@
<image class="play_btn_2" src="../../static/image/index/play.png" /> <image class="play_btn_2" src="../../static/image/index/play.png" />
</view> </view>
<view class="ml15 text-center"> <view class="ml15 text-center">
<u-button :customStyle="{width:'200rpx',height:'66rpx',borderRadius: '33rpx'}" iconColor="#fff" <u-button :customStyle="{width:'200rpx',height:'66rpx',borderRadius: '33rpx'}" iconColor="#fff" text="去看视频"
text="去看视频" color="linear-gradient(90deg, #11DF20 0%, #00B74F 100%)" icon="play-circle"> color="linear-gradient(90deg, #11DF20 0%, #00B74F 100%)" icon="play-circle">
</u-button> </u-button>
<view class="cor-333 fs15 fw600 mt10">{{subject==1?'一':'四'}}易错试题</view> <view class="cor-333 fs15 fw600 mt10">{{subject==1?'一':'四'}}易错试题</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { mapState,mapActions } from 'pinia' // import {
mapState,
mapActions
} from 'pinia' //
import useUserStore from '@/jtools/store/user' import useUserStore from '@/jtools/store/user'
import storage from '@/jtools/storage'; import storage from '@/jtools/storage';
import useQuestionStore from '@/jtools/store/question' //store import useQuestionStore from '@/jtools/store/question' //store
import {
queryQuestionId,
getTestQuestionId
} from '@/jtools/api/question';
export default { export default {
props:{ props: {
subject:{ subject: {
type:[String,Number], type: [String, Number],
}, },
rightList:{ rightList: {
type:Array type: Array
}, },
wrongList:{ wrongList: {
type:Array type: Array
} }
}, },
data() { data() {
return { return {
allQuestionNum:0, allQuestionNum: 0,
} }
}, },
mounted(){ mounted() {
}, },
computed: { computed: {
...mapState(useUserStore, ["vipOnList", "token"]), ...mapState(useUserStore, ["vipOnList", "token"]),
...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject4"]) ,//tagslist ...mapState(useQuestionStore, ["orderQuestion_subject1", "orderQuestion_subject4", "version"]), //tagslist
getDoNum(){ getDoNum() {
return this.rightList.length+this.wrongList.length return this.rightList.length + this.wrongList.length
} }
}, },
methods: { methods: {
...mapActions(useUserStore, ['searchUserVip']), ...mapActions(useUserStore, ['searchUserVip']),
async toTestRoom(){ ...mapActions(useQuestionStore, ['getOrderQuestion_sub1', 'getOrderQuestion_sub4', 'getAllQuestion']),
async toTestRoom() {
// uni.navigateTo({ // uni.navigateTo({
// url:"/pages/index/trueTest" // url:"/pages/index/trueTest"
// }) // })
if (this.token) { if (this.token) {
await this.searchUserVip() await this.searchUserVip()
const res = this.vipOnList.some(item => item.subjects == this.subject) const res = this.vipOnList.some(item => item.subjects.includes(this.subject))
if (!res) {
uni.navigateTo({
url: "/pages/index/videoVip?subject=" + this.subject
})
} else {
getTestQuestionId({
versionId: this.version,
carTypeId: storage.get('carType') || '1001',
subject: this.subject,
}).then(async (resp) => {
if (resp.code === '0000') {
const arr = resp.data
const listJson = JSON.stringify(arr)
uni.navigateTo({
url: "/pages/index/trueTest?subject="+ this.subject + "&questionIdList=" + listJson
})
} else if (resp.code === '4001') {
uni.showToast({
title: '当前题库非最新版,请更新~',
icon: 'none'
})
this.getAllQuestion()
}
})
}
} else {
uni.redirectTo({
url: '/pages/login/login'
});
}
},
async toVip() {
if (this.token) {
await this.searchUserVip()
const res = this.vipOnList.some(item => item.subjects.includes(this.subject))
if (!res) { if (!res) {
uni.navigateTo({ uni.navigateTo({
url:"/pages/index/videoVip?subject="+this.subject url: "/pages/index/videoVip?subject=" + this.subject
}) })
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url: "/pages/index/trueTest?subject="+this.subject url: "/pages/me/vip"
}) })
} }
} else { } else {
@ -156,61 +200,143 @@
}); });
} }
}, },
toVip(){ toClass() {
// if(storage.get('token')){
// uni.navigateTo({
// url:"/pages/index/videoVip?subject="+this.subject
// })
// }else{
// uni.navigateTo({
// url:'/pages/login/login'
// })
// }
uni.showToast({
title:'敬请期待',
icon:'none'
})
},
toClass(){
uni.showToast({ uni.showToast({
title:'敬请期待', title: '敬请期待',
icon:'none' icon: 'none'
}) })
}, },
toAnswer(title,val) { toAnswer(title, val) {
if(title=='精简500题'){ if (title == '精简500题') {
uni.navigateTo({ queryQuestionId({
url:"/pages/questionBank/questionBank?navTitle="+title+"&subject="+this.subject+"&needVip="+val+"&isVip=1" versionId: this.version,
carTypeId: storage.get('carType') || '1001',
subject: this.subject,
isVip: '1'
}).then(async (resp) => {
if (resp.code === '0000') {
if (this.token) {
await this.searchUserVip()
const result = this.vipOnList.some(item => item.subjects.includes(this.subject))
if (result) {
const listJson = JSON.stringify(resp.data)
uni.navigateTo({
url: "/pages/questionBank/questionBank?navTitle=" + title + "&subject=" + this.subject +
"&needVip=" + result + "&questionIdList=" + listJson
})
} else {
if (resp.data && resp.data.length > 3) {
const arr = resp.data.slice(0, 3)
} else {
const arr = resp.data
}
const listJson = JSON.stringify(arr)
uni.navigateTo({
url: "/pages/questionBank/questionBank?navTitle=" + title + "&subject=" + this.subject +
"&needVip=" + result + "&questionIdList=" + listJson
})
}
} else {
uni.redirectTo({
url: '/pages/login/login'
});
}
} else if (resp.code === '4001') {
uni.showToast({
title: '当前题库非最新版,请更新~',
icon: 'none'
})
this.getAllQuestion()
}
}) })
}else{ } else {
uni.navigateTo({
url:"/pages/questionBank/questionBank?navTitle="+title+"&subject="+this.subject+"&needVip="+val
})
}
},
toExams(val){
if(storage.get('token')){
uni.navigateTo({
url:"/pages/questionBank/practiceExams?subject="+this.subject+'&'+val
})
}else{
uni.navigateTo({ uni.navigateTo({
url:'/pages/login/login' url: "/pages/questionBank/questionBank?navTitle=" + title + "&subject=" + this.subject + "&needVip=" +
val
}) })
} }
}, },
toExclusive(){ toExams(title) {
uni.navigateTo({ if (storage.get('token')) {
url:"/pages/questionBank/exclusiveExercise?subject="+this.subject if(title=='模拟考试'){
}) getTestQuestionId({
}, versionId: this.version,
toWrongList(){ carTypeId: storage.get('carType') || '1001',
subject: this.subject,
}).then(async (resp) => {
if (resp.code === '0000') {
const arr = resp.data
const listJson = JSON.stringify(arr)
uni.navigateTo({
url: "/pages/questionBank/practiceExams?title=" + title + "&subject=" + this.subject + "&questionIdList=" + listJson
})
} else if (resp.code === '4001') {
uni.showToast({
title: '当前题库非最新版,请更新~',
icon: 'none'
})
this.getAllQuestion()
}
})
}else if(title=='考前秘卷'){
const param=this.subject=='1'?{isExam1: '1'}:{isExam2: '1'}
queryQuestionId({
versionId: this.version,
carTypeId: storage.get('carType') || '1001',
subject: this.subject,
...param
}).then(async (resp) => {
if (resp.code === '0000') {
if (this.token) {
await this.searchUserVip()
const result = this.vipOnList.some(item => item.subjects.includes(this.subject))
if (result) {
uni.navigateTo({
url: "/pages/index/secretPapers?subject=" + this.subject
})
} else {
if (resp.data && resp.data.length > 3) {
const arr = resp.data.slice(0, 3)
} else {
const arr = resp.data
}
const listJson = JSON.stringify(arr)
uni.navigateTo({
url: "/pages/questionBank/practiceExams?title=" + title + "&subject=" + this.subject + "&questionIdList=" + listJson+"&needVip="+result
})
}
} else {
uni.redirectTo({
url: '/pages/login/login'
});
}
} else if (resp.code === '4001') {
uni.showToast({
title: '当前题库非最新版,请更新~',
icon: 'none'
})
this.getAllQuestion()
}
})
}
} else {
uni.navigateTo({ uni.navigateTo({
url:"/pages/questionBank/wrongQuestion?subject="+this.subject url: '/pages/login/login'
}) })
} }
},
toExclusive() {
uni.navigateTo({
url: "/pages/questionBank/exclusiveExercise?subject=" + this.subject
})
},
toWrongList() {
uni.navigateTo({
url: "/pages/questionBank/wrongQuestion?subject=" + this.subject
})
} }
} }
}
</script> </script>
<style scoped> <style scoped>
@ -280,6 +406,7 @@
background: #00B74F; background: #00B74F;
border-radius: 16rpx; border-radius: 16rpx;
} }
.play_btn_2 { .play_btn_2 {
width: 65rpx; width: 65rpx;
height: 65rpx; height: 65rpx;

@ -12,10 +12,10 @@
<view class="video_box"> <view class="video_box">
<view class="flex ai-c jc-sb mt5"> <view class="flex ai-c jc-sb mt5">
<text class="fs18 cor-000">{{subject=='2'?'二':'三'}}考试项目讲解</text> <text class="fs18 cor-000">{{subject=='2'?'二':'三'}}考试项目讲解</text>
<view class="flex ai-c" style="height: 34rpx;line-height: 34rpx;" @tap="changeDiverType"> <!-- <view class="flex ai-c" style="height: 34rpx;line-height: 34rpx;" @tap="changeDiverType">
<text style="color:#05C341;font-size: 16px;">{{diverTypeList[diverTypeIndex]?.configItemName}}</text> <text style="color:#05C341;font-size: 16px;">{{diverTypeList[diverTypeIndex]?.configItemName}}</text>
<u-icon name="list" color="#05C341" size="18"></u-icon> <u-icon name="list" color="#05C341" size="18"></u-icon>
</view> </view> -->
</view> </view>
<view class="skill-sequence-panel-content-wrapper"> <view class="skill-sequence-panel-content-wrapper">
<scroll-view class="skill-sequence-panel-content" scroll-x :scroll-into-view="intoindex"> <scroll-view class="skill-sequence-panel-content" scroll-x :scroll-into-view="intoindex">
@ -49,8 +49,8 @@
</view> </view>
<view class="flex p14lr p20tb bc-fff" style="border-bottom: 1rpx solid #DDDCDC;" <view class="flex p14lr p20tb bc-fff" style="border-bottom: 1rpx solid #DDDCDC;"
v-for="(item,index) of videoList" :key="index" @click="toOperateDetail(item.videoId)"> v-for="(item,index) of videoList" :key="index" @click="toOperateDetail(item.videoId)">
<view class="pic relative" style="overflow: hidden;"> <view class="pic relative hide" style="overflow: hidden;">
<image class="pic" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image> <image class="pic" style="position: absolute;left: 0;top: 0;" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
<image class="play_btn_3" src="../../static/image/index/play.png" /> <image class="play_btn_3" src="../../static/image/index/play.png" />
</view> </view>
<view class="ml10"> <view class="ml10">
@ -105,7 +105,7 @@
async toVipVideo(){ async toVipVideo(){
if (this.token) { if (this.token) {
await this.searchUserVip() await this.searchUserVip()
const res = this.vipOnList.some(item => item.subjects == this.subject) const res = this.vipOnList.some(item => item.subjects.includes(this.subject))
if (!res) { if (!res) {
uni.navigateTo({ uni.navigateTo({
url:"/pages/index/videoVip?subject="+this.subject url:"/pages/index/videoVip?subject="+this.subject
@ -132,7 +132,6 @@
queryProjectList({ queryProjectList({
"carTypeId": storage.get('carType') || '1001', "carTypeId": storage.get('carType') || '1001',
"subject": String(this.subject), "subject": String(this.subject),
"driveType": this.diverTypeList[this.diverTypeIndex].configItemCode,
"type": "2" "type": "2"
}).then(resp => { }).then(resp => {
if (resp.code === '0000') { if (resp.code === '0000') {
@ -183,7 +182,7 @@
getVideoList() { getVideoList() {
queryProjectList({ queryProjectList({
"carTypeId": storage.get('carType') || '1001', "carTypeId": storage.get('carType') || '1001',
"driveType": this.diverTypeList[this.diverTypeIndex].configItemCode, "driveType": '2',
"subject": String(this.subject), "subject": String(this.subject),
"type": "1" "type": "1"
}).then(resp => { }).then(resp => {

@ -1,21 +1,26 @@
<template> <template>
<view> <view>
<u-sticky bgColor="#fff"> <u-loading-page :loading="getLoading" loading-text="题库更新中..."></u-loading-page>
<u-tabs :list="categoryList" :current="curTab" :scrollable="false" @change="changeCategory"></u-tabs> <view v-if="!getLoading">
</u-sticky> <u-sticky bgColor="#fff">
<u-tabs :list="categoryList" :current="curTab" :scrollable="false" @change="changeCategory"></u-tabs>
</u-sticky>
<view style="height: 100vh;background-color: rgb(245, 245, 245);"> <view style="height: 100vh;background-color: rgb(245, 245, 245);">
<template v-if="subject=='1' || subject=='4'"> <template v-if="subject=='1' || subject=='4'">
<Subject1 :subject="subject" :rightList="rightList" :wrongList="wrongList" /> <Subject1 :subject="subject" :rightList="rightList" :wrongList="wrongList" />
</template> </template>
<template v-else> <template v-else>
<Subject2 :subject="subject" ref="subjectRef" /> <Subject2 :subject="subject" ref="subjectRef" />
</template> </template>
</view>
</view> </view>
</view>
</view>
</template> </template>
<script> <script>
import { mapState,mapActions } from 'pinia' // import {
mapState,
mapActions
} from 'pinia' //
import useQuestionStore from '@/jtools/store/question' //store import useQuestionStore from '@/jtools/store/question' //store
import storage from '@/jtools/storage'; import storage from '@/jtools/storage';
import { import {
@ -23,69 +28,73 @@
} from '@/jtools/api/question'; } from '@/jtools/api/question';
import Subject1 from "./components/Subject1"; import Subject1 from "./components/Subject1";
import Subject2 from "./components/Subject2"; import Subject2 from "./components/Subject2";
export default { export default {
components: {Subject1,Subject2}, components: {
data() { Subject1,
Subject2
},
data() {
return { return {
subject:storage.get('curSubject') || '1', subject: storage.get('curSubject') || '1',
curTab:Number(storage.get('curSubject'))-1, curTab: 0,
searchValue:'', searchValue: '',
cityName:'', cityName: '',
categoryList:[], categoryList: [],
rightList:storage.get(`rightList_subject${this.subject}`) || [], rightList: storage.get(`rightList_subject${this.subject}`) || [],
wrongList:storage.get(`wrongList_subject${this.subject}`) || [], wrongList: storage.get(`wrongList_subject${this.subject}`) || [],
}; };
}, },
onLoad(){ onLoad() {
this.curTab=Number(this.curSubject)-1
this.getSubjectConfig() this.getSubjectConfig()
}, },
onShow() { onShow() {
if(this.subject=='1'||this.subject=='4'){ if (this.subject == '1' || this.subject == '4') {
this.rightList=storage.get(`rightList_subject${this.subject}`) || [] this.rightList = storage.get(`rightList_subject${this.subject}`) || []
this.wrongList=storage.get(`wrongList_subject${this.subject}`) || [] this.wrongList = storage.get(`wrongList_subject${this.subject}`) || []
} }
}, },
methods:{ computed: {
...mapActions(useQuestionStore,['getOrderQuestion_sub4','getOrderQuestion_sub1','changeSubject']), ...mapState(useQuestionStore, ["loading_subject4", "loading_subject1","curSubject"]), //tagslist
getLoading() {
return this.loading_subject4 && this.loading_subject1
}
},
methods: {
...mapActions(useQuestionStore, ['getOrderQuestion_sub4', 'getOrderQuestion_sub1', 'changeSubject']),
// //
getSubjectConfig(){ getSubjectConfig() {
const carTypeId=storage.get('carType') || '1001' const carTypeId = storage.get('carType') || '1001'
querySysConfigList(carTypeId,'Subject').then(resp=>{ querySysConfigList(carTypeId, 'Subject').then(resp => {
if(resp.code==='0000'){ if (resp.code === '0000') {
this.categoryList=resp.data.map(item=>{ this.categoryList = resp.data.map(item => {
return{ return {
...item, ...item,
name:item.configItemName name: item.configItemName
} }
}) })
} }
}) })
}, },
// //
async changeCategory(val){ async changeCategory(val) {
this.subject=val.configItemCode this.subject = val.configItemCode
console.log();
if(this.subject=='1'){
await this.getOrderQuestion_sub1()
}else if(this.subject=='4'){
await this.getOrderQuestion_sub4()
}else{
this.changeSubject(this.subject) this.changeSubject(this.subject)
setTimeout(()=>{ if (this.subject == '1' || this.subject == '4') {
this.$refs.subjectRef.getDiverType() this.rightList = storage.get(`rightList_subject${this.subject}`) || []
},100) this.wrongList = storage.get(`wrongList_subject${this.subject}`) || []
} } else {
if(this.subject=='1'||this.subject=='4'){ setTimeout(() => {
this.rightList=storage.get(`rightList_subject${this.subject}`) || [] this.$refs.subjectRef.getDiverType()
this.wrongList=storage.get(`wrongList_subject${this.subject}`) || [] }, 100)
} }
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .u-tabs__wrapper__nav__line { ::v-deep .u-tabs__wrapper__nav__line {
background: linear-gradient(90deg, #11DF20 0%, #00B74F 100%) !important; background: linear-gradient(90deg, #11DF20 0%, #00B74F 100%) !important;
bottom: 14rpx !important; bottom: 14rpx !important;
} }

@ -0,0 +1,139 @@
<template>
<view>
<u-loading-page :loading="getLoading" loading-text="题库更新中..."></u-loading-page>
<view class="relative" v-if="!getLoading"
style="width: 100%;background-image: url(https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E8%80%83%E5%89%8D%E5%AF%86%E5%8D%B7_20230904212623.png);background-size: 100% 100%;height: 100vh;">
<view style="position: absolute;top: 320px;" class="wp100 p35lr flex jc-sb ai-c">
<view class="paper_item" @tap="toExam({isExam1:'1'})">
<view class="topTitle">
秘卷一
</view>
<view class="bottom">
<text class="wenzi">新规考点提炼</text>
<view class="wp100 p5 mt15">
<view class="btn">
去考试
</view>
</view>
</view>
</view>
<view class="paper_item" @tap="toExam({isExam2:'1'})">
<view class="topTitle">
秘卷二
</view>
<view class="bottom">
<text class="wenzi">精选高频考试</text>
<view class="wp100 p5 mt15">
<view class="btn">
去考试
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState,
mapActions
} from 'pinia' //
import useQuestionStore from '@/jtools/store/question' //store
import storage from '@/jtools/storage';
import {
queryQuestionId,
getTestQuestionId
} from '@/jtools/api/question';
export default {
data() {
return {
subject:'1'
}
},
onLoad(op){
if(op.subject){
this.subject=op.subject
}
},
computed: {
...mapState(useQuestionStore, ["loading_subject4", "loading_subject1", "curSubject","version"]), //tagslist
getLoading() {
return this.loading_subject4 && this.loading_subject1
}
},
methods: {
...mapActions(useQuestionStore, ['getOrderQuestion_sub4', 'getOrderQuestion_sub1', 'changeSubject']),
toExam(param) {
queryQuestionId({
versionId: this.version,
carTypeId: storage.get('carType') || '1001',
subject: this.subject,
...param
}).then(async (resp) => {
if (resp.code === '0000') {
const arr = resp.data
const listJson = JSON.stringify(arr)
uni.navigateTo({
url: "/pages/questionBank/practiceExams?title=考前秘卷&subject=" + this.subject + "&questionIdList=" + listJson
})
}
})
},
}
}
</script>
<style scoped>
.paper_item {
width: 287rpx;
height: 320rpx;
/* border: 4px solid #F8A42C; */
border-radius: 16rpx;
}
.topTitle {
width: 100%;
height: 85rpx;
line-height: 85rpx;
text-align: center;
background: linear-gradient(90deg, #E66501 0%, #F8A42C 100%);
border-radius: 16rpx 16rpx 0rpx 0rpx;
font-size: 48rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
}
.bottom {
padding-top: 15px;
width: 100%;
height: 235rpx;
border-radius: 0rpx 0rpx 16rpx 16rpx;
border-bottom: 4px solid #F8A42C;
border-left: 4px solid #F8A42C;
border-right: 4px solid #F8A42C;
text-align: center;
}
.wenzi {
font-size: 40rpx;
font-family: PingFang SC;
font-weight: 600;
color: #7D4310;
line-height: 48rpx;
}
.btn {
width: 246rpx;
height: 76rpx;
text-align: center;
line-height: 76rpx;
color: #fff;
background: linear-gradient(0deg, #E66501 0%, #F8A42C 100%);
box-shadow: 0rpx 2rpx 21rpx 0rpx #F7A12A;
border-radius: 38rpx;
}
</style>

@ -91,6 +91,11 @@
</template> </template>
<script> <script>
import {
mapState,
mapActions
} from 'pinia' //
import useQuestionStore from '@/jtools/store/question' //store
import useUserStore from '@/jtools/store/user' import useUserStore from '@/jtools/store/user'
import { import {
getTestQuestion, getTestQuestion,
@ -100,13 +105,14 @@
export default { export default {
data() { data() {
return { return {
subject: 1, subject:'1',
questionIndex: 1, questionIndex: 1,
list: [], list: [],
mutiAns: [] mutiAns: []
} }
}, },
computed: { computed: {
...mapState(useQuestionStore, ["orderQuestion_subject1", "orderQuestion_subject4", "version"]), //tagslis
user() { user() {
return useUserStore().userInfo return useUserStore().userInfo
}, },
@ -126,7 +132,14 @@
}, },
onLoad(option) { onLoad(option) {
this.subject = option.subject || 1 this.subject = option.subject || 1
this._getList() if(option.questionIdList){
const idList=JSON.parse(op.questionIdList)
let arr = this[`orderQuestion_subject${this.subject}`].filter(qItem=>idList.includes(qItem.questionId))
this.list = arr.map(it => ({
...it,
yourAnswer: ''
}))
}
}, },
methods: { methods: {
fz() { fz() {
@ -134,19 +147,19 @@
orientation: 'landscape' orientation: 'landscape'
}); });
}, },
_getList() { // _getList() {
getTestQuestion({ // getTestQuestion({
carTypeId: storage.get('carType') || '1001', // carTypeId: storage.get('carType') || '1001',
subject: this.subject // subject: this.subject
}).then(resp => { // }).then(resp => {
if (resp.code === '0000') { // if (resp.code === '0000') {
this.list = resp.data.map(it => ({ // this.list = resp.data.map(it => ({
...it, // ...it,
yourAnswer: '' // yourAnswer: ''
})) // }))
} // }
}) // })
}, // },
handleAnswer(index) { handleAnswer(index) {
// //
let q = this.list[this.questionIndex - 1] let q = this.list[this.questionIndex - 1]

@ -151,7 +151,7 @@
color:#fff color:#fff
} }
.tag{ .tag{
width: 122rpx; padding:0 5px;
height: 36rpx; height: 36rpx;
background: linear-gradient(90deg, #E66501 0%, #F8A42C 100%); background: linear-gradient(90deg, #E66501 0%, #F8A42C 100%);
border-radius: 8rpx 20rpx 8rpx 8rpx; border-radius: 8rpx 20rpx 8rpx 8rpx;

@ -1,8 +1,8 @@
<template> <template>
<view class="content"> <view class="content">
<view class="header"> <view class="header">
<image src="/static/image/login/logo.jpg" mode="widthFix"></image> <image src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E9%87%91%E6%AD%A6%E8%81%94_20230831123333.png" mode="widthFix"></image>
<view class="mt21 fs16 cor-333 fwb text-center">欢迎使用金武驾考</view> <view class="mt21 fs16 cor-333 fwb text-center">欢迎使用金武驾考</view>
</view> </view>
<view class="list"> <view class="list">
@ -82,6 +82,8 @@
if(isPhone(this.login.phone) && this.login.code) { if(isPhone(this.login.phone) && this.login.code) {
useUserStore().login(this.login).then(resp => { useUserStore().login(this.login).then(resp => {
if(resp.userId) { if(resp.userId) {
useUserStore().getUserInfo()
useUserStore().searchUserVip()
this.toHome() this.toHome()
} }
}) })

@ -2,13 +2,13 @@
<view class="bc-f5"> <view class="bc-f5">
<!-- <view class="wp100" style="background-color: #333;height: 205px;"></view> --> <!-- <view class="wp100" style="background-color: #333;height: 205px;"></view> -->
<view class="relative" style="height: 205px;"> <view class="relative" style="height: 205px;">
<image src="/static/image/mine/mine_bg.png" mode="widthFix" style="width: 100%;"></image> <image src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/vip%E8%83%8C%E6%99%AF%E7%BB%BF_20230831010645.png" mode="widthFix" style="width: 100%;"></image>
<view class="info flex ai-c" v-if="isLogin"> <view class="info flex ai-c" v-if="isLogin">
<u-avatar class="br-p50 overflow-h" :size="64" mp-avatar shape="circle"></u-avatar> <u-avatar class="br-p50 overflow-h" :size="64" mp-avatar shape="circle"></u-avatar>
<view class="ml12"> <view class="ml12">
<view class="flex ai-c fs18 cor-333 fwb"> <view class="flex ai-c fs18 cor-333 fwb">
<text class="mr10">{{ user.userName }}{{ user.userId }}</text> <text class="mr10">{{ user.userName }}{{ user.userId }}</text>
<image v-if="vipOn.length" src="/static/image/mine/vip.png" mode="widthFix" style="width: 18px;"></image> <image v-if="vipOn.length" src="../../static/image/mine/vip.png" mode="widthFix" style="width: 18px;"></image>
</view> </view>
<view class="mt5 fs14 cor-666">陪您学车 {{ user.days }}</view> <view class="mt5 fs14 cor-666">陪您学车 {{ user.days }}</view>
</view> </view>
@ -25,7 +25,7 @@
</view> </view>
<view class="p15lr" style="transform: translateY(-90px);"> <view class="p15lr" style="transform: translateY(-90px);">
<view class="relative mb10" @tap="handleVip"> <view class="relative mb10" @tap="handleVip">
<image src="/static/image/mine/vip_bg.png" mode="widthFix" style="width: 100%;"></image> <image src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/vip%E8%83%8C%E6%99%AF%E9%BB%841_20230831010645.png" mode="widthFix" style="width: 100%;"></image>
<view class="absolute p15lr p10tb flex ai-c jc-sb" style="left: 0;top: 0;right: 0;height: 40px;"> <view class="absolute p15lr p10tb flex ai-c jc-sb" style="left: 0;top: 0;right: 0;height: 40px;">
<view class="flex ai-c"> <view class="flex ai-c">
<view class="p3 br-p50" style="background-color: #873E1D;"> <view class="p3 br-p50" style="background-color: #873E1D;">

@ -11,10 +11,6 @@
<view class="m30lr fs14 cor-333 fl1">安徽省合肥市包河区</view> <view class="m30lr fs14 cor-333 fl1">安徽省合肥市包河区</view>
<u-icon name="arrow-right" color="#999" /> <u-icon name="arrow-right" color="#999" />
</view> </view>
<view class="flex ai-c wp100" style="height: 110rpx;" @tap="toUpload">
<view class="fs14 cor-666 fl1">证件照上传</view>
<u-icon name="arrow-right" color="#999" />
</view>
</view> </view>
</view> </view>
</template> </template>
@ -27,11 +23,6 @@
} }
}, },
methods: { methods: {
toUpload(){
uni.navigateTo({
url:"/pages/me/uploadPic"
})
}
} }
} }
</script> </script>

@ -1,42 +1,222 @@
<template> <template>
<view class="p15 bc-f5"> <view class="">
<view class="br8 bc-fff p15lr"> <view class="wp100 bc-fff p14">
<view class="flex ai-c bb1" style="height: 110rpx;"> <view class="title fontColor">第一步 上传学员图像</view>
<view class="title">体检结果</view> <view class="mt15">
<view class="ml30 fs14 cor-333 fl1">通过</view> <!-- <u-upload width="165" height="165" :file-list=" fileList1" multiple :max-count="1" @afterRead="afterRead" @delete="deletePic" /> -->
</view> <!-- <u-upload ref="uUpload" class="mt25" :size-type="['compressed']" :file-list="fileList1" deletable :multiple="false" :max-count="1" width="165rpx" height="165rpx" @afterRead="afterRead" @delete="deletePic" /> -->
<view class="flex ai-c" style="height: 110rpx;"> <view style="width: 320rpx;height:300rpx;background-color: rgb(247, 255, 255);border-radius: 20rpx;">
<view class="title">体检时间</view> <view style="width: 320rpx;height:240rpx;" class="flex jc-c ai-c">
<view class="ml30 fs14 cor-333 fl1">2023-08-10 14:35:23</view> <image v-if="fileList&&fileList.length" style="width: 240rpx;height: 240rpx;" :src="fileList[0].url">
</view> </image>
<view class="flex ai-fs" style="height: 110rpx;"> <u-avatar v-else class="br-p50 overflow-h" :size="64" mp-avatar shape="circle"></u-avatar>
<view class="title">体检时间</view> </view>
<image class="ml30" src="/static/image/mine/tijian.png" style="width: 333rpx;" mode="widthFix"></image> <u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" multiple :maxCount="1" width="150"
</view> height="150">
</view> <view
</view> style="width: 320rpx;height:60rpx;line-height:60rpx;background-color: #05C341;border-radius: 0 0 20rpx 20rpx;"
class="text-center cor-fff">
点击
</view>
</u-upload>
</view>
</view>
<view class="mt20">
<view class="title fontColor">第二步 核实后再提交</view>
<u--form labelPosition="left" labelWidth="80" :model="form" :rules="rules" ref="form1">
<u-form-item label="姓名" :required="true" prop="name" borderBottom ref="item1">
<u--input v-model="form.name" border="none"></u--input>
</u-form-item>
<u-form-item label="身份证号" :required="true" prop="idNum" borderBottom ref="item2">
<u--input v-model="form.idNum" border="none"></u--input>
</u-form-item>
</u--form>
</view>
<view style="margin-top: 20px;">
<u-button type="primary" :style="{width: '100%',borderRadius:'40rpx',backgroundColor:'#05C341'}" :disabled="saving" text="提交"
@click="submit" />
</view>
</view>
</view>
</template> </template>
<script> <script>
export default { import storage from '@/jtools/storage';
data() { export default {
return { data() {
const shenfenzhen = (rule, value, callback) => {
/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value) ? callback() : callback(
new Error('请输入正确的身份证号'))
}
return {
form: {
name: '',
idNum: ''
},
fileList:[],
fileList1: [],
uploadList: [],
saving: false,
rules: {
name: [{
required: true,
message: '请输入姓名',
trigger: ['blur', 'change']
}],
idNum: [{
required: true,
message: '请输入身份证号',
trigger: ['blur', 'change']
},{
//
validator: shenfenzhen,
message: '身份证号码不正确',
// blurchange
trigger: ['change', 'blur'],
}]
}
};
},
onReady() {
if(storage.get('photoForm')){
this.fileList=storage.get('photoForm').file
this.form={
name: storage.get('photoForm').name,
idNum: storage.get('photoForm').idNum
}
}
this.$refs.form1.setRules(this.rules);
},
methods: {
//
deletePic(event) {
this.fileList1.splice(event.index, 1);
this.uploadList.splice(event.index, 1);
},
//
async afterRead(event) {
// this.compressImage(event.file);
// multiple true , file
const lists = [].concat(event.file);
this.fileList=lists
this.fileList1 = [];
uni.showToast({
title:'上传成功!'
})
},
uploadFilePromise(url) {
this.saving = true;
return new Promise((resolve, reject) => {
uni.uploadFile({
url: process.env.VUE_APP_BASE_API + 'mongodb/uploadFile', //
filePath: url,
name: 'file',
success: (res) => {
// setTimeout(() => {
resolve(JSON.parse(res.data).data);
// }, 100);
this.saving = false;
},
fail: () => {
resolve(null);
this.saving = false;
}
});
});
},
//
submit() {
this.$refs.form1.validate().then((valid) => {
if (valid) {
const param={
file:this.fileList,
...this.form
}
storage.set('photoForm',param)
uni.showToast({
title:"提交成功!",
duration:2000,
})
setTimeout(()=>{
uni.navigateBack()
},1000)
} else {
console.log('验证失败');
}
});
} },
}, async compressImage(image) {
methods: { const img = new Image();
img.src = image.url;
} img.onload = async () => {
} const canvas = document.createElement('canvas'); // Canvas()
const context = canvas.getContext('2d');
//
const cw = img.width;
const ch = img.height;
let w = img.width;
let h = img.height;
canvas.width = w;
canvas.height = h;
if (cw > 400 && cw > ch) {
w = 400;
h = (400 * ch) / cw;
canvas.width = w;
canvas.height = h;
}
if (ch > 400 && ch > cw) {
h = 400;
w = (400 * cw) / ch;
canvas.width = w;
canvas.height = h;
}
// canvas
let base64;
//
context.clearRect(0, 0, 0, w, h);
context.drawImage(img, 0, 0, w, h);
if (image.size > 2000000) {
// 2m,
base64 = canvas.toDataURL(image['type'], 0.5);
}
const result = await this.uploadFilePromise(base64 || image.url);
this.uploadList.push(result);
};
}
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.title { .upload-img {
width: 120rpx; width: 165rpx;
font-size: 14px; height: 165rpx;
color: #666; border: 1px dashed #c4c4c4;
} display: flex;
.bb1 { justify-content: center;
border-bottom: 1px solid #eee; align-items: center;
} }
.fontColor {
color: #383838;
font-weight: 400;
}
::v-deep .u-textarea__count {
background-color: #f9faf9 !important;
}
::v-deep .u-upload__button>.u-icon>.u-icon__icon {
font-size: 90rpx !important;
}
::v-deep .u-button--square {
border-radius: 40rpx !important;
}
::v-deep .u-button--primary{
background-color: #05C341 !important;
border-color: #05C341 !important;
}
</style> </style>

@ -5,21 +5,21 @@
<view class="mt15"> <view class="mt15">
<!-- <u-upload width="165" height="165" :file-list=" fileList1" multiple :max-count="1" @afterRead="afterRead" @delete="deletePic" /> --> <!-- <u-upload width="165" height="165" :file-list=" fileList1" multiple :max-count="1" @afterRead="afterRead" @delete="deletePic" /> -->
<!-- <u-upload ref="uUpload" class="mt25" :size-type="['compressed']" :file-list="fileList1" deletable :multiple="false" :max-count="1" width="165rpx" height="165rpx" @afterRead="afterRead" @delete="deletePic" /> --> <!-- <u-upload ref="uUpload" class="mt25" :size-type="['compressed']" :file-list="fileList1" deletable :multiple="false" :max-count="1" width="165rpx" height="165rpx" @afterRead="afterRead" @delete="deletePic" /> -->
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" multiple :maxCount="1" width="150"
height="150">
<view style="width: 320rpx;height:300rpx;background-color: rgb(247, 255, 255);border-radius: 20rpx;"> <view style="width: 320rpx;height:300rpx;background-color: rgb(247, 255, 255);border-radius: 20rpx;">
<view style="width: 320rpx;height:240rpx;" class="flex jc-c ai-c"> <view style="width: 320rpx;height:240rpx;" class="flex jc-c ai-c">
<image v-if="fileList1&&fileList1.length" style="width: 240rpx;height: 240rpx;" :src="fileList1[0].url"> <image v-if="fileList1&&fileList1.length" style="width: 240rpx;height: 240rpx;" :src="fileList1[0].url">
</image> </image>
<u-avatar v-else class="br-p50 overflow-h" :size="64" mp-avatar shape="circle"></u-avatar> <u-avatar v-else class="br-p50 overflow-h" :size="64" mp-avatar shape="circle"></u-avatar>
</view> </view>
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" multiple :maxCount="1" width="150"
height="150">
<view <view
style="width: 320rpx;height:60rpx;line-height:60rpx;background-color: #3C9CFF;border-radius: 0 0 20rpx 20rpx;" style="width: 320rpx;height:60rpx;line-height:60rpx;background-color: #3C9CFF;border-radius: 0 0 20rpx 20rpx;"
class="text-center cor-fff"> class="text-center cor-fff">
点击 点击
</view> </view>
</u-upload>
</view> </view>
</u-upload>
</view> </view>
<view class="mt20"> <view class="mt20">
<view class="title fontColor">第二步 核实后再提交</view> <view class="title fontColor">第二步 核实后再提交</view>

@ -12,8 +12,8 @@
<swiper class="swiper" :current="current" style="height: 120px;" :autoplay="false" :display-multiple-items="1.45" <swiper class="swiper" :current="current" style="height: 120px;" :autoplay="false" :display-multiple-items="1.45"
:disable-programmatic-animation="true" @change="onChange"> :disable-programmatic-animation="true" @change="onChange">
<swiper-item v-for="(item, index) in vipAllList" :key="index"> <swiper-item v-for="(item, index) in vipAllList" :key="index">
<view class="relative"> <view class="relative" style="background-image: url(https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/vip%E8%83%8C%E6%99%AF_20230831010348.png);width: 95%;height: 204rpx;background-size: 100% 100%;">
<image src="../../static/image/mine/vip_card.png" mode="widthFix" style="width:95%;"></image> <!-- <image src="" mode="widthFix" style="width:95%;"></image> -->
<view class="vip-info"> <view class="vip-info">
<u-avatar class="br-p50 overflow-h" style="border: 3px solid #873E1D;" :size="35" mp-avatar></u-avatar> <u-avatar class="br-p50 overflow-h" style="border: 3px solid #873E1D;" :size="35" mp-avatar></u-avatar>
<view class="ml10"> <view class="ml10">
@ -44,7 +44,7 @@
<swiper class="swiper" :current="current" style="height: 300px;" :autoplay="false" <swiper class="swiper" :current="current" style="height: 300px;" :autoplay="false"
:disable-programmatic-animation="true" @change="onChange"> :disable-programmatic-animation="true" @change="onChange">
<swiper-item v-for="(item, index) in vipAllList" :key="index"> <swiper-item v-for="(item, index) in vipAllList" :key="index">
<view v-if="index == 0 || index == 3" class="p15 br8 cor-fff"> <view v-if="index == 0 || index == 3" class="p15 br8 cor-fff bc-fff">
<view class="fs18 cor-000 fwb"> <view class="fs18 cor-000 fwb">
3步轻松学{{ getKmTitle(item.subjects) }} 3步轻松学{{ getKmTitle(item.subjects) }}
</view> </view>
@ -165,8 +165,8 @@ export default {
return '开通vip助您快速拿证' return '开通vip助您快速拿证'
} }
}, },
vipHasOpened(item) { vipHasOpened(item) {;
return !!this.vipOnList.find(it => it.memberId == item.memberId) return !!this.vipOnList.some(it => it.subjects.includes(item.subjects) )
}, },
// 500 item=> vip // 500 item=> vip
to500(item) { to500(item) {
@ -261,6 +261,7 @@ export default {
left: 10px; left: 10px;
display: flex; display: flex;
align-items: center; align-items: center;
z-index: 1;
} }
.corner { .corner {
@ -277,6 +278,7 @@ export default {
justify-content: center; justify-content: center;
font-size: 12px; font-size: 12px;
color: #fff; color: #fff;
z-index: 1;
} }
.renew { .renew {
@ -292,6 +294,7 @@ export default {
border-radius: 26rpx; border-radius: 26rpx;
font-size: 12px; font-size: 12px;
color: #F6E99F; color: #F6E99F;
z-index: 1;
} }
.buy { .buy {
@ -308,6 +311,7 @@ export default {
border-radius: 30rpx; border-radius: 30rpx;
font-size: 14px; font-size: 14px;
color: #F6E99F; color: #F6E99F;
z-index: 1;
} }
.study { .study {

@ -1,17 +1,17 @@
<template> <template>
<view> <view>
<j-navbar>基本操作</j-navbar> <j-navbar>基本操作</j-navbar>
<u-sticky bgColor="#fff"> <!-- <u-sticky bgColor="#fff">
<u-tabs :list="categoryList" :scrollable="false" @click="changeCategory"></u-tabs> <u-tabs :list="categoryList" :scrollable="false" @click="changeCategory"></u-tabs>
</u-sticky> </u-sticky> -->
<view class="p14"> <view class="p14">
<!-- <view class="flex ai-c"> <!-- <view class="flex ai-c">
<view class="car_item mr10" v-for="(item,index) of carTypeList" :key="index" @tap="chooseCar(item.value)" :class="item.value===tCar?'checked_car':'unchecked_car'">{{item.label}}</view> <view class="car_item mr10" v-for="(item,index) of carTypeList" :key="index" @tap="chooseCar(item.value)" :class="item.value===tCar?'checked_car':'unchecked_car'">{{item.label}}</view>
</view> --> </view> -->
<view class="flex p14lr p20tb bc-fff mb10" style="border-radius: 10rpx;" <view class="flex p14lr p20tb bc-fff mb10" style="border-radius: 10rpx;"
v-for="(item,index) of videoList" :key="index" @tap="toOperateDetail(item.videoId)"> v-for="(item,index) of videoList" :key="index" @tap="toOperateDetail(item.videoId)">
<view class="pic relative" style="overflow: hidden;"> <view class="pic relative hide" style="overflow: hidden;">
<image class="pic" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image> <image class="pic" style="position: absolute;left: 0;top:0" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
<image class="play_btn_2" src="../../static/image/index/play.png" /> <image class="play_btn_2" src="../../static/image/index/play.png" />
</view> </view>
<view class="ml10"> <view class="ml10">
@ -51,7 +51,6 @@
if(op.type){ if(op.type){
this.type=op.type this.type=op.type
} }
console.log(this.type);
this.getDiverType() this.getDiverType()
}, },
methods:{ methods:{
@ -83,7 +82,6 @@
queryProjectList({ queryProjectList({
"carTypeId": storage.get('carType') || '1001', "carTypeId": storage.get('carType') || '1001',
"subject": String(this.subject), "subject": String(this.subject),
"driveType": this.categoryList[this.tCar].configItemCode,
"type": this.type "type": this.type
}).then(resp => { }).then(resp => {
if(resp.code==='0000'){ if(resp.code==='0000'){
@ -156,4 +154,10 @@
left: 117.5rpx; left: 117.5rpx;
top: 52rpx top: 52rpx
} }
.hide {
backface-visibility: hidden;
transform: translate3d(0, 0, 0);
-webkit-backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
}
</style> </style>

@ -1,28 +1,71 @@
<template> <template>
<view> <view>
<view class="chapter_item p14" v-for="(item,index) of chapterList" :key="index" @tap="toQuestion(item.configItemCode)"> <u-loading-page :loading="getLoading" loading-text="题库更新中..."></u-loading-page>
{{item.configItemName}} <view v-if="!getLoading">
<view class="chapter_item p14" v-for="(item,index) of chapterList" :key="index" @tap="toQuestion(item.configItemCode)">
{{item.configItemName}}
</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import {
querySysConfigList querySysConfigList,
queryQuestionId
} from '@/jtools/api/question'; } from '@/jtools/api/question';
import {
mapState,
mapActions
} from 'pinia' //
import useQuestionStore from '@/jtools/store/question' //store
import storage from '@/jtools/storage'; import storage from '@/jtools/storage';
export default { export default {
data() { data() {
return { return {
chapterList:[] chapterList:[],
subject:'1'
} }
}, },
onLoad(){ onLoad(op){
if(op.subject){
this.subject=op.subject
}
this.getChapterList() this.getChapterList()
}, },
computed: {
...mapState(useQuestionStore, ["loading_subject4", "loading_subject1", "version"]), //tagslist
getLoading() {
return this.loading_subject4 && this.loading_subject1
}
},
methods:{ methods:{
...mapActions(useQuestionStore, ['getAllQuestion']),
getQuestion(param,title) {
queryQuestionId({
versionId: this.version,
carTypeId: storage.get('carType') || '1001',
subject: this.subject,
...param,
}).then(async (resp) => {
if (resp.code === '0000') {
const arr = resp.data
const listJson = JSON.stringify(arr)
uni.navigateTo({
url: "/pages/questionBank/questionBank?navTitle=" + title + "&subject=" + this.subject + "&questionIdList=" + listJson
})
}else if (resp.code === '4001') {
uni.showToast({
title: '当前题库非最新版,请更新~',
icon: 'none'
})
this.getAllQuestion()
}
})
},
getChapterList(){ getChapterList(){
const carTypeId=storage.get('carType') || '1001' const carTypeId=storage.get('carType') || '1001'
const key=this.subject=='1'?'ChapterOfSubjectOne':'ChapterOfSubjectFour'
querySysConfigList(carTypeId,'ChapterOfSubjectOne').then(resp=>{ querySysConfigList(carTypeId,'ChapterOfSubjectOne').then(resp=>{
if(resp.code==='0000'){ if(resp.code==='0000'){
this.chapterList=resp.data this.chapterList=resp.data
@ -30,9 +73,7 @@
}) })
}, },
toQuestion(code){ toQuestion(code){
uni.navigateTo({ this.getQuestion({chapter:code},'章节技巧')
url:"/pages/questionBank/questionBank?navTitle=章节技巧&chapter="+code
})
} }
} }
} }

File diff suppressed because it is too large Load Diff

@ -15,7 +15,7 @@
<text>未做题</text> <text>未做题</text>
</view> </view>
<view class="text-center wp33" @tap="toQuestionBank"> <view class="text-center wp33" @tap="toQuestionBank">
<view>{{wrongList.length}}</view> <view>{{wrongList?.length}}</view>
<text>看错题</text> <text>看错题</text>
</view> </view>
<view class="text-center wp33 flex jc-c ai-c" style="flex-direction: column;" @tap="toExams"> <view class="text-center wp33 flex jc-c ai-c" style="flex-direction: column;" @tap="toExams">
@ -108,6 +108,7 @@
this.doNotNum=op.doNotNum this.doNotNum=op.doNotNum
} }
if(op.wrongList){ if(op.wrongList){
console.log(op.wrongList);
this.wrongList=JSON.parse(op.wrongList) || [] this.wrongList=JSON.parse(op.wrongList) || []
} }
if(op.score){ if(op.score){
@ -124,6 +125,13 @@
onReady() { onReady() {
this.getServerData(); this.getServerData();
}, },
onUnload() {
//#ifdef MP-WEIXIN
uni.reLaunch({
url:"/pages/index/index"
})
//#endif
},
computed: { computed: {
...mapState(useUserStore, ["vipOnList"]) ...mapState(useUserStore, ["vipOnList"])
}, },
@ -131,7 +139,7 @@
...mapActions(useUserStore, ['searchUserVip']), ...mapActions(useUserStore, ['searchUserVip']),
async toVip(){ async toVip(){
await this.searchUserVip() await this.searchUserVip()
const res = this.vipOnList.some(item => item.subjects == this.subject) const res = this.vipOnList.some(item => item.subjects.includes(this.subject))
if(res){ if(res){
uni.navigateTo({ uni.navigateTo({
url: '/pages/me/vip' url: '/pages/me/vip'
@ -166,10 +174,17 @@
}) })
}, },
toQuestionBank(){ toQuestionBank(){
const list =JSON.stringify(this.wrongList) if(this.wrongList.length==0){
uni.navigateTo({ uni.showToast({
url:"/pages/questionBank/questionBank?navTitle=错题&subject="+this.subject+"&questionList="+list title:'当前无错题~',
}) icon:'none'
})
}else{
const list =JSON.stringify(this.wrongList)
uni.navigateTo({
url:"/pages/questionBank/questionBank?navTitle=错题&subject="+this.subject+"&questionList="+list
})
}
}, },
// //
toExams(){ toExams(){

@ -1,42 +1,48 @@
<template> <template>
<view class="p14"> <view>
<view class="flex jc-sb"> <u-loading-page :loading="getLoading" loading-text="题库更新中..."></u-loading-page>
<view class="relative mr5" @tap="toIconSkill"> <view class="p14" v-if="!getLoading">
<image style="width: 336rpx;height: 152rpx;" src="../../static/image/practice/errorprone_bg.png"> <view class="flex jc-sb">
</image> <view class="relative mr5" @tap="toIconSkill">
<view style="position: absolute;left: 0;top: 0;" class="p10"> <image style="width: 336rpx;height: 152rpx;" src="../../static/image/practice/errorprone_bg.png">
<view style="color: #04B13B;font-size: 18px;">图标技巧</view> </image>
<text style="color: #04B13B;font-size: 14px;">快速记忆</text> <view style="position: absolute;left: 0;top: 0;" class="p10">
<view style="color: #04B13B;font-size: 18px;">图标技巧</view>
<text style="color: #04B13B;font-size: 14px;">快速记忆</text>
</view>
</view> </view>
</view> <view class="relative ml5" @tap="toChapterSkill">
<view class="relative ml5" @tap="toChapterSkill"> <image style="width: 363rpx;height: 170rpx;" src="../../static/image/practice/chapter_bg.png"></image>
<image style="width: 363rpx;height: 170rpx;" src="../../static/image/practice/chapter_bg.png"></image> <view style="position: absolute;left: 0;top: 0;" class="p10">
<view style="position: absolute;left: 0;top: 0;" class="p10"> <view style="color: #FF6E02;font-size: 18px;">章节练习</view>
<view style="color: #FF6E02;font-size: 18px;">节练习</view> <text style="color: #FF6E02;font-size: 14px;">共5</text>
<text style="color: #FF6E02;font-size: 14px;">共5章</text> </view>
</view> </view>
</view> </view>
</view> <view class="bc-fff pt14" style="border-radius: 20rpx;">
<view class="bc-fff pt14" style="border-radius: 20rpx;"> <u-grid :border="false" col="4">
<u-grid :border="false" col="4"> <u-grid-item v-for="(listItem,listIndex) in list" :key="listIndex"
<u-grid-item v-for="(listItem,listIndex) in list" :key="listIndex" @click="toAnswer(listItem.title,listItem.isError,listItem.isNew)"> @click="toAnswer(listItem.title,listItem.isError,listItem.isNew)">
<view style="width: 84rpx;height: 84rpx;"> <view class="mb5" style="width: 84rpx;height: 84rpx;">
<image style="width: 84rpx;height: 100rpx;" mode="widthFix" :src="listItem.image"></image> <image style="width: 84rpx;height:84rpx;" mode="heightFix" :src="listItem.image"></image>
</view>
<text class="grid-text fs14 cor-000">{{listItem.title}}</text>
<text class="grid-text mb10 fs12 cor-999">{{listItem.subTitle}}</text>
</u-grid-item>
</u-grid>
</view>
<view class="mt14 p14 bc-fff" style="border-radius: 20rpx;">
<text class="fs18 cor-000 fw600">常见考点</text>
<view class="flex ai-c wp100 mt10" style="flex-wrap: wrap;">
<view class="wp50 flex ai-c p15tb" style="border-bottom: 1rpx solid #DDDCDC;"
v-for="(item,index) of testCenterList" :key="index" @tap="toQuestionBank(item)">
<view class="dot_item">{{index+1}}</view>
<text class="ml5 topic_cont_text" style="width: calc(100% - 65rpx);">{{item.configItemName}}</text>
</view> </view>
<text class="grid-text fs14 cor-000">{{listItem.title}}</text>
<text class="grid-text mb10 fs12 cor-999">{{listItem.subTitle}}</text>
</u-grid-item>
</u-grid>
</view>
<view class="mt14 p14 bc-fff" style="border-radius: 20rpx;">
<text class="fs18 cor-000 fw600">常见考点</text>
<view class="flex ai-c wp100 mt10" style="flex-wrap: wrap;">
<view class="wp50 flex ai-c p15tb" style="border-bottom: 1rpx solid #DDDCDC;" v-for="(item,index) of testCenterList" :key="index" @tap="toQuestionBank(item)">
<view class="dot_item">{{index+1}}</view>
<text class="ml5 topic_cont_text" style="width: calc(100% - 65rpx);">{{item.configItemName}}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
@ -49,8 +55,14 @@
import tupianIcon from "../../static/image/index/tupian.png" import tupianIcon from "../../static/image/index/tupian.png"
import { import {
querySysConfigList, querySysConfigList,
querySpecialNum querySpecialNum,
queryQuestionId
} from '@/jtools/api/question'; } from '@/jtools/api/question';
import {
mapState,
mapActions
} from 'pinia' //
import useQuestionStore from '@/jtools/store/question' //store
import storage from '@/jtools/storage'; import storage from '@/jtools/storage';
export default { export default {
data() { data() {
@ -58,199 +70,222 @@
errorIcon, errorIcon,
newRulesIcon, newRulesIcon,
neverWriteIcon, neverWriteIcon,
list:[{ list: [{
title:'新规题', title: '新规题',
subTitle:'392题', subTitle: '392题',
isNew:1, isNew: 1,
isError:0, isError: 0,
image:newRulesIcon image: newRulesIcon
},{ }, {
title:'易错题', title: '易错题',
isNew:0, isNew: 0,
isError:1, isError: 1,
subTitle:'392题', subTitle: '392题',
image:errorIcon image: errorIcon
},{ }, {
title:'单选题', title: '单选题',
subTitle:'392题', subTitle: '392题',
isNew:0, isNew: 0,
isError:0, isError: 0,
image:danxuanIcon image: danxuanIcon
},{ }, {
title:'判断题', title: '判断题',
subTitle:'392题', subTitle: '392题',
isNew:0, isNew: 0,
isError:0, isError: 0,
image:panduanIcon image: panduanIcon
},{ }, {
title:'图片题', title: '图片题',
subTitle:'392题', subTitle: '392题',
isNew:0, isNew: 0,
isError:0, isError: 0,
image:tupianIcon image: tupianIcon
}], }],
testCenterList:[], testCenterList: [],
subject:'1' subject: '1'
} }
}, },
onLoad(op){ onLoad(op) {
if(op.subject){ if (op.subject) {
this.subject=op.subject this.subject = op.subject
} }
this.getExamPoint() this.getExamPoint()
this.getQuestionNum() this.getQuestionNum()
}, },
computed: {
...mapState(useQuestionStore, ["loading_subject4", "loading_subject1", "version"]), //tagslist
getLoading() {
return this.loading_subject4 && this.loading_subject1
}
},
methods: { methods: {
getQuestionNum(){ ...mapActions(useQuestionStore, ['getAllQuestion']),
getQuestionNum() {
querySpecialNum({ querySpecialNum({
carTypeId:storage.get('carType') || '1001', carTypeId: storage.get('carType') || '1001',
subject:this.subject subject: this.subject
}).then(resp=>{ }).then(resp => {
if(resp.code==='0000'){ if (resp.code === '0000') {
if(this.subject=='1'){ if (this.subject == '1') {
this.list=[{ this.list = [{
title:'新规题', title: '新规题',
subTitle:resp.data.newQuestionNum+'题', subTitle: resp.data.newQuestionNum + '题',
isNew:1, isNew: 1,
isError:0, isError: 0,
image:newRulesIcon image: newRulesIcon,
},{ }, {
title:'易错题', title: '易错题',
isNew:0, isNew: 0,
isError:1, isError: 1,
subTitle:resp.data.errorQuestionNum+'题', subTitle: resp.data.errorQuestionNum + '题',
image:errorIcon image: errorIcon,
},{ }, {
title:'单选题', title: '单选题',
subTitle:resp.data.radioQuestionNum+'题', subTitle: resp.data.radioQuestionNum + '题',
isNew:0, isNew: 0,
isError:0, isError: 0,
image:danxuanIcon image: danxuanIcon,
},{ }, {
title:'判断题', title: '判断题',
subTitle:resp.data.judgeQuestionNum+'题', subTitle: resp.data.judgeQuestionNum + '题',
isNew:0, isNew: 0,
isError:0, isError: 0,
image:panduanIcon image: panduanIcon,
},{ }, {
title:'图片题', title: '图片题',
subTitle:resp.data.imageQuestionNum+'题', subTitle: resp.data.imageQuestionNum + '题',
isNew:0, isNew: 0,
isError:0, isError: 0,
image:tupianIcon image: tupianIcon,
}] }]
}else{ } else {
this.list=[{ this.list = [{
title:'新规题', title: '新规题',
subTitle:resp.data.newQuestionNum+'题', subTitle: resp.data.newQuestionNum + '题',
isNew:1, isNew: 1,
isError:0, isError: 0,
image:newRulesIcon image: newRulesIcon
},{ }, {
title:'易错题', title: '易错题',
isNew:0, isNew: 0,
isError:1, isError: 1,
subTitle:resp.data.errorQuestionNum+'题', subTitle: resp.data.errorQuestionNum + '题',
image:errorIcon image: errorIcon,
},{ }, {
title:'单选题', title: '单选题',
subTitle:resp.data.radioQuestionNum+'题', subTitle: resp.data.radioQuestionNum + '题',
isNew:0, isNew: 0,
isError:0, isError: 0,
image:danxuanIcon image: danxuanIcon,
},{ }, {
title:'多选题', title: '多选题',
subTitle:resp.data.multipleChoiceQuestionNum+'题', subTitle: resp.data.multipleChoiceQuestionNum + '题',
isNew:0, isNew: 0,
isError:0, isError: 0,
image:neverWriteIcon image: neverWriteIcon
},{ }, {
title:'判断题', title: '判断题',
subTitle:resp.data.judgeQuestionNum+'题', subTitle: resp.data.judgeQuestionNum + '题',
isNew:0, isNew: 0,
isError:0, isError: 0,
image:panduanIcon image: panduanIcon,
},{ }, {
title:'图片题', title: '图片题',
subTitle:resp.data.imageQuestionNum+'题', subTitle: resp.data.imageQuestionNum + '题',
isNew:0, isNew: 0,
isError:0, isError: 0,
image:tupianIcon image: tupianIcon,
}] }]
} }
} }
}) })
}, },
getExamPoint(){ getExamPoint() {
const carTypeId=storage.get('carType') || '1001' const carTypeId = storage.get('carType') || '1001'
const examKey = this.subject=='1'?'ExamKeysOfSubjectOne':'ExamKeysOfSubjectFour' const examKey = this.subject == '1' ? 'ExamKeysOfSubjectOne' : 'ExamKeysOfSubjectFour'
querySysConfigList(carTypeId,examKey).then(resp=>{ querySysConfigList(carTypeId, examKey).then(resp => {
if(resp.code==='0000'){ if (resp.code === '0000') {
this.testCenterList=resp.data this.testCenterList = resp.data
} }
}) })
}, },
toAnswer(title,isError,isNew) { getQuestion(param,title) {
if(title=='单选题'){ queryQuestionId({
uni.navigateTo({ versionId: this.version,
url:"/pages/questionBank/questionBank?navTitle="+title+"&isError="+isError+"&isNew="+isNew+"&type=2"+"&subject="+this.subject carTypeId: storage.get('carType') || '1001',
}) subject: this.subject,
}else if(title=='多选题'){ ...param,
uni.navigateTo({ }).then(async (resp) => {
url:"/pages/questionBank/questionBank?navTitle="+title+"&isError="+isError+"&isNew="+isNew+"&type=3"+"&subject="+this.subject if (resp.code === '0000') {
}) const arr = resp.data
}else if(title=='判断题'){ const listJson = JSON.stringify(arr)
uni.navigateTo({ uni.navigateTo({
url:"/pages/questionBank/questionBank?navTitle="+title+"&isError="+isError+"&isNew="+isNew+"&type=1"+"&subject="+this.subject url: "/pages/questionBank/questionBank?navTitle=" + title + "&subject=" + this.subject + "&questionIdList=" + listJson
}) })
}else if(title=='图片题'){ }else if (resp.code === '4001') {
uni.navigateTo({ uni.showToast({
url:"/pages/questionBank/questionBank?navTitle="+title+"&isError="+isError+"&isNew="+isNew+"&isImage=1"+"&subject="+this.subject title: '当前题库非最新版,请更新~',
}) icon: 'none'
}else{
uni.navigateTo({
url:"/pages/questionBank/questionBank?navTitle="+title+"&isError="+isError+"&isNew="+isNew+"&subject="+this.subject
}) })
this.getAllQuestion()
} }
}, })
toQuestionBank(val){ },
uni.navigateTo({ toAnswer(title, isError, isNew) {
url:"/pages/questionBank/questionBank?navTitle="+val.configItemName+"&examKey="+val.configItemCode+"&subject="+this.subject if (title == '单选题') {
}) this.getQuestion({type:'2'},title)
}, } else if (title == '多选题') {
toIconSkill(){ this.getQuestion({type:'3'},title)
uni.navigateTo({ } else if (title == '判断题') {
url:"/pages/index/iconSkill" this.getQuestion({type:'1'},title)
}) } else if (title == '图片题') {
}, this.getQuestion({isImage:'1'},title)
toChapterSkill(){ } else {
uni.navigateTo({ this.getQuestion({isNew:isNew,isError:isError},title)
url:"/pages/questionBank/chapterExercise"
})
} }
},
toQuestionBank(val) {
this.getQuestion({examKey:val.configItemCode},val.configItemName)
},
toIconSkill() {
uni.navigateTo({
url: "/pages/index/iconSkill"
})
},
toChapterSkill() {
uni.navigateTo({
url: "/pages/questionBank/chapterExercise?subject="+this.subject
})
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.dot_item{ .dot_item {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
line-height: 41rpx; line-height: 41rpx;
color: #fff; color: #fff;
text-align: center; text-align: center;
background: #0BD032; background: #0BD032;
border-radius: 50%; border-radius: 50%;
} }
.topic_cont_text{
height:45rpx; .topic_cont_text {
height: 45rpx;
overflow: hidden; overflow: hidden;
word-break: break-all; /* break-all(允许在单词内换行。) */ word-break: break-all;
text-overflow: ellipsis; /* 超出部分省略号 */ /* break-all(允许在单词内换行。) */
display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/ text-overflow: ellipsis;
-webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/ /* 超出部分省略号 */
-webkit-line-clamp:1; /** 显示的行数 **/ display: -webkit-box;
/** 对象作为伸缩盒子模型显示 **/
-webkit-box-orient: vertical;
/** 设置或检索伸缩盒对象的子元素的排列方式 **/
-webkit-line-clamp: 1;
/** 显示的行数 **/
} }
</style> </style>

@ -2,8 +2,9 @@
<view> <view>
<!-- <u-navbar title="模拟考试" @rightClick="rightClick" :autoBack="true"> <!-- <u-navbar title="模拟考试" @rightClick="rightClick" :autoBack="true">
</u-navbar> --> </u-navbar> -->
<j-navbar :isDefineBack="true" @toBack="toBack">{{title}}</j-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" :navTitle="title" @changeTab="changeTab" /> <Question ref="question" :tabsList="tabsList" v-model:isSubmit="isSubmit" :type="type" :isShowAll="isShowAll"
:subject="subject" @changeTab="changeTab" />
</view> </view>
</template> </template>
@ -12,9 +13,11 @@
mapState, mapState,
mapActions mapActions
} from 'pinia' // } from 'pinia' //
import useQuestionStore from '@/jtools/store/question' //store
import useUserStore from '@/jtools/store/user' import useUserStore from '@/jtools/store/user'
import { import {
getTestQuestion getTestQuestion,
queryQuestionId
} from '@/jtools/api/question'; } from '@/jtools/api/question';
import storage from '@/jtools/storage'; import storage from '@/jtools/storage';
import Question from './components/Question.vue'; import Question from './components/Question.vue';
@ -24,63 +27,105 @@
}, },
data() { data() {
return { return {
type:'', type: '',
isShowAll:true, collectList: storage.get(`collectList_subject${this.subject}`) || [],
title:"模拟考试", questionArr:[],
subject:1, isShowAll: true,
isSubmit:false, title: "模拟考试",
tabsList:[{ subject: 1,
label:"模拟考试", isSubmit: false,
value:0 tabsList: [{
},{ label: "模拟考试",
label:"考前密卷", value: 0
value:1 }, {
label: "考前秘卷",
value: 1
}] }]
} }
}, },
onLoad(op) { onLoad(op) {
if(op.title){ if (op.title) {
this.title=op.title this.title = op.title
} }
if(op.subject){ if (op.subject) {
this.subject=op.subject this.subject = op.subject
const param={} const param = {}
if(op.isExam1){ if (op.isExam1) {
param.isExam1=op.isExam1 param.isExam1 = op.isExam1
} }
getTestQuestion({ if(op.needVip){
carTypeId: storage.get('carType') || '1001', this.isShowAll = op.needVip
subject: this.subject, }
...param let arr=[]
}).then(async (resp)=>{ if(op.questionIdList){
if(resp.code==='0000'){ const idList=JSON.parse(op.questionIdList)
let arr=resp.data arr = this[`orderQuestion_subject${this.subject}`].filter(qItem=>idList.includes(qItem.questionId))
if(this.title==='考前密卷'){ }
await this.searchUserVip() arr.forEach(item => {
const res = this.vipOnList.some(item => item.subjects == this.subject) let isCollect = false
if (!res) { if (this.collectList.includes(item.questionId)) {
arr = arr.slice(0, 3) isCollect = true
this.isShowAll = false
}
}
this.type='exam'
this.$refs.question.getQuestionList(JSON.stringify(arr))
} }
this.questionArr.push({
isChoose: false,
isCollect: isCollect,
...item
})
}) })
this.type = 'exam'
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr),this.title)
} }
}, },
computed: { computed: {
...mapState(useUserStore, ["vipOnList"]) ...mapState(useUserStore, ["vipOnList","token"]),
...mapState(useQuestionStore, ["orderQuestion_subject1", "orderQuestion_subject4", "version"]), //tagslist
}, },
methods: { methods: {
...mapActions(useUserStore, ['searchUserVip']), ...mapActions(useUserStore, ['searchUserVip']),
toBack(){ toBack() {
this.$refs.question.submitPaper() this.$refs.question.submitPaper()
}, },
changeTab(val){ changeTab(val) {
if(val==1){ if (val == 1) {
uni.navigateTo({ const param=this.subject=='1'?{isExam1: '1'}:{isExam2: '1'}
url:"/pages/questionBank/practiceExams?subject="+this.subject+'&title=考前密卷&isExam1=1' queryQuestionId({
versionId: this.version,
carTypeId: storage.get('carType') || '1001',
subject: this.subject,
...param
}).then(async (resp) => {
if (resp.code === '0000') {
if (this.token) {
await this.searchUserVip()
const result = this.vipOnList.some(item => item.subjects.includes(this.subject))
if (result) {
const listJson = JSON.stringify(resp.data)
uni.navigateTo({
url: "/pages/questionBank/practiceExams?title=考前密卷" + "&subject=" + this.subject + "&questionIdList=" + listJson
})
} else {
if (resp.data && resp.data.length > 3) {
const arr = resp.data.slice(0, 3)
} else {
const arr = resp.data
}
const listJson = JSON.stringify(arr)
uni.navigateTo({
url: "/pages/questionBank/practiceExams?title=" + title + "&subject=" + this.subject + "&questionIdList=" + listJson+"&needVip="+result
})
}
} else {
uni.redirectTo({
url: '/pages/login/login'
});
}
} else if (resp.code === '4001') {
uni.showToast({
title: '当前题库非最新版,请更新~',
icon: 'none'
})
this.getAllQuestion()
}
}) })
} }
} }
@ -89,17 +134,19 @@
</script> </script>
<style scoped> <style scoped>
::v-deep .u-count-down{ ::v-deep .u-count-down {
font-size: 28rpx; font-size: 28rpx;
color:#fff !important; color: #fff !important;
display: inline-block !important; display: inline-block !important;
} }
::v-deep .u-count-down__text{
::v-deep .u-count-down__text {
font-size: 28rpx; font-size: 28rpx;
color:#fff !important; color: #fff !important;
} }
::v-deep .balckColor .u-count-down__text{
::v-deep .balckColor .u-count-down__text {
font-size: 28rpx; font-size: 28rpx;
color:#333 !important; color: #333 !important;
} }
</style> </style>

@ -88,11 +88,18 @@
this.subject=op.subject this.subject=op.subject
this.allRightList=storage.get(`rightList_subject${this.subject}`) || [] this.allRightList=storage.get(`rightList_subject${this.subject}`) || []
this.allWrongList=storage.get(`wrongList_subject${this.subject}`) || [] this.allWrongList=storage.get(`wrongList_subject${this.subject}`) || []
this.percent=(((this.allRightList.length+this.wrongList.length) / this.orderQuestion.length)*100).toFixed(0) this.percent=(((this.allRightList.length+this.wrongList.length) / this[`orderQuestion_subject${this.subject}`].length)*100).toFixed(0)
} }
}, },
onUnload() {
//#ifdef MP-WEIXIN
uni.reLaunch({
url:"/pages/index/index"
})
//#endif
},
computed: { computed: {
...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject1"]), //tagslist ...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject4"]), //tagslist
getNotDoNum(){ getNotDoNum(){
return this[`orderQuestion_subject${this.subject}`].length-(this.allRightList.length+this.allWrongList.length) return this[`orderQuestion_subject${this.subject}`].length-(this.allRightList.length+this.allWrongList.length)
} }

@ -1,10 +1,11 @@
<template> <template>
<view> <view>
<!-- <u-navbar :title="navTitle" @rightClick="rightClick" :autoBack="true"> <u-loading-page :loading="loading" :loading-text="loadTxt"></u-loading-page>
</u-navbar> --> <view v-if="!loading">
<j-navbar>{{navTitle}}</j-navbar> <j-navbar>{{navTitle}}</j-navbar>
<Question ref="question" :tabsList="tabsList" :isShowAll="isShowAll" :subject="subject" :navTitle="navTitle" <Question ref="question" :tabsList="tabsList" :isShowAll="isShowAll" :subject="subject" :navTitle="navTitle"
@changeTab="changeTab"></Question> @changeTab="changeTab"></Question>
</view>
</view> </view>
</template> </template>
@ -17,7 +18,8 @@
import useUserStore from '@/jtools/store/user' import useUserStore from '@/jtools/store/user'
import Question from './components/Question.vue'; import Question from './components/Question.vue';
import { import {
queryQuestion queryQuestion,
queryQuestionId
} from '@/jtools/api/question'; } from '@/jtools/api/question';
import storage from '@/jtools/storage'; import storage from '@/jtools/storage';
export default { export default {
@ -26,6 +28,9 @@
}, },
data() { data() {
return { return {
loadTxt:'加载中...',
collectList: storage.get(`collectList_subject${this.subject}`) || [],
loading:false,
isShowAll: true, isShowAll: true,
needVip: false, needVip: false,
subject: 1, subject: 1,
@ -41,94 +46,89 @@
} }
}, },
async onLoad(op) { async onLoad(op) {
this.loading=true
if (op.needVip) { if (op.needVip) {
this.needVip = op.needVip this.needVip = op.needVip
} }
if(op.subject){ if (op.subject) {
this.subject=op.subject this.subject = op.subject
} }
if (op && op.navTitle) { if (op && op.navTitle) {
this.navTitle = op.navTitle this.navTitle = op.navTitle
const param = {} let arr=[]
let param={}
if(op.needVip){
this.isShowAll = !Boolean(op.needVip=='true')
}
if (this.navTitle === '顺序答题') { if (this.navTitle === '顺序答题') {
if(this.subject=='1'){ if (this.subject == '1') {
this.questionArr = [...this.orderQuestion_subject1] arr = [...this.orderQuestion_subject1]
}else if(this.subject=='4'){ } else if (this.subject == '4') {
this.questionArr = [...this.orderQuestion_subject4] arr = [...this.orderQuestion_subject4]
}
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
}
if (op.examKey) {
param.examKey = op.examKey
}
if(op.isError&&op.isError=='1'){
param.isError=Number(op.isError)
}
if(op.isNew&&op.isNew=='1'){
param.isNew=Number(op.isNew)
}
if(op.type){
param.type=op.type
}
if(op.isImage){
param.isImage=op.isImage
} }
} else if(op.questionIdList){
const idList=JSON.parse(op.questionIdList)
arr = this[`orderQuestion_subject${this.subject}`].filter(qItem=>idList.includes(qItem.questionId))
}else{
if(op.isVip){ if(op.isVip){
param.isVip=op.isVip param.isVip=op.isVip
} }
param.subject=this.subject const resp=await queryQuestionId({
param.carTypeId=storage.get('carType') || '1001' subject:this.subject,
queryQuestion(param).then(async (res) => { carTypeId:storage.get('carType') || '1001',
if (res.code == '0000') { versionId:this.version,
this.questionArr = res.data ...params
if (this.needVip === 'true') {
if (this.token) {
await this.searchUserVip()
const res = this.vipOnList.some(item => item.subjects == 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))
}
}) })
let list=[]
if(resp.code==='0000'){
await this.searchUserVip()
const res = this.vipOnList.some(item => item.subjects.includes(this.subject))
if (!res) {
list=resp.data.slice(0,3)
}else{
list=resp.data
}
}
if(op.needVip){
this.isShowAll = op.needVip
}
arr=this[`orderQuestion_subject${this.subject}`].filter(qItem=>list.includes(qItem.questionId))
} }
arr.forEach(item => {
let isCollect = false
if (this.collectList.includes(item.questionId)) {
isCollect = true
}
this.questionArr.push({
isChoose: false,
isCollect: isCollect,
...item
})
})
this.loading=false
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr),this.navTitle)
this.$refs.question.getOriginArr(JSON.stringify(this.questionArr))
} }
}, },
computed: { computed: {
...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject4"]), //tagslist ...mapState(useQuestionStore, ["orderQuestion_subject1", "orderQuestion_subject4","version"]), //tagslist
...mapState(useUserStore, ["vipOnList", "token"]) ...mapState(useUserStore, ["vipOnList", "token"]),
}, },
methods: { methods: {
...mapActions(useUserStore, ['searchUserVip']), ...mapActions(useUserStore, ['searchUserVip']),
...mapActions(useQuestionStore, ['getAllQuestion']),
changeTab(val) { changeTab(val) {
if (val == 1) { if (val == 1) {
let list = JSON.parse(JSON.stringify(this.questionArr)) let list = JSON.parse(JSON.stringify(this.questionArr))
list = list.map(item => { list = list.map(item => {
return { return {
...item, ...item,
clickAnswer: item.trueAnswer clickAnswer: item.trueAnswer,
isChoose: true,
} }
}) })
this.$refs.question.isShowBest(true) this.$refs.question.isShowBest(true)
this.$refs.question.getQuestionList(JSON.stringify(list)) this.$refs.question.getQuestionList(JSON.stringify(list),this.navTitle)
} else { } else {
this.$refs.question.isShowBest(false) this.$refs.question.isShowBest(false)
this.$refs.question.getQuestionList() this.$refs.question.getQuestionList()

@ -25,11 +25,9 @@
<view class="skill-sequence-skill-wrapper" v-for="(item, index) in videoList" :key="index" <view class="skill-sequence-skill-wrapper" v-for="(item, index) in videoList" :key="index"
@tap="checkVideo(item.projectId)"> @tap="checkVideo(item.projectId)">
<view> <view>
<view class="mb10 relative"> <view class="mb10 relative contain-box hide" style="overflow: hidden;">
<view class="contain-box" style="overflow: hidden;"> <image class="contain-box" style="position: absolute;left: 0;top: 0;" mode="widthFix"
<image class="contain-box" mode="widthFix"
:src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image> :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
</view>
<view v-if="projectId==item.projectId" class="playLogo">播放中</view> <view v-if="projectId==item.projectId" class="playLogo">播放中</view>
<image class="play_btn" src="../../static/image/index/play.png" /> <image class="play_btn" src="../../static/image/index/play.png" />
<text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">{{item.videoTime}}</text> <text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">{{item.videoTime}}</text>
@ -48,10 +46,10 @@
<text class="fs16 cor-666" @tap="popupShow=false">收起</text> <text class="fs16 cor-666" @tap="popupShow=false">收起</text>
</view> </view>
<view style="max-height: 800rpx;overflow-y: scroll;" class="p14lr"> <view style="max-height: 800rpx;overflow-y: scroll;" class="p14lr">
<view class="flex bc-fff mt10" style="border-radius: 16rpx;" v-for="(item,index) of videoList" :key="index" <view class="flex bc-fff mb15" style="border-radius: 16rpx;" v-for="(item,index) of videoList" :key="index"
@tap="checkVideo(item.projectId)"> @tap="checkVideo(item.projectId)">
<view class="pic relative" style="overflow: hidden;"> <view class="pic relative hide" style="overflow: hidden;">
<image class="pic" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image> <image class="pic" style="position: absolute;left: 0;top: 0;" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
<image class="play_btn_2" src="../../static/image/index/play.png" /> <image class="play_btn_2" src="../../static/image/index/play.png" />
<text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">{{item.videoTime}}</text> <text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">{{item.videoTime}}</text>
</view> </view>
@ -266,4 +264,10 @@
display: inline-block; display: inline-block;
margin-right: 15px; margin-right: 15px;
} }
.hide {
backface-visibility: hidden;
transform: translate3d(0, 0, 0);
-webkit-backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
}
</style> </style>

@ -5,23 +5,22 @@
</u-sticky> </u-sticky>
<view class="p14"> <view class="p14">
<view class="top_box"> <view class="top_box">
<view class="tip_box flex ai-c jc-sb" v-if="tIndex==0"> <view class="tip_box flex ai-c jc-sb" v-if="tIndex==0&&showTip">
<view class="flex ai-c"> <view class="flex ai-c">
<u-icon name="error-circle-fill" color="#FF6E02" size="18"></u-icon> <u-icon name="error-circle-fill" color="#FF6E02" size="18"></u-icon>
<text class="ml10 fs12" style="color: #FF6E02;">{{title}}</text> <text class="ml10 fs12" style="color: #FF6E02;">{{title}}</text>
</view> </view>
<u-icon name="close" color="#FF6E02" size="18"></u-icon> <u-icon name="close" color="#FF6E02" size="18" @tap="showTip=false"></u-icon>
</view> </view>
<view class="p14"> <view class="p14">
<text class="fs18 cor-000 fw600">{{tIndex==0?'错题':'收藏'}}情况</text> <text class="fs18 cor-000 fw600">{{tIndex==0?'错题':'收藏'}}情况</text>
<view class="total_box mt10"> <view class="total_box mt10" @tap="toPractice">
<view class="flex ai-c jc-sb"> <view class="flex ai-c jc-sb">
<view class="text-center"> <view class="text-center">
<view style="width: 111rpx;" class="fs30 cor-000">{{tIndex==0?wrongList.length:collectList.length}} <view style="width: 111rpx;" class="fs30 cor-000">{{tIndex==0?wrongList.length:collectList.length}}
</view> </view>
</view> </view>
<view style="text-align: right;flex-direction: column;justify-content: right" class="flex ai-c" <view style="text-align: right;flex-direction: column;justify-content: right" class="flex ai-c">
@tap="toPractice">
<u-icon name="arrow-right" size="18"></u-icon> <u-icon name="arrow-right" size="18"></u-icon>
</view> </view>
</view> </view>
@ -47,41 +46,28 @@
</view> --> </view> -->
</view> </view>
</view> </view>
<view class="flex jc-sb ai-c mt10" v-if="tIndex==0"> <!-- <view class="flex jc-sb ai-c mt10" v-if="tIndex==0">
<text>答对后自动移除错题</text> <text>答对后自动移除错题</text>
<u-switch v-model="isMoveWrong" activeColor="#0BD032"></u-switch> <u-switch v-model="isMoveWrong" activeColor="#0BD032"></u-switch>
</view> </view> -->
</view> </view>
<view style="margin-top: 30rpx;" v-if="tIndex==0"> <!-- <view class="ml15 text-center">
<view class="video-box">
<view class="flex jc-sb ai-c wp100">
<text style="color: #05C341;font-size: 36rpx;">{{subject==1?'一':'四'}}精品视频课</text>
<text class="cor-666 fs12">全部10节课 ></text>
</view>
<view class="flex ai-c mt20">
<view class="contain-box relative">
<image class="contain-box" src="../../../static/image/index/jpsp.png"></image>
<image class="play_btn_2" src="../../static/image/index/play.png" />
</view>
<!-- <view class="ml15 text-center">
<u-button :customStyle="{width:'200rpx',height:'66rpx',borderRadius: '33rpx'}" iconColor="#fff" <u-button :customStyle="{width:'200rpx',height:'66rpx',borderRadius: '33rpx'}" iconColor="#fff"
text="去看视频" color="linear-gradient(90deg, #11DF20 0%, #00B74F 100%)" icon="play-circle"> text="去看视频" color="linear-gradient(90deg, #11DF20 0%, #00B74F 100%)" icon="play-circle">
</u-button> </u-button>
<view class="cor-333 fs15 fw600 mt10">{{subject==1?'一':'四'}}易错试题</view> <view class="cor-333 fs15 fw600 mt10">{{subject==1?'一':'四'}}易错试题</view>
</view> --> </view> -->
</view>
</view>
</view>
</view> </view>
<view class="top_box mt15 p14"> <view class="top_box mt15 p14" v-if="typeList&&typeList.length">
<view class="flex jc-sb aic"> <view class="flex jc-sb aic">
<text class="fs18 cor-000 fw600">{{tIndex==0?'错题':'收藏题'}}分类</text> <text class="fs18 cor-000 fw600">{{tIndex==0?'错题':'收藏题'}}分类</text>
<!-- <u-icon name="arrow-right" size="18"></u-icon> --> <!-- <u-icon name="arrow-right" size="18"></u-icon> -->
</view> </view>
<view class="flex ai-c jc-sb" style="flex-wrap: wrap;"> <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"> <!-- 这个点击效果没加 -->
<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> <text class="cor-000">{{item.categoryName}}</text>
<text class="cor-666">{{item.num}}</text> <text class="cor-666">{{item.num}}</text>
</view> </view>
@ -92,6 +78,11 @@
</template> </template>
<script> <script>
import {
mapState,
mapActions
} from 'pinia' //
import useQuestionStore from '@/jtools/store/question' //store
import storage from '@/jtools/storage'; import storage from '@/jtools/storage';
import { import {
questionCategory questionCategory
@ -99,6 +90,7 @@
export default { export default {
data() { data() {
return { return {
showTip: true,
collectList: [], collectList: [],
rightList: storage.get(`rightList_subject${this.subject}`) || [], rightList: storage.get(`rightList_subject${this.subject}`) || [],
wrongList: storage.get(`wrongList_subject${this.subject}`) || [], wrongList: storage.get(`wrongList_subject${this.subject}`) || [],
@ -124,6 +116,7 @@
} }
}, },
computed: { computed: {
...mapState(useQuestionStore, ["orderQuestion_subject1", "orderQuestion_subject4"]), //tagslist
getPercent() { getPercent() {
return ((this.wrongList.length / (this.wrongList.length + this.rightList.length)) * 100).toFixed(0) return ((this.wrongList.length / (this.wrongList.length + this.rightList.length)) * 100).toFixed(0)
} }
@ -144,37 +137,49 @@
this.tIndex = val.index this.tIndex = val.index
this.getQuestionCategory() this.getQuestionCategory()
}, },
toCategoryQuestion(item){
const jsonString = JSON.stringify(item.errorQuestionIdList)
uni.navigateTo({
url: "/pages/questionBank/questionBank?navTitle=" + item.categoryName + "&questionIdList=" + jsonString
})
},
toPractice() { toPractice() {
const navTitle = this.tIndex == 0 ? '错题本' : '收藏夹' const navTitle = this.tIndex == 0 ? '错题本' : '收藏夹'
let arr=[]
if (navTitle == '错题本') { if (navTitle == '错题本') {
arr = this.wrongList
if (!this.wrongList.length) { if (!this.wrongList.length) {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '当前无错题,继续保持吧~', content: '当前无错题,继续保持吧~',
showCancel:false, showCancel: false,
success: function (res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定'); console.log('用户点击确定');
}
} }
} });
});
return return
} }
} else if (navTitle == '收藏夹') { } else if (navTitle == '收藏夹') {
uni.showModal({ arr=this.collectList
title: '提示', if (!this.collectList.length) {
content: '当前无收藏题~', uni.showModal({
showCancel:false, title: '提示',
success: function (res) { content: '当前无收藏题~',
if (res.confirm) { showCancel: false,
console.log('用户点击确定'); success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
}
} }
} });
}); return
return }
} }
const listJson=JSON.stringify(arr)
uni.navigateTo({ uni.navigateTo({
url: "/pages/questionBank/questionBank?navTitle=" + navTitle + "&subject=" + this.subject url: "/pages/questionBank/questionBank?navTitle=" + navTitle + "&subject=" + this.subject+"&questionIdList="+listJson
}) })
} }
} }
@ -244,7 +249,7 @@
} }
.category_item { .category_item {
width: 312rpx; width: 310rpx;
height: 90rpx; height: 90rpx;
text-align: center; text-align: center;
line-height: 90rpx; line-height: 90rpx;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Loading…
Cancel
Save