dev-hxf #24

Merged
huxiaofeng666 merged 4 commits from dev-hxf into master 1 year ago
  1. 6
      src/App.vue
  2. 30
      src/jtools/api/question.js
  3. 2
      src/jtools/request/index.js
  4. 246
      src/jtools/store/question.js
  5. 24
      src/pages.json
  6. 355
      src/pages/index/components/Subject1.vue
  7. 84
      src/pages/index/components/Subject2.vue
  8. 126
      src/pages/index/index.vue
  9. 139
      src/pages/index/secretPapers.vue
  10. 43
      src/pages/index/trueTest.vue
  11. 8
      src/pages/index/videoVip.vue
  12. 6
      src/pages/login/login.vue
  13. 6
      src/pages/me/index.vue
  14. 1
      src/pages/me/info.vue
  15. 250
      src/pages/me/tijian.vue
  16. 217
      src/pages/me/uploadPic.vue
  17. 36
      src/pages/me/vip.vue
  18. 37
      src/pages/questionBank/baseOperate.vue
  19. 64
      src/pages/questionBank/chapterExercise.vue
  20. 1577
      src/pages/questionBank/components/Question.vue
  21. 27
      src/pages/questionBank/examResult.vue
  22. 443
      src/pages/questionBank/exclusiveExercise.vue
  23. 123
      src/pages/questionBank/practiceExams.vue
  24. 11
      src/pages/questionBank/practiceResult.vue
  25. 115
      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/danxuan.png
  29. BIN
      src/static/image/index/index_bg.jpg
  30. BIN
      src/static/image/index/panduan.png
  31. BIN
      src/static/image/index/subject2_bg.png
  32. BIN
      src/static/image/index/subject3_bg.png
  33. BIN
      src/static/image/index/tupian.png
  34. BIN
      src/static/image/index/vip_bg.jpg
  35. BIN
      src/static/image/mine/mine_bg.png
  36. BIN
      src/static/image/mine/vip_bg.png
  37. BIN
      src/static/image/mine/vip_card.png
  38. BIN
      src/static/image/practice/error_icon.png
  39. BIN
      src/static/image/practice/neverWrite_icon.png
  40. BIN
      src/static/image/practice/newRules_icon.png

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

@ -71,3 +71,33 @@ export function querySpecialNum(data) {
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()
//请求成功
resolved(res.data);
} else if(res.data.code != '0000') {
} else if(res.data.code != '0000'&&res.data.code !='4001') {
uni.showToast({
title: res?.data?.message || '访问出错',
icon: 'none'

@ -3,7 +3,8 @@ import {
} from 'pinia';
import http from '@/jtools/request/index';
import {
queryQuestion
queryQuestion,
getVersion
} from '@/jtools/api/question';
import storage from '@/jtools/storage';
@ -11,82 +12,205 @@ const question = defineStore({
id: 'question',
state: () => ({
currentCartype: storage.get('carType') || '1001',
orderQuestion_subject1: [], //科目一顺序做题
orderQuestion_subject4:[],//科目二顺序做题
currentIndex_subject1:0,//科目一索引 顺序做题
currentIndex_subject4:0,//科目四索引 顺序做题
curSubject:storage.get('curSubject') || '1'
orderQuestion_subject1: storage.get('question_subject1') || [], //科目一顺序做题
orderQuestion_subject4: storage.get('question_subject4') || [], //科目四顺序做题
currentIndex_subject1: 0, //科目一索引 顺序做题
currentIndex_subject4: 0, //科目四索引 顺序做题
curSubject: storage.get('curSubject') || '1',
loading_subject1: false,
loading_subject4: false,
version: storage.get('version') || ''
}),
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){
this.curSubject=val
storage.set('curSubject',val)
changeSubject(val) {
this.curSubject = val
storage.set('curSubject', val)
},
// 获取顺序做题科目1
getOrderQuestion_sub1() {
this.curSubject='1'
storage.set('curSubject','1')
if(!this.orderQuestion_subject1.length){
queryQuestion({
carTypeId: this.currentCartype,
subject: '1',
// questionIdList:[10982,10983,10985,10986]
}).then(res => {
if (res.code == '0000') {
this.orderQuestion_subject1 = res.data
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)
getOrderQuestion_sub1(isUpdate) {
if (isUpdate) {
this.loading_subject1 = true
const that=this
uni.request({
url: 'https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E9%A2%98%E5%BA%93/%E5%B0%8F%E8%BD%A6%E7%A7%91%E7%9B%AE%E4%B8%80%E9%A2%98%E5%BA%93.json',
success(resp) {
if (resp.data) {
that.orderQuestion_subject1 = resp.data.data
const diveList = that.divideArray(that.orderQuestion_subject1, 5)
that.loading_subject1 = false
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 = []
that.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
const that = this
uni.request({
url: 'https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E9%A2%98%E5%BA%93/%E5%B0%8F%E8%BD%A6%E7%A7%91%E7%9B%AE%E4%B8%80%E9%A2%98%E5%BA%93.json',
success(resp) {
if (resp.data) {
that.orderQuestion_subject1 = resp.data.data
const diveList = that.divideArray(that.orderQuestion_subject1, 5)
that.loading_subject1 = false
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 = []
that.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)
}
}
})
}
}
},
// 获取顺序做题科目4
getOrderQuestion_sub4() {
this.curSubject='4'
storage.set('curSubject','4')
if(!this.orderQuestion_subject4.length){
queryQuestion({
carTypeId: this.currentCartype,
subject: '4',
// questionIdList:[10982,10983,10985,10986]
}).then(res => {
if (res.code == '0000') {
this.orderQuestion_subject4 = res.data
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)
getOrderQuestion_sub4(isUpdate) {
if (isUpdate) {
this.loading_subject4 = true
const that = this
uni.request({
url: 'https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E9%A2%98%E5%BA%93/%E5%B0%8F%E8%BD%A6%E7%A7%91%E7%9B%AE%E5%9B%9B%E9%A2%98%E5%BA%93.json',
success(resp) {
if (resp.data) {
that.orderQuestion_subject4 = resp.data.data
const diveList = that.divideArray(that.orderQuestion_subject4, 5)
that.loading_subject4 = false
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 = []
that.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
const that = this
uni.request({
url: 'https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E9%A2%98%E5%BA%93/%E5%B0%8F%E8%BD%A6%E7%A7%91%E7%9B%AE%E5%9B%9B%E9%A2%98%E5%BA%93.json',
success(resp) {
if (resp.data) {
that.orderQuestion_subject4 = resp.data.data
const diveList = that.divideArray(that.orderQuestion_subject4, 5)
that.loading_subject4 = false
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 = []
that.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)
}
}
})
}
}
},
//获取索引
getCurrentIndex(index,val){
this[`currentIndex_subject${val}`]=index
getCurrentIndex(index, val) {
this[`currentIndex_subject${val}`] = index
}
}
});

@ -8,7 +8,8 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "金武联驾考"
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
@ -86,7 +87,7 @@
{
"path": "pages/me/tijian",
"style": {
"navigationBarTitleText": "我的体检",
"navigationBarTitleText": "上传证件照",
"enablePullDownRefresh": false
}
},
@ -144,8 +145,21 @@
"navigationBarTitleText": "真实考场模拟",
"enablePullDownRefresh": false
}
}
},
{
"path": "pages/me/uploadPic",
"style": {
"navigationBarTitleText": "上传证件照",
"enablePullDownRefresh": false
}
},
{
"path": "pages/index/secretPapers",
"style": {
"navigationBarTitleText": "考前密卷",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
@ -156,7 +170,7 @@
},
"tabBar": {
"borderStyle": "white",
"selectedColor": "#333333",
"selectedColor": "#05C341",
"backgroundColor": "#FFFFFF",
"color": "#999999",
"list": [{

@ -1,76 +1,78 @@
<template>
<view>
<view class="box-nav">
<image style="width: 100%;" src="../../static/image/index/index_bg.jpg"></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="box-item flex ai-c jc-c">
<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>
<view class="btn-item flex ai-c jc-c">
<view class="text-center cor-fff" style="line-height: 40rpx;">
<view class="fs16">顺序练习</view>
<text class="fs14">{{getDoNum}}/{{subject=='1'?orderQuestion_subject1.length:orderQuestion_subject4.length}}</text>
</view>
<image style="width: 230rpx;height: 230rpx;position: absolute;left: 0;top: 0;"
src="../../../static/image/index/green_bg.png"></image>
<view class="btn-item flex ai-c jc-c">
<view class="text-center cor-fff" style="line-height: 40rpx;">
<view class="fs16">顺序练习</view>
<text
class="fs14">{{getDoNum}}/{{subject=='1'?orderQuestion_subject1.length:orderQuestion_subject4.length}}</text>
</view>
</view>
</view>
</view>
<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=模拟考试')">
<image style="width: 230rpx;height: 230rpx;position: absolute;left: 0;top: 0;" src="../../../static/image/index/orange_bg.png"></image>
<view class="btn2-item flex ai-c jc-c">
<view class="text-center cor-fff" style="line-height: 40rpx;">
<view class="fs16">模拟考试</view>
<text class="fs14">去考试</text>
</view>
<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>
<view class="btn2-item flex ai-c jc-c">
<view class="text-center cor-fff" style="line-height: 40rpx;">
<view class="fs16">模拟考试</view>
<text class="fs14">去考试</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view style="padding: 0 28rpx;margin-top: 60rpx;">
<view style="padding: 0 28rpx;margin-top: calc(100% - 718rpx);">
<view class="tabs-box">
<view class="wp33 flex ai-c jc-c" @tap="toVip">
<view class="text-center wp100">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto"
src="../../static/image/index/vipicon.png">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto" src="../../static/image/index/vipicon.png">
</image>
<view class="mt5">VIP课程</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">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto"
src="../../static/image/index/500icon.png">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto" src="../../static/image/index/500icon.png">
</image>
<view class="mt5">精简500题</view>
</view>
</view>
<view class="wp33 flex ai-c jc-c" @tap="toExclusive">
<view class="text-center wp100">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto"
src="../../static/image/index/zxicon.png">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto" src="../../static/image/index/zxicon.png">
</image>
<view class="mt5">专项练习</view>
</view>
</view>
<view class="wp33 flex ai-c jc-c" @tap="toTestRoom">
<view class="text-center wp100">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto;"
src="../../static/image/index/realicon.png"></image>
<image style="width: 72rpx;height: 72rpx;margin: 0 auto;" src="../../static/image/index/realicon.png">
</image>
<view class="mt5">真实考场模拟</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">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto"
src="../../static/image/index/testbeforeicon.png"></image>
<view class="mt5">考前</view>
<image style="width: 72rpx;height: 72rpx;margin: 0 auto" src="../../static/image/index/testbeforeicon.png">
</image>
<view class="mt5">考前</view>
</view>
</view>
<view class="wp33 flex ai-c jc-c" @tap="toWrongList">
<view class="text-center wp100">
<image style="width: 72rpx;height: 72rpx;margin: 0 auto"
src="../../static/image/index/worryicon.png"></image>
<image style="width: 72rpx;height: 72rpx;margin: 0 auto" src="../../static/image/index/worryicon.png">
</image>
<view class="mt5">错题收藏</view>
</view>
</view>
@ -80,7 +82,7 @@
<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>
<!-- <text class="cor-666 fs12">全部10节课 ></text> -->
</view>
<view class="flex ai-c mt20">
<view class="contain-box relative">
@ -88,115 +90,281 @@
<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"
text="去看视频" color="linear-gradient(90deg, #11DF20 0%, #00B74F 100%)" icon="play-circle">
<u-button :customStyle="{width:'200rpx',height:'66rpx',borderRadius: '33rpx'}" iconColor="#fff" text="去看视频"
color="linear-gradient(90deg, #11DF20 0%, #00B74F 100%)" icon="play-circle">
</u-button>
<view class="cor-333 fs15 fw600 mt10">{{subject==1?'一':'四'}}易错试题</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { mapState,mapActions } from 'pinia' //
import {
mapState,
mapActions
} from 'pinia' //
import useUserStore from '@/jtools/store/user'
import storage from '@/jtools/storage';
import useQuestionStore from '@/jtools/store/question' //store
import {
queryQuestionId,
getTestQuestionId
} from '@/jtools/api/question';
export default {
props:{
subject:{
type:[String,Number],
props: {
subject: {
type: [String, Number],
},
rightList:{
type:Array
rightList: {
type: Array
},
wrongList:{
type:Array
wrongList: {
type: Array
}
},
data() {
return {
allQuestionNum:0,
allQuestionNum: 0,
}
},
mounted(){
mounted() {
},
computed: {
...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject4"]) ,//tagslist
getDoNum(){
return this.rightList.length+this.wrongList.length
...mapState(useUserStore, ["vipOnList", "token"]),
...mapState(useQuestionStore, ["orderQuestion_subject1", "orderQuestion_subject4", "version"]), //tagslist
getDoNum() {
return this.rightList.length + this.wrongList.length
}
},
methods: {
toTestRoom(){
uni.navigateTo({
url:"/pages/index/trueTest"
})
...mapActions(useUserStore, ['searchUserVip']),
...mapActions(useQuestionStore, ['getOrderQuestion_sub1', 'getOrderQuestion_sub4', 'getAllQuestion']),
async toTestRoom() {
// uni.navigateTo({
// url:"/pages/index/trueTest"
// })
if (this.token) {
await this.searchUserVip()
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') {
if(resp.data&&resp.data.length){
const arr = resp.data
const listJson = JSON.stringify(arr)
uni.navigateTo({
url: "/pages/index/trueTest?subject="+ this.subject + "&questionIdList=" + listJson
})
}else{
uni.showToast({
title: '暂无题目',
icon: 'none'
})
}
} else if (resp.code === '4001') {
uni.showToast({
title: '当前题库非最新版,请更新~',
icon: 'none'
})
this.getAllQuestion()
}
})
}
} else {
uni.redirectTo({
url: '/pages/login/login'
});
}
},
toVip(){
// 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'
})
async toVip() {
if (this.token) {
await this.searchUserVip()
const res = this.vipOnList.some(item => item.subjects.includes(this.subject))
if (!res) {
uni.navigateTo({
url: "/pages/index/videoVip?subject=" + this.subject
})
} else {
uni.navigateTo({
url: "/pages/me/vip"
})
}
} else {
uni.redirectTo({
url: '/pages/login/login'
});
}
},
toClass(){
toClass() {
uni.showToast({
title:'敬请期待',
icon:'none'
title: '敬请期待',
icon: 'none'
})
},
toAnswer(title,val) {
if(title=='精简500题'){
uni.navigateTo({
url:"/pages/questionBank/questionBank?navTitle="+title+"&subject="+this.subject+"&needVip="+val+"&isVip=1"
})
}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
toAnswer(title, val) {
if (title == '精简500题') {
queryQuestionId({
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) {
if(resp.data&&resp.data.length){
const listJson = JSON.stringify(resp.data)
uni.navigateTo({
url: "/pages/questionBank/questionBank?navTitle=" + title + "&subject=" + this.subject +
"&needVip=" + !result + "&questionIdList=" + listJson
})
}else{
uni.showToast({
title: '暂无题目',
icon: 'none'
})
}
} else {
if (resp.data && resp.data.length > 3) {
const arr = resp.data.slice(0, 3)
} else {
const arr = resp.data
}
if(arr&&arr.length){
const listJson = JSON.stringify(arr)
uni.navigateTo({
url: "/pages/questionBank/questionBank?navTitle=" + title + "&subject=" + this.subject +
"&needVip=" + !result + "&questionIdList=" + listJson
})
}else{
uni.showToast({
title: '暂无题目',
icon: 'none'
})
}
}
} 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/login/login'
url: "/pages/questionBank/questionBank?navTitle=" + title + "&subject=" + this.subject + "&needVip=" +
val
})
}
},
toExclusive(){
uni.navigateTo({
url:"/pages/questionBank/exclusiveExercise?subject="+this.subject
})
},
toWrongList(){
toExams(title) {
if (storage.get('token')) {
if(title=='模拟考试'){
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/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({
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>
<style scoped>
.box-nav {
width: 100%;
position: relative;
height: 500rpx;
}
.center-box {
@ -259,6 +427,7 @@
background: #00B74F;
border-radius: 16rpx;
}
.play_btn_2 {
width: 65rpx;
height: 65rpx;
@ -266,4 +435,4 @@
left: 165.5rpx;
top: 78rpx
}
</style>
</style>

@ -1,10 +1,10 @@
<template>
<view>
<view class="box-nav">
<image style="width: 100%;" src="../../../static/image/index/index_bg.jpg"></image>
<view style="width: 100%;position: absolute;top: 80px;left: 0;" class="flex jc-c">
<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 style="width: 100%;position: absolute;top: 80px;left: 0;" class="flex jc-c" @tap="toVipVideo">
<image style="width: 694rpx" mode="widthFix"
:src="subject=='2'?'../../../static/image/index/subject2_bg.png':'../../../static/image/index/subject3_bg.png'">
:src="subject=='2'?'https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E7%A7%91%E4%BA%8C%E9%A6%96%E9%A1%B5banner_20230830214212.png':'https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E7%A7%91%E4%B8%89%E9%A6%96%E9%A1%B5banner_20230830214245.png'">
</image>
</view>
</view>
@ -12,10 +12,10 @@
<view class="video_box">
<view class="flex ai-c jc-sb mt5">
<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>
<u-icon name="list" color="#05C341" size="18"></u-icon>
</view>
</view> -->
</view>
<view class="skill-sequence-panel-content-wrapper">
<scroll-view class="skill-sequence-panel-content" scroll-x :scroll-into-view="intoindex">
@ -28,10 +28,13 @@
<swiper class="swiper" :current="videoIndex" style="height: 362rpx;" :autoplay="false"
:disable-programmatic-animation="true" @change="onChange">
<swiper-item v-for="(item,index) of operateList" :key="index" @tap="toVideo">
<view class="wp100 relative p5lr" style="height: 362rpx;border-radius: 16rpx;overflow: hidden;">
<image style="width: 100%;height: 362rpx;border-radius: 16rpx;" mode="widthFix"
:src="item.videoList[0].videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
<image class="play_btn_2" src="../../static/image/index/play.png" />
<view class="p5lr wp100">
<view class="wp100 relative hide"
style="height: 362rpx;border-radius: 16rpx;overflow: hidden;">
<image style="width: 100%;height: 362rpx;position: absolute;left: 0;top: 0;" mode="widthFix"
:src="item.videoList[0].videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
<image class="play_btn_2" src="../../static/image/index/play.png" />
</view>
</view>
</swiper-item>
</swiper>
@ -44,10 +47,10 @@
<u-icon color="#666" name="arrow-right" size="18"></u-icon>
</view>
</view>
<view class="flex p14lr p20tb bc-fff mt10" 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)">
<view class="pic relative" style="overflow: hidden;">
<image class="pic" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
<view class="pic relative hide" style="overflow: hidden;">
<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" />
</view>
<view class="ml10">
@ -61,6 +64,11 @@
</template>
<script>
import {
mapState,
mapActions
} from 'pinia' //
import useUserStore from '@/jtools/store/user'
import {
querySysConfigList,
queryProjectList
@ -88,7 +96,31 @@
async mounted() {
await this.getDiverType()
},
computed: {
...mapState(useUserStore, ["vipOnList", "token"])
},
methods: {
...mapActions(useUserStore, ['searchUserVip']),
//vip
async toVipVideo(){
if (this.token) {
await this.searchUserVip()
const res = this.vipOnList.some(item => item.subjects.includes(this.subject))
if (!res) {
uni.navigateTo({
url:"/pages/index/videoVip?subject="+this.subject
})
}else{
uni.navigateTo({
url: "/pages/questionBank/baseOperate?subject=" + this.subject+"&type=3"
})
}
} else {
uni.redirectTo({
url: '/pages/login/login'
});
}
},
onChange(e) {
this.videoIndex = e.detail.current
this.$nextTick(() => {
@ -100,12 +132,11 @@
queryProjectList({
"carTypeId": storage.get('carType') || '1001',
"subject": String(this.subject),
"driveType": this.diverTypeList[this.diverTypeIndex].configItemCode,
"type": "2"
}).then(resp => {
if (resp.code === '0000') {
this.baseList = resp.data
this.videoList = resp.data[0].videoList.slice(0, 5)
this.videoList = resp.data[0] ? resp.data[0].videoList.slice(0, 5) : []
}
})
},
@ -123,7 +154,7 @@
return {
...item,
videoUrl: item.videoList[0]?.videoUrl,
videoTime:this.formateTime(item.videoList[0]?.videoTime)
videoTime: this.formateTime(item.videoList[0]?.videoTime)
}
})
let jsonString = JSON.stringify(arr)
@ -132,14 +163,14 @@
"&projectId=" + this.projectId + "&type=1"
})
},
toOperateDetail(val){
toOperateDetail(val) {
let arr = JSON.parse(JSON.stringify(this.baseList[0].videoList))
arr = arr.map(item => {
return {
...item,
projectId:item.videoId,
subDesc:this.baseList[0].description,
videoTime:this.formateTime(item.videoTime)
projectId: item.videoId,
subDesc: this.baseList[0].description,
videoTime: this.formateTime(item.videoTime)
}
})
let jsonString = JSON.stringify(arr)
@ -151,7 +182,7 @@
getVideoList() {
queryProjectList({
"carTypeId": storage.get('carType') || '1001',
"driveType": this.diverTypeList[this.diverTypeIndex].configItemCode,
"driveType": '2',
"subject": String(this.subject),
"type": "1"
}).then(resp => {
@ -181,7 +212,7 @@
},
toDetail() {
uni.navigateTo({
url: "/pages/questionBank/baseOperate?subject=" + this.subject
url: "/pages/questionBank/baseOperate?subject=" + this.subject+"&type=2"
})
}
}
@ -227,7 +258,7 @@
width: 300rpx;
height: 169rpx;
background: #00B74F;
border-radius: 8rpx;
border-radius: 10rpx;
}
.play_btn_3 {
@ -262,4 +293,11 @@
display: inline-block;
margin-right: 15px;
}
</style>
.hide {
backface-visibility: hidden;
transform: translate3d(0, 0, 0);
-webkit-backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
}
</style>

@ -1,21 +1,32 @@
<template>
<view>
<u-sticky bgColor="#fff">
<u-tabs :list="categoryList" :current="curTab" :scrollable="false" @change="changeCategory"></u-tabs>
</u-sticky>
<view v-if="getLoading" class="wp100 relative" style="height: 100vh;">
<image class="wp100" mode="widthFix" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/%E8%80%83%E8%AF%95%E6%8F%90%E9%86%92_20230906135037.png"></image>
<view class="wp100 flex ai-c jc-c" style="position: absolute;bottom: 0;left: 0;padding-bottom: 124rpx;">
<image style="width: 452rpx;" 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>
</view>
<view v-if="!getLoading">
<j-navbar :isBack="false">金武联驾考</j-navbar>
<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);">
<template v-if="subject=='1' || subject=='4'">
<Subject1 :subject="subject" :rightList="rightList" :wrongList="wrongList" />
<Subject1 :subject="subject" :rightList="rightList" :wrongList="wrongList" />
</template>
<template v-else>
<Subject2 :subject="subject" ref="subjectRef" />
</template>
</view>
</view>
</view>
</view>
</template>
<script>
import { mapState,mapActions } from 'pinia' //
import {
mapState,
mapActions
} from 'pinia' //
import useQuestionStore from '@/jtools/store/question' //store
import storage from '@/jtools/storage';
import {
@ -23,70 +34,79 @@
} from '@/jtools/api/question';
import Subject1 from "./components/Subject1";
import Subject2 from "./components/Subject2";
export default {
components: {Subject1,Subject2},
data() {
export default {
components: {
Subject1,
Subject2
},
data() {
return {
subject:storage.get('curSubject') || '1',
curTab:Number(storage.get('curSubject'))-1,
searchValue:'',
cityName:'',
categoryList:[],
rightList:storage.get(`rightList_subject${this.subject}`) || [],
wrongList:storage.get(`wrongList_subject${this.subject}`) || [],
subject: storage.get('curSubject') || '1',
curTab: 0,
searchValue: '',
cityName: '',
categoryList: [],
rightList: storage.get(`rightList_subject${this.subject}`) || [],
wrongList: storage.get(`wrongList_subject${this.subject}`) || [],
};
},
onLoad(){
onLoad() {
this.curTab=Number(this.curSubject)-1
this.getSubjectConfig()
},
onShow() {
if(this.subject=='1'||this.subject=='4'){
this.rightList=storage.get(`rightList_subject${this.subject}`) || []
this.wrongList=storage.get(`wrongList_subject${this.subject}`) || []
}
},
methods:{
...mapActions(useQuestionStore,['getOrderQuestion_sub4','getOrderQuestion_sub1','changeSubject']),
onShow() {
if (this.subject == '1' || this.subject == '4') {
this.rightList = storage.get(`rightList_subject${this.subject}`) || []
this.wrongList = storage.get(`wrongList_subject${this.subject}`) || []
}
},
computed: {
...mapState(useQuestionStore, ["loading_subject4", "loading_subject1","curSubject"]), //tagslist
getLoading() {
if(this.loading_subject4 && this.loading_subject1){
uni.hideTabBar();
}else{
uni.showTabBar()
}
return this.loading_subject4 && this.loading_subject1
}
},
methods: {
...mapActions(useQuestionStore, ['getOrderQuestion_sub4', 'getOrderQuestion_sub1', 'changeSubject']),
//
getSubjectConfig(){
const carTypeId=storage.get('carType') || '1001'
querySysConfigList(carTypeId,'Subject').then(resp=>{
if(resp.code==='0000'){
this.categoryList=resp.data.map(item=>{
return{
getSubjectConfig() {
const carTypeId = storage.get('carType') || '1001'
querySysConfigList(carTypeId, 'Subject').then(resp => {
if (resp.code === '0000') {
this.categoryList = resp.data.map(item => {
return {
...item,
name:item.configItemName
name: item.configItemName
}
})
}
})
},
//
async changeCategory(val){
this.subject=val.configItemCode
console.log();
if(this.subject=='1'){
await this.getOrderQuestion_sub1()
}else if(this.subject=='4'){
await this.getOrderQuestion_sub4()
}else{
//
async changeCategory(val) {
this.subject = val.configItemCode
this.changeSubject(this.subject)
setTimeout(()=>{
this.$refs.subjectRef.getDiverType()
},100)
}
if(this.subject=='1'||this.subject=='4'){
this.rightList=storage.get(`rightList_subject${this.subject}`) || []
this.wrongList=storage.get(`wrongList_subject${this.subject}`) || []
}
},
if (this.subject == '1' || this.subject == '4') {
this.rightList = storage.get(`rightList_subject${this.subject}`) || []
this.wrongList = storage.get(`wrongList_subject${this.subject}`) || []
} else {
setTimeout(() => {
this.$refs.subjectRef.getDiverType()
}, 100)
}
},
}
}
</script>
<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;
bottom: 14rpx !important;
}
</style>
</style>

@ -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>
<script>
import {
mapState,
mapActions
} from 'pinia' //
import useQuestionStore from '@/jtools/store/question' //store
import useUserStore from '@/jtools/store/user'
import {
getTestQuestion,
@ -100,13 +105,14 @@
export default {
data() {
return {
subject: 1,
subject:'1',
questionIndex: 1,
list: [],
mutiAns: []
}
},
computed: {
...mapState(useQuestionStore, ["orderQuestion_subject1", "orderQuestion_subject4", "version"]), //tagslis
user() {
return useUserStore().userInfo
},
@ -126,7 +132,14 @@
},
onLoad(option) {
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: {
fz() {
@ -134,19 +147,19 @@
orientation: 'landscape'
});
},
_getList() {
getTestQuestion({
carTypeId: storage.get('carType') || '1001',
subject: this.subject
}).then(resp => {
if (resp.code === '0000') {
this.list = resp.data.map(it => ({
...it,
yourAnswer: ''
}))
}
})
},
// _getList() {
// getTestQuestion({
// carTypeId: storage.get('carType') || '1001',
// subject: this.subject
// }).then(resp => {
// if (resp.code === '0000') {
// this.list = resp.data.map(it => ({
// ...it,
// yourAnswer: ''
// }))
// }
// })
// },
handleAnswer(index) {
//
let q = this.list[this.questionIndex - 1]

@ -1,9 +1,9 @@
<template>
<view class="relative" style="height: 100vh;">
<image style="width: 100%;height: 600rpx;" src="../../static/image/index/vip_bg.jpg"></image>
<image style="width: 100%;height: 600rpx;" src="https://oss-bq.ahduima.com/%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E5%9B%BE%E7%89%87/vip%E9%A1%B5%E8%83%8C%E6%99%AF%E5%9B%BE_20230830214136.png"></image>
<view class="p14">
<view class="flex jc-fa ai-c wp100">
<view class="option_tem relative mr15" :class="checkedId===item.memberId?'checked_item':''" v-for="(item,index) of priceList" :key="index" @click="checkPrice(item.memberId,item.price)">
<view class="flex jc-sb ai-c wp100">
<view class="option_tem relative" :class="checkedId===item.memberId?'checked_item':''" v-for="(item,index) of priceList" :key="index" @click="checkPrice(item.memberId,item.price)">
<text class="fw600 fs12 cor-333">{{item.memberName}}</text>
<view class="mt5">
<text class="fs14" style="color: #FF6E02;">¥</text>
@ -151,7 +151,7 @@
color:#fff
}
.tag{
width: 122rpx;
padding:0 5px;
height: 36rpx;
background: linear-gradient(90deg, #E66501 0%, #F8A42C 100%);
border-radius: 8rpx 20rpx 8rpx 8rpx;

@ -1,8 +1,8 @@
<template>
<view class="content">
<view class="header">
<image src="/static/image/login/logo.jpg" mode="widthFix"></image>
<view class="mt21 fs16 cor-333 fwb text-center">欢迎使用金武驾考</view>
<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>
<view class="list">
@ -82,6 +82,8 @@
if(isPhone(this.login.phone) && this.login.code) {
useUserStore().login(this.login).then(resp => {
if(resp.userId) {
useUserStore().getUserInfo()
useUserStore().searchUserVip()
this.toHome()
}
})

@ -2,13 +2,13 @@
<view class="bc-f5">
<!-- <view class="wp100" style="background-color: #333;height: 205px;"></view> -->
<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">
<u-avatar class="br-p50 overflow-h" :size="64" mp-avatar shape="circle"></u-avatar>
<view class="ml12">
<view class="flex ai-c fs18 cor-333 fwb">
<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 class="mt5 fs14 cor-666">陪您学车 {{ user.days }}</view>
</view>
@ -25,7 +25,7 @@
</view>
<view class="p15lr" style="transform: translateY(-90px);">
<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="flex ai-c">
<view class="p3 br-p50" style="background-color: #873E1D;">

@ -23,7 +23,6 @@
}
},
methods: {
}
}
</script>

@ -1,42 +1,222 @@
<template>
<view class="p15 bc-f5">
<view class="br8 bc-fff p15lr">
<view class="flex ai-c bb1" style="height: 110rpx;">
<view class="title">体检结果</view>
<view class="ml30 fs14 cor-333 fl1">通过</view>
</view>
<view class="flex ai-c" style="height: 110rpx;">
<view class="title">体检时间</view>
<view class="ml30 fs14 cor-333 fl1">2023-08-10 14:35:23</view>
</view>
<view class="flex ai-fs" style="height: 110rpx;">
<view class="title">体检时间</view>
<image class="ml30" src="/static/image/mine/tijian.png" style="width: 333rpx;" mode="widthFix"></image>
</view>
</view>
</view>
<view class="">
<view class="wp100 bc-fff p14">
<view class="title fontColor">第一步 上传学员图像</view>
<view class="mt15">
<!-- <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" /> -->
<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">
<image v-if="fileList&&fileList.length" style="width: 240rpx;height: 240rpx;" :src="fileList[0].url">
</image>
<u-avatar v-else class="br-p50 overflow-h" :size="64" mp-avatar shape="circle"></u-avatar>
</view>
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" multiple :maxCount="1" width="150"
height="150">
<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>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
import storage from '@/jtools/storage';
export default {
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) {
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>
<style lang="scss" scoped>
.title {
width: 120rpx;
font-size: 14px;
color: #666;
}
.bb1 {
border-bottom: 1px solid #eee;
}
</style>
.upload-img {
width: 165rpx;
height: 165rpx;
border: 1px dashed #c4c4c4;
display: flex;
justify-content: center;
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>

@ -0,0 +1,217 @@
<template>
<view class="">
<view class="wp100 bc-fff p14">
<view class="title fontColor">第一步 上传学员图像</view>
<view class="mt15">
<!-- <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" /> -->
<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">
<image v-if="fileList1&&fileList1.length" style="width: 240rpx;height: 240rpx;" :src="fileList1[0].url">
</image>
<u-avatar v-else class="br-p50 overflow-h" :size="64" mp-avatar shape="circle"></u-avatar>
</view>
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" multiple :maxCount="1" width="150"
height="150">
<view
style="width: 320rpx;height:60rpx;line-height:60rpx;background-color: #3C9CFF;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'}" :disabled="saving" text="提交"
@click="submit" />
</view>
</view>
</view>
</template>
<script>
import storage from '@/jtools/storage';
export default {
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: ''
},
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() {
console.log(storage.get('photoForm'));
if(storage.get('photoForm')){
this.fileList1=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.fileList1 = lists;
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.fileList1,
...this.form
}
storage.set('photoForm',param)
uni.showToast({
title:"提交成功!",
duration:2000,
})
setTimeout(()=>{
uni.navigateBack()
},1000)
} else {
console.log('验证失败');
}
});
},
async compressImage(image) {
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>
<style lang="scss" scoped>
.upload-img {
width: 165rpx;
height: 165rpx;
border: 1px dashed #c4c4c4;
display: flex;
justify-content: center;
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;
}
</style>

@ -12,8 +12,8 @@
<swiper class="swiper" :current="current" style="height: 120px;" :autoplay="false" :display-multiple-items="1.45"
:disable-programmatic-animation="true" @change="onChange">
<swiper-item v-for="(item, index) in vipAllList" :key="index">
<view class="relative">
<image src="../../static/image/mine/vip_card.png" mode="widthFix" style="width:95%;"></image>
<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="" mode="widthFix" style="width:95%;"></image> -->
<view class="vip-info">
<u-avatar class="br-p50 overflow-h" style="border: 3px solid #873E1D;" :size="35" mp-avatar></u-avatar>
<view class="ml10">
@ -28,10 +28,10 @@
<view v-if="vipHasOpened(item)" class="corner">
VIP已开通
</view>
<view v-if="vipHasOpened(item)" class="renew">
<view v-if="vipHasOpened(item)" @tap="chargeVip(item)" class="renew">
{{ item.price }}元立即续费
</view>
<view v-else class="buy">
<view v-else class="buy" @tap="chargeVip(item)">
立即充值
</view>
</view>
@ -44,7 +44,7 @@
<swiper class="swiper" :current="current" style="height: 300px;" :autoplay="false"
:disable-programmatic-animation="true" @change="onChange">
<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">
3步轻松学{{ getKmTitle(item.subjects) }}
</view>
@ -141,6 +141,11 @@ export default {
}
},
methods: {
chargeVip(item){
uni.navigateTo({
url:"/pages/index/videoVip?subject="+item.subjects
})
},
onChange(e) {
this.current = e.detail.current
},
@ -160,14 +165,17 @@ export default {
return '开通vip助您快速拿证'
}
},
vipHasOpened(item) {
return !!this.vipOnList.find(it => it.memberId == item.memberId)
vipHasOpened(item) {;
return !!this.vipOnList.some(it => it.subjects.includes(item.subjects) )
},
// 500 item=> vip
to500(item) {
// vip
if (this.vipHasOpened(item)) {
//
uni.navigateTo({
url:"/pages/questionBank/questionBank?navTitle=精简500题&subject="+item.subjects+"&needVip=true&isVip=1"
})
} else {
uni.showToast({
title: `请先充值${this.getKmTitle(item.subjects)}vip`,
@ -180,6 +188,9 @@ export default {
// vip
if (this.vipHasOpened(item)) {
//
uni.navigateTo({
url: "/pages/index/trueTest?subject="+item.subjects
})
} else {
uni.showToast({
title: `请先充值${this.getKmTitle(item.subjects)}vip`,
@ -192,6 +203,9 @@ export default {
// vip
if (this.vipHasOpened(item)) {
//
uni.navigateTo({
url:"/pages/questionBank/practiceExams?subject="+item.subjects+'&title=考前密卷&isExam1=1'
})
} else {
uni.showToast({
title: `请先充值${this.getKmTitle(item.subjects)}vip`,
@ -204,6 +218,10 @@ export default {
// vip
if (this.vipHasOpened(item)) {
//
uni.showToast({
title:'敬请期待',
icon:'none'
})
} else {
uni.showToast({
title: `请先充值${this.getKmTitle(item.subjects)}vip`,
@ -243,6 +261,7 @@ export default {
left: 10px;
display: flex;
align-items: center;
z-index: 1;
}
.corner {
@ -259,6 +278,7 @@ export default {
justify-content: center;
font-size: 12px;
color: #fff;
z-index: 1;
}
.renew {
@ -274,6 +294,7 @@ export default {
border-radius: 26rpx;
font-size: 12px;
color: #F6E99F;
z-index: 1;
}
.buy {
@ -290,6 +311,7 @@ export default {
border-radius: 30rpx;
font-size: 14px;
color: #F6E99F;
z-index: 1;
}
.study {

@ -1,17 +1,17 @@
<template>
<view>
<j-navbar>基本操作</j-navbar>
<u-sticky bgColor="#fff">
<!-- <u-sticky bgColor="#fff">
<u-tabs :list="categoryList" :scrollable="false" @click="changeCategory"></u-tabs>
</u-sticky>
</u-sticky> -->
<view class="p14">
<!-- <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> -->
<view class="flex p14lr p20tb bc-fff mt10" style="border-bottom: 1rpx solid #DDDCDC;;"
<view class="flex p14lr p20tb bc-fff mb10" style="border-radius: 10rpx;"
v-for="(item,index) of videoList" :key="index" @tap="toOperateDetail(item.videoId)">
<view class="pic relative" style="overflow: hidden;">
<image class="pic" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
<view class="pic relative hide" style="overflow: hidden;">
<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" />
</view>
<view class="ml10">
@ -32,6 +32,7 @@
export default {
data(){
return{
type:'2',
subject:'1',
tCar:0,
categoryList:[{
@ -40,22 +41,17 @@
name:'自动挡C2'
}],
allVideoList:[],
videoList:[{
label:"111"
},{
label:'222'
},{
label:'333'
},{
label:'444'
}]
videoList:[]
}
},
onLoad(op){
if(op.subject){
this.subject=op.subject
this.getDiverType()
}
if(op.type){
this.type=op.type
}
this.getDiverType()
},
methods:{
formateTime(time) {
@ -86,8 +82,7 @@
queryProjectList({
"carTypeId": storage.get('carType') || '1001',
"subject": String(this.subject),
"driveType": this.categoryList[this.tCar].configItemCode,
"type": "2"
"type": this.type
}).then(resp => {
if(resp.code==='0000'){
this.videoList=resp.data[0]?resp.data[0].videoList:[]
@ -150,7 +145,7 @@
width: 300rpx;
height: 169rpx;
background: #00B74F;
border-radius: 8rpx;
border-radius: 10rpx;
}
.play_btn_2 {
width: 65rpx;
@ -159,4 +154,10 @@
left: 117.5rpx;
top: 52rpx
}
.hide {
backface-visibility: hidden;
transform: translate3d(0, 0, 0);
-webkit-backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
}
</style>

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

File diff suppressed because it is too large Load Diff

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

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

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

@ -88,11 +88,18 @@
this.subject=op.subject
this.allRightList=storage.get(`rightList_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: {
...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject1"]), //tagslist
...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject4"]), //tagslist
getNotDoNum(){
return this[`orderQuestion_subject${this.subject}`].length-(this.allRightList.length+this.allWrongList.length)
}

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

@ -25,11 +25,9 @@
<view class="skill-sequence-skill-wrapper" v-for="(item, index) in videoList" :key="index"
@tap="checkVideo(item.projectId)">
<view>
<view class="mb10 relative">
<view class="contain-box" style="overflow: hidden;">
<image class="contain-box" mode="widthFix"
<view class="mb10 relative contain-box hide" style="overflow: hidden;">
<image class="contain-box" style="position: absolute;left: 0;top: 0;" mode="widthFix"
:src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
</view>
<view v-if="projectId==item.projectId" class="playLogo">播放中</view>
<image class="play_btn" src="../../static/image/index/play.png" />
<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>
</view>
<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)">
<view class="pic relative" style="overflow: hidden;">
<image class="pic" mode="widthFix" :src="item.videoUrl+'?x-oss-process=video/snapshot,t_0,f_jpg'"></image>
<view class="pic relative hide" style="overflow: hidden;">
<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" />
<text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">{{item.videoTime}}</text>
</view>
@ -266,4 +264,10 @@
display: inline-block;
margin-right: 15px;
}
.hide {
backface-visibility: hidden;
transform: translate3d(0, 0, 0);
-webkit-backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
}
</style>

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 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.

After

Width:  |  Height:  |  Size: 3.9 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