Merge pull request 'dev-hxf' (#18) from dev-hxf into master

Reviewed-on: #18
pull/19/head^2
huxiaofeng666 1 year ago
commit fa6665d9f6
  1. 6
      src/App.vue
  2. 95
      src/jtools/store/question.js
  3. 2
      src/pages.json
  4. 16
      src/pages/index/components/Subject1.vue
  5. 30
      src/pages/index/components/Subject2.vue
  6. 24
      src/pages/index/index.vue
  7. 4
      src/pages/questionBank/baseOperate.vue
  8. 3
      src/pages/questionBank/components/Question.vue
  9. 24
      src/pages/questionBank/examResult.vue
  10. 20
      src/pages/questionBank/exclusiveExercise.vue
  11. 4
      src/pages/questionBank/practiceResult.vue
  12. 26
      src/pages/questionBank/questionBank.vue
  13. 7
      src/pages/questionBank/videoDetail.vue
  14. 361
      src/pages/questionBank/wrongQuestion.vue
  15. BIN
      src/static/image/index/jpsp.png
  16. BIN
      src/static/image/tabbar/tab-home-selected.png
  17. BIN
      src/static/image/tabbar/tab-home.png
  18. BIN
      src/static/image/tabbar/tab-mine-selected.png
  19. BIN
      src/static/image/tabbar/tab-mine.png

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

@ -11,39 +11,78 @@ const question = defineStore({
id: 'question', id: 'question',
state: () => ({ state: () => ({
currentCartype: storage.get('carType') || '1001', currentCartype: storage.get('carType') || '1001',
orderQuestion: [], //顺序做题 orderQuestion_subject1: [], //科目一顺序做题
orderQuestion_subject4:[],//科目二顺序做题
currentIndex_subject1:0,//科目一索引 顺序做题 currentIndex_subject1:0,//科目一索引 顺序做题
currentIndex_subject4:0,//科目四索引 顺序做题 currentIndex_subject4:0,//科目四索引 顺序做题
curSubject:storage.get('curSubject') || '1'
}), }),
actions: { actions: {
// 获取顺序做题 //改变当前科目
getOrderQuestion(val) { changeSubject(val){
queryQuestion({ this.curSubject=val
carTypeId: this.currentCartype, storage.set('curSubject',val)
subject: val, },
// questionIdList:[10982,10983,10985,10986] // 获取顺序做题科目1
}).then(res => { getOrderQuestion_sub1() {
if (res.code == '0000') { this.curSubject='1'
this.orderQuestion = res.data storage.set('curSubject','1')
const falseList =storage.get(`wrongList_subject${val}`) || [] if(!this.orderQuestion_subject1.length){
const trueList =storage.get(`rightList_subject${val}`) || [] queryQuestion({
const falseArr=[] carTypeId: this.currentCartype,
const rightArr=[] subject: '1',
this.orderQuestion.forEach(item=>{ // questionIdList:[10982,10983,10985,10986]
if(falseList.includes(item.questionId)){ }).then(res => {
falseArr.push(item.questionId) if (res.code == '0000') {
} this.orderQuestion_subject1 = res.data
if(trueList.includes(item.questionId)){ const falseList =storage.get('wrongList_subject1') || []
rightArr.push(item.questionId) const trueList =storage.get('rightList_subject1')|| []
} const falseArr=[]
}) const rightArr=[]
console.log('falseArr',falseArr); this.orderQuestion_subject1.forEach(item=>{
storage.set(`wrongList_subject${val}`,falseArr) if(falseList.includes(item.questionId)){
storage.set(`rightList_subject${val}`,rightArr) falseArr.push(item.questionId)
console.log(storage.get(`wrongList_subject${val}`)); }
} 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)
}
})
}
}, },
//获取索引 //获取索引
getCurrentIndex(index,val){ getCurrentIndex(index,val){

@ -100,7 +100,7 @@
{ {
"path": "pages/index/videoVip", "path": "pages/index/videoVip",
"style": { "style": {
"navigationBarTitleText": "视频精品课", "navigationBarTitleText": "开通会员",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },

@ -8,7 +8,7 @@
<view class="btn-item flex ai-c jc-c"> <view class="btn-item flex ai-c jc-c">
<view class="text-center cor-fff" style="line-height: 40rpx;" @tap="toAnswer('顺序答题',false)"> <view class="text-center cor-fff" style="line-height: 40rpx;" @tap="toAnswer('顺序答题',false)">
<view class="fs16">顺序练习</view> <view class="fs16">顺序练习</view>
<text class="fs14">{{getDoNum}}/{{orderQuestion.length}}</text> <text class="fs14">{{getDoNum}}/{{subject=='1'?orderQuestion_subject1.length:orderQuestion_subject4.length}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -81,7 +81,10 @@
<text class="cor-666 fs12">全部10节课 ></text> <text class="cor-666 fs12">全部10节课 ></text>
</view> </view>
<view class="flex ai-c mt20"> <view class="flex ai-c mt20">
<image class="contain-box" src="../../static/image/index/index_bg.jpg"></image> <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" <u-button :customStyle="{width:'200rpx',height:'66rpx',borderRadius: '33rpx'}" iconColor="#fff"
text="去看视频" color="linear-gradient(90deg, #11DF20 0%, #00B74F 100%)" icon="play-circle"> text="去看视频" color="linear-gradient(90deg, #11DF20 0%, #00B74F 100%)" icon="play-circle">
@ -120,7 +123,7 @@
}, },
computed: { computed: {
...mapState(useQuestionStore, ["orderQuestion"]) ,//tagslist ...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject4"]) ,//tagslist
getDoNum(){ getDoNum(){
return this.rightList.length+this.wrongList.length return this.rightList.length+this.wrongList.length
} }
@ -249,4 +252,11 @@
background: #00B74F; background: #00B74F;
border-radius: 16rpx; border-radius: 16rpx;
} }
.play_btn_2 {
width: 65rpx;
height: 65rpx;
position: absolute;
left: 165.5rpx;
top: 78rpx
}
</style> </style>

@ -19,19 +19,25 @@
<view class="tab_iem mr10 mb10" :class="videoIndex===index?'checked_tab':''" v-for="(item,index) of operateList" :key="index" @tap="checkVideo(index)">{{item.description}}</view> <view class="tab_iem mr10 mb10" :class="videoIndex===index?'checked_tab':''" v-for="(item,index) of operateList" :key="index" @tap="checkVideo(index)">{{item.description}}</view>
</view> </view>
<view @tap="toVideo"> <view @tap="toVideo">
<video style="width: 100%;height: 362rpx;border-radius: 16rpx;" id="myVideo" src="http://flv4mp4.people.com.cn/videofile7/pvmsvideo/2021/3/10/ChenQiuNan_3c561132970edeedc50e153fcf3b186b_android_c.mp4"></video> <view class="wp100 relative" style="height: 362rpx;border-radius: 16rpx;">
<image style="width: 100%;height: 362rpx;border-radius: 16rpx;" id="myVideo" src="../../../static/image/index/jpsp.png"></image>
<image class="play_btn_2" src="../../static/image/index/play.png" />
</view>
</view> </view>
</view> </view>
<view class="video_box mt10"> <view class="video_box mt10">
<view class="flex ai-c jc-sb"> <view class="flex ai-c jc-sb">
<text class="fs18 cor-000">基础操作讲解</text> <text class="fs18 cor-000">基础操作讲解</text>
<view class="flex cor-666" @tap="toVideo"> <view class="flex cor-666" @tap="toDetail">
<text>全部</text> <text>全部</text>
<u-icon color="#666" name="arrow-right" size="18"></u-icon> <u-icon color="#666" name="arrow-right" size="18"></u-icon>
</view> </view>
</view> </view>
<view class="flex p14lr p20tb bc-fff mt10" style="border-bottom: 1rpx solid #DDDCDC;;" v-for="(item,index) of operateList" :key="index" @tap="toDetail"> <view class="flex p14lr p20tb bc-fff mt10" style="border-bottom: 1rpx solid #DDDCDC;;" v-for="(item,index) of operateList" :key="index" @tap="toVideo">
<image class="pic" src="../../static/image/index/index_bg.jpg"></image> <view class="pic relative">
<image class="pic" src="../../static/image/index/index_bg.jpg"></image>
<image class="play_btn_3" src="../../static/image/index/play.png" />
</view>
<view class="ml10"> <view class="ml10">
<text class="fs16 cor-000 fw600">上车下车的方法</text> <text class="fs16 cor-000 fw600">上车下车的方法</text>
<view class="fs14 mt5 cor-666">上车下车的方法</view> <view class="fs14 mt5 cor-666">上车下车的方法</view>
@ -74,7 +80,6 @@ export default {
}) })
}, },
getVideoList(){ getVideoList(){
console.log(this.subject);
queryProjectList({ queryProjectList({
"carTypeId": storage.get('carType') || '1001', "carTypeId": storage.get('carType') || '1001',
"driveType": this.diverTypeList[this.diverTypeIndex].configItemCode, "driveType": this.diverTypeList[this.diverTypeIndex].configItemCode,
@ -99,7 +104,6 @@ export default {
this.getVideoList() this.getVideoList()
}, },
checkVideo(val){ checkVideo(val){
console.log(val);
this.projectId=this.operateList[val]?.projectId this.projectId=this.operateList[val]?.projectId
this.videoIndex=val this.videoIndex=val
}, },
@ -148,4 +152,18 @@ export default {
background: #00B74F; background: #00B74F;
border-radius: 8rpx; border-radius: 8rpx;
} }
.play_btn_3{
width: 65rpx;
height: 65rpx;
position: absolute;
left:117.5rpx;
top: 52rpx
}
.play_btn_2{
width: 65rpx;
height: 65rpx;
position: absolute;
left: calc((100% - 65rpx)/2);
top: 148.5rpx
}
</style> </style>

@ -1,14 +1,14 @@
<template> <template>
<view> <view>
<u-sticky bgColor="#fff"> <u-sticky bgColor="#fff">
<u-tabs :list="categoryList" :scrollable="false" @change="changeCategory"></u-tabs> <u-tabs :list="categoryList" :current="curTab" :scrollable="false" @change="changeCategory"></u-tabs>
</u-sticky> </u-sticky>
<view style="height: 100vh;background-color: rgb(245, 245, 245);"> <view style="height: 100vh;background-color: rgb(245, 245, 245);">
<template v-if="tIndex===0 || tIndex===3"> <template v-if="tIndex===0 || tIndex===3">
<Subject1 :subject="tIndex+1" :rightList="rightList" :wrongList="wrongList" /> <Subject1 :subject="tIndex+1" :rightList="rightList" :wrongList="wrongList" />
</template> </template>
<template v-else> <template v-else>
<subject2 :subject="tIndex+1" ref="subject2" /> <subject2 :subject="tIndex+1" ref="subjectRef" />
</template> </template>
</view> </view>
</view> </view>
@ -23,7 +23,8 @@
components: {Subject1,Subject2}, components: {Subject1,Subject2},
data() { data() {
return { return {
tIndex:0, curTab:Number(storage.get('curSubject'))-1,
tIndex:Number(storage.get('curSubject'))-1,
searchValue:'', searchValue:'',
cityName:'', cityName:'',
categoryList:[{ categoryList:[{
@ -46,16 +47,23 @@
} }
}, },
methods:{ methods:{
...mapActions(useQuestionStore,['getOrderQuestion']), ...mapActions(useQuestionStore,['getOrderQuestion_sub4','getOrderQuestion_sub1','changeSubject']),
// //
changeCategory(val){ async changeCategory(val){
this.tIndex=val.index this.tIndex=val.index
if(this.tIndex==0){ if(this.tIndex==0){
this.getOrderQuestion('1') await this.getOrderQuestion_sub1()
}else if(this.tIndex==3){ }else if(this.tIndex==3){
this.getOrderQuestion('4') await this.getOrderQuestion_sub4()
}else{ }else{
this.$refs.subject2.getDiverType() this.changeSubject(val.index+1)
setTimeout(()=>{
this.$refs.subjectRef.getDiverType()
},100)
}
if(this.tIndex==0||this.tIndex==3){
this.rightList=storage.get(`rightList_subject${this.tIndex+1}`) || []
this.wrongList=storage.get(`wrongList_subject${this.tIndex+1}`) || []
} }
}, },
} }

@ -5,9 +5,9 @@
<u-tabs :list="categoryList" :scrollable="false" @click="changeCategory"></u-tabs> <u-tabs :list="categoryList" :scrollable="false" @click="changeCategory"></u-tabs>
</u-sticky> </u-sticky>
<view class="p14"> <view class="p14">
<view class="flex ai-c"> <!-- <view class="flex ai-c">
<view class="car_item mr10" v-for="(item,index) of carTypeList" :key="index" @tap="chooseCar(item.value)" :class="item.value===tCar?'checked_car':'unchecked_car'">{{item.label}}</view> <view class="car_item mr10" v-for="(item,index) of carTypeList" :key="index" @tap="chooseCar(item.value)" :class="item.value===tCar?'checked_car':'unchecked_car'">{{item.label}}</view>
</view> </view> -->
<view class="flex p14 bc-fff mt10" style="border-radius: 16rpx;" v-for="(item,index) of videoList" :key="index" @tap="toDetail"> <view class="flex p14 bc-fff mt10" style="border-radius: 16rpx;" v-for="(item,index) of videoList" :key="index" @tap="toDetail">
<image class="pic" src="../../static/image/index/index_bg.png"></image> <image class="pic" src="../../static/image/index/index_bg.png"></image>
<view class="ml10"> <view class="ml10">

@ -13,6 +13,9 @@
<text class="tag_box">{{getQuestType(quesItem.type)}}</text> <text class="tag_box">{{getQuestType(quesItem.type)}}</text>
<text class="fs18">{{quesItem.question}}</text> <text class="fs18">{{quesItem.question}}</text>
</view> </view>
<view class="p14" v-if="quesItem.imageUrl">
<image style="width: 100%;" mode="widthFix" :src="quesItem.imageUrl"></image>
</view>
<template v-if="quesItem.type!='3'"> <template v-if="quesItem.type!='3'">
<view class="flex m14lr ai-c mt20" v-for="(item,index) in quesItem.optionList" <view class="flex m14lr ai-c mt20" v-for="(item,index) in quesItem.optionList"
:key="item.op" @tap="answerQues(item.opValue,index)"> :key="item.op" @tap="answerQues(item.opValue,index)">

@ -8,7 +8,7 @@
<view class="wp100 text-center" style="margin-top: -153rpx;"> <view class="wp100 text-center" style="margin-top: -153rpx;">
<text v-if="score>=90">太棒了正确率很高了</text> <text v-if="score>=90">太棒了正确率很高了</text>
<text v-else>很遗憾考试不及格</text> <text v-else>很遗憾考试不及格</text>
<button class="centerBtn">马上提分</button> <button class="centerBtn" @click="toVip">马上提分</button>
<view class="flex ai-c jc-c mt10"> <view class="flex ai-c jc-c mt10">
<view class="text-center wp33"> <view class="text-center wp33">
<view>{{doNotNum}}</view> <view>{{doNotNum}}</view>
@ -48,6 +48,11 @@
</template> </template>
<script> <script>
import {
mapState,
mapActions
} from 'pinia' //
import useUserStore from '@/jtools/store/user'
import GradesChart from "./components/GradesChart.vue" import GradesChart from "./components/GradesChart.vue"
import storage from '@/jtools/storage'; import storage from '@/jtools/storage';
import { import {
@ -119,7 +124,24 @@
onReady() { onReady() {
this.getServerData(); this.getServerData();
}, },
computed: {
...mapState(useUserStore, ["vipOnList"])
},
methods: { methods: {
...mapActions(useUserStore, ['searchUserVip']),
async toVip(){
await this.searchUserVip()
const res = this.vipOnList.some(item => item.subjects == this.subject)
if(res){
uni.navigateTo({
url: '/pages/me/vip'
})
}else{
uni.navigateTo({
url:"/pages/index/videoVip?subject="+this.subject
})
}
},
getServerData() { getServerData() {
testTotal({ testTotal({
"carTypeId": storage.get('carType') || '1001', "carTypeId": storage.get('carType') || '1001',

@ -19,7 +19,7 @@
</view> </view>
<view class="bc-fff pt14" style="border-radius: 20rpx;"> <view class="bc-fff pt14" style="border-radius: 20rpx;">
<u-grid :border="false" col="4"> <u-grid :border="false" col="4">
<u-grid-item v-for="(listItem,listIndex) in list" :key="listIndex" @click="toAnswer(listItem.title)"> <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;"> <view style="width: 84rpx;height: 84rpx;">
<image style="width: 84rpx;" mode="widthFix" :src="listItem.image"></image> <image style="width: 84rpx;" mode="widthFix" :src="listItem.image"></image>
</view> </view>
@ -57,26 +57,32 @@
list:[{ list:[{
title:'新规题', title:'新规题',
subTitle:'392题', subTitle:'392题',
isNew:1,
isError:0,
image:newRulesIcon image:newRulesIcon
},{ },{
title:'易错题', title:'易错题',
isNew:0,
isError:1,
subTitle:'392题', subTitle:'392题',
image:errorIcon image:errorIcon
},{
title:'未做题',
subTitle:'392题',
image:neverWriteIcon
},{ },{
title:'单选题', title:'单选题',
subTitle:'392题', subTitle:'392题',
isNew:0,
isError:0,
image:newRulesIcon image:newRulesIcon
},{ },{
title:'判断题', title:'判断题',
subTitle:'392题', subTitle:'392题',
isNew:0,
isError:0,
image:errorIcon image:errorIcon
},{ },{
title:'图片题', title:'图片题',
subTitle:'392题', subTitle:'392题',
isNew:0,
isError:0,
image:neverWriteIcon image:neverWriteIcon
}], }],
testCenterList:[] testCenterList:[]
@ -94,9 +100,9 @@
} }
}) })
}, },
toAnswer(title) { toAnswer(title,isError,isNew) {
uni.navigateTo({ uni.navigateTo({
url:"/pages/questionBank/questionBank?navTitle="+title url:"/pages/questionBank/questionBank?navTitle="+title+"&isError="+isError+"&isNew="+isNew
}) })
}, },
toQuestionBank(val){ toQuestionBank(val){

@ -92,9 +92,9 @@
} }
}, },
computed: { computed: {
...mapState(useQuestionStore, ["orderQuestion"]), //tagslist ...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject1"]), //tagslist
getNotDoNum(){ getNotDoNum(){
return this.orderQuestion.length-(this.allRightList.length+this.allWrongList.length) return this[`orderQuestion_subject${this.subject}`].length-(this.allRightList.length+this.allWrongList.length)
} }
}, },
methods: { methods: {

@ -44,11 +44,18 @@
if (op.needVip) { if (op.needVip) {
this.needVip = op.needVip this.needVip = op.needVip
} }
if(op.subject){
this.subject=op.subject
}
if (op && op.navTitle) { if (op && op.navTitle) {
this.navTitle = op.navTitle this.navTitle = op.navTitle
const param = {} const param = {}
if (this.navTitle === '顺序答题' || this.navTitle === '精简500题') { if (this.navTitle === '顺序答题' || this.navTitle === '精简500题') {
this.questionArr = [...this.orderQuestion] if(this.subject=='1'){
this.questionArr = [...this.orderQuestion_subject1]
}else if(this.subject=='4'){
this.questionArr = [...this.orderQuestion_subject4]
}
if (this.needVip === 'true') { if (this.needVip === 'true') {
if (this.token) { if (this.token) {
await this.searchUserVip() await this.searchUserVip()
@ -65,12 +72,6 @@
} }
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr)) this.$refs.question.getQuestionList(JSON.stringify(this.questionArr))
} else { } else {
if (!storage.get('token')) {
uni.navigateTo({
url: '/pages/login/login'
})
return
}
if (this.navTitle === '错题本') { if (this.navTitle === '错题本') {
param.questionIdList = storage.get(`wrongList_subject${this.subject}`) || [] param.questionIdList = storage.get(`wrongList_subject${this.subject}`) || []
} else if (this.navTitle === '收藏夹') { } else if (this.navTitle === '收藏夹') {
@ -85,6 +86,12 @@
if (op.examKey) { if (op.examKey) {
param.examKey = 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)
}
queryQuestion(param).then(res => { queryQuestion(param).then(res => {
if (res.code == '0000') { if (res.code == '0000') {
this.questionArr = res.data this.questionArr = res.data
@ -93,12 +100,9 @@
}) })
} }
} }
if (op.subject) {
this.subject = op.subject
}
}, },
computed: { computed: {
...mapState(useQuestionStore, ["orderQuestion"]), //tagslist ...mapState(useQuestionStore, ["orderQuestion_subject1","orderQuestion_subject4"]), //tagslist
...mapState(useUserStore, ["vipOnList", "token"]) ...mapState(useUserStore, ["vipOnList", "token"])
}, },
methods: { methods: {

@ -1,8 +1,7 @@
<template> <template>
<view> <view>
<sunny-video style="width: 100%" videoHeight="422rpx" ref="sunny-video" title="测试视频" <sunny-video style="width: 100%" videoHeight="422rpx" ref="sunny-video" title="测试视频"
src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20200317.mp4" src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20200317.mp4" />
@timeupdate="timeupdate" />
<view class="p14tb bc-fff"> <view class="p14tb bc-fff">
<view class="skill-sequence-panel-content-wrapper pr14" v-if="videoType=='test'"> <view class="skill-sequence-panel-content-wrapper pr14" v-if="videoType=='test'">
<scroll-view class="skill-sequence-panel-content" scroll-x> <scroll-view class="skill-sequence-panel-content" scroll-x>
@ -28,7 +27,7 @@
@click="checkVideo(item.projectId)"> @click="checkVideo(item.projectId)">
<view> <view>
<view class="mb10 relative"> <view class="mb10 relative">
<image class="contain-box" src="../../static/image/index/index_bg.png"></image> <image class="contain-box" src="../../static/image/index/jpsp.png"></image>
<view v-if="projectId==item.projectId" class="playLogo">播放中</view> <view v-if="projectId==item.projectId" class="playLogo">播放中</view>
<image class="play_btn" src="../../static/image/index/play.png" /> <image class="play_btn" src="../../static/image/index/play.png" />
<text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">13:14</text> <text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">13:14</text>
@ -48,7 +47,7 @@
<view class="flex bc-fff mt10" style="border-radius: 16rpx;" v-for="(item,index) of videoList" :key="index" <view class="flex bc-fff mt10" style="border-radius: 16rpx;" v-for="(item,index) of videoList" :key="index"
@tap="toDetail"> @tap="toDetail">
<view class="pic relative"> <view class="pic relative">
<image class="pic" src="../../static/image/index/index_bg.png"></image> <image class="pic" src="../../static/image/index/jpsp.png"></image>
<image class="play_btn_2" src="../../static/image/index/play.png" /> <image class="play_btn_2" src="../../static/image/index/play.png" />
<text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">13:14</text> <text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">13:14</text>
</view> </view>

@ -1,77 +1,84 @@
<template> <template>
<view> <view>
<u-sticky bgColor="#fff"> <u-sticky bgColor="#fff">
<u-tabs :list="categoryList" :scrollable="false" @click="tabChange"></u-tabs> <u-tabs :list="categoryList" :scrollable="false" @click="tabChange"></u-tabs>
</u-sticky> </u-sticky>
<view class="p14"> <view class="p14">
<view class="top_box"> <view class="top_box">
<view class="tip_box flex ai-c jc-sb" v-if="tIndex==0"> <view class="tip_box flex ai-c jc-sb" v-if="tIndex==0">
<view class="flex ai-c"> <view class="flex ai-c">
<u-icon name="error-circle-fill" color="#FF6E02" size="18"></u-icon> <u-icon name="error-circle-fill" color="#FF6E02" size="18"></u-icon>
<text class="ml10 fs12" style="color: #FF6E02;">{{title}}</text> <text class="ml10 fs12" style="color: #FF6E02;">{{title}}</text>
</view>
<u-icon name="close" color="#FF6E02" size="18"></u-icon>
</view> </view>
<view class="p14"> <u-icon name="close" color="#FF6E02" size="18"></u-icon>
<text class="fs18 cor-000 fw600">{{tIndex==0?'错题':'收藏'}}情况</text> </view>
<view class="total_box mt10"> <view class="p14">
<view class="flex ai-c jc-sb"> <text class="fs18 cor-000 fw600">{{tIndex==0?'错题':'收藏'}}情况</text>
<view class="text-center"> <view class="total_box mt10">
<view style="width: 111rpx;" class="fs30 cor-000">{{tIndex==0?wrongList.length:collectList.length}}</view> <view class="flex ai-c jc-sb">
</view> <view class="text-center">
<view style="text-align: right;flex-direction: column;justify-content: right" class="flex ai-c" @tap="toPractice"> <view style="width: 111rpx;" class="fs30 cor-000">{{tIndex==0?wrongList.length:collectList.length}}
<u-icon name="arrow-right" size="18"></u-icon>
</view> </view>
</view> </view>
<view class="flex ai-c jc-sb mt5"> <view style="text-align: right;flex-direction: column;justify-content: right" class="flex ai-c"
<view class="text-center"> @tap="toPractice">
<text class="fs14 cor-666">全部{{tIndex==0?'错题':'收藏'}}</text> <u-icon name="arrow-right" size="18"></u-icon>
</view>
<view style="text-align: right;flex-direction: column;justify-content: right" class="flex ai-c">
<text v-if="tIndex==0" class="fs14 cor-666">{{wrongList.length}}/已做{{wrongList.length+rightList.length}}</text>
</view>
</view> </view>
</view> </view>
<view class="yellow_box" v-if="tIndex==0&&getPercent>10"> <view class="flex ai-c jc-sb mt5">
<view class="flex jc-sb ai-c"> <view class="text-center">
<view> <text class="fs14 cor-666">全部{{tIndex==0?'错题':'收藏'}}</text>
<text class="fs24 fw600" style="color: #FF6E02;">{{getPercent}}%</text><text class="fs18 cor-000 fw600">错题率</text> </view>
<view class="fs14 cor-000">错题率有点高快去提升吧</view> <view style="text-align: right;flex-direction: column;justify-content: right" class="flex ai-c">
</view> <text v-if="tIndex==0"
<!-- <view style="width: 156rpx;"> class="fs14 cor-666">{{wrongList.length}}/已做{{wrongList.length+rightList.length}}</text>
</view>
</view>
</view>
<view class="yellow_box" v-if="tIndex==0&&getPercent>10">
<view class="flex jc-sb ai-c">
<view>
<text class="fs24 fw600" style="color: #FF6E02;">{{getPercent}}%</text><text
class="fs18 cor-000 fw600">错题率</text>
<view class="fs14 cor-000">错题率有点高快去提升吧</view>
</view>
<!-- <view style="width: 156rpx;">
<button class="riseBtn">马上提升</button> <button class="riseBtn">马上提升</button>
</view> --> </view> -->
</view>
</view> </view>
<view class="flex jc-sb ai-c mt10" v-if="tIndex==0"> </view>
<text>答对后自动移除错题</text> <view class="flex jc-sb ai-c mt10" v-if="tIndex==0">
<u-switch v-model="isMoveWrong" activeColor="#0BD032" ></u-switch> <text>答对后自动移除错题</text>
<u-switch v-model="isMoveWrong" activeColor="#0BD032"></u-switch>
</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">
<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> </view>
<view style="margin-top: 30rpx;" v-if="tIndex==0"> <view class="top_box mt15 p14">
<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">
<image class="contain-box" src="../../static/image/index/index_bg.png"></image>
<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="flex jc-sb aic"> <view class="flex jc-sb aic">
<text class="fs18 cor-000 fw600">{{tIndex==0?'错题':'收藏题'}}分类</text> <text class="fs18 cor-000 fw600">{{tIndex==0?'错题':'收藏题'}}分类</text>
<u-icon name="arrow-right" size="18"></u-icon> <!-- <u-icon name="arrow-right" size="18"></u-icon> -->
</view> </view>
<view class="flex ai-c jc-sb" style="flex-wrap: wrap;"> <view class="flex ai-c jc-sb" style="flex-wrap: wrap;">
<view v-for="(item,index) of typeList" :key="index" class="category_item p14 flex jc-sb ai-c mb10"> <view v-for="(item,index) of typeList" :key="index" class="category_item p14 flex jc-sb ai-c mb10">
@ -80,7 +87,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
@ -89,56 +96,85 @@
import { import {
questionCategory questionCategory
} from '@/jtools/api/question'; } from '@/jtools/api/question';
export default{ export default {
data(){ data() {
return{ return {
collectList:[], collectList: [],
rightList:storage.get(`rightList_subject${this.subject}`) || [], rightList: storage.get(`rightList_subject${this.subject}`) || [],
wrongList:storage.get(`wrongList_subject${this.subject}`) || [], wrongList: storage.get(`wrongList_subject${this.subject}`) || [],
subject:0, subject: 0,
tIndex:0, tIndex: 0,
isMoveWrong:true, isMoveWrong: true,
title:'重要提示:所有错题做对,再去考试!', title: '重要提示:所有错题做对,再去考试!',
categoryList:[{ categoryList: [{
name:'错题本' name: '错题本'
},{name:'收藏夹'}], }, {
typeList:[] name: '收藏夹'
}],
typeList: []
} }
}, },
onLoad(op){ onLoad(op) {
if(op.subject){ if (op.subject) {
this.subject=op.subject this.subject = op.subject
this.rightList=storage.get(`rightList_subject${this.subject}`) || [] this.rightList = storage.get(`rightList_subject${this.subject}`) || []
this.wrongList=storage.get(`wrongList_subject${this.subject}`) || [] this.wrongList = storage.get(`wrongList_subject${this.subject}`) || []
this.collectList=storage.get(`collectList_subject${this.subject}`) || [] this.collectList = storage.get(`collectList_subject${this.subject}`) || []
this.getQuestionCategory() this.getQuestionCategory()
} }
}, },
computed:{ computed: {
getPercent(){ getPercent() {
return ((this.wrongList.length/(this.wrongList.length+this.rightList.length))*100).toFixed(0) return ((this.wrongList.length / (this.wrongList.length + this.rightList.length)) * 100).toFixed(0)
} }
}, },
methods:{ methods: {
getQuestionCategory(){ getQuestionCategory() {
const param={} const param = {}
if(this.tIndex==0){ if (this.tIndex == 0) {
param.questionIdList=this.wrongList param.questionIdList = this.wrongList
}else{ } else {
param.questionIdList=this.collectList param.questionIdList = this.collectList
} }
questionCategory(param).then(resp=>{ questionCategory(param).then(resp => {
this.typeList=resp.data this.typeList = resp.data
}) })
}, },
tabChange(val){ tabChange(val) {
this.tIndex=val.index this.tIndex = val.index
this.getQuestionCategory() this.getQuestionCategory()
}, },
toPractice(){ toPractice() {
const navTitle=this.tIndex==0?'错题本':'收藏夹' const navTitle = this.tIndex == 0 ? '错题本' : '收藏夹'
if (navTitle == '错题本') {
if (!this.wrongList.length) {
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('用户点击确定');
}
}
});
return
}
uni.navigateTo({ uni.navigateTo({
url:"/pages/questionBank/questionBank?navTitle="+navTitle+"&subject="+this.subject url: "/pages/questionBank/questionBank?navTitle=" + navTitle + "&subject=" + this.subject
}) })
} }
} }
@ -147,65 +183,80 @@
<style scoped> <style scoped>
::v-deep .u-tabs__wrapper__nav__line { ::v-deep .u-tabs__wrapper__nav__line {
background: linear-gradient(90deg, #11DF20 0%, #00B74F 100%) !important; background: linear-gradient(90deg, #11DF20 0%, #00B74F 100%) !important;
bottom: 14rpx !important; bottom: 14rpx !important;
} }
.top_box{
width: 100%; .top_box {
background: #FDFDFD; width: 100%;
border-radius: 20rpx; background: #FDFDFD;
} border-radius: 20rpx;
.tip_box{ }
width: 100%;
background: #FFE6D4; .tip_box {
border-radius: 20rpx 20rpx 0rpx 0rpx; width: 100%;
padding: 10px 14px; background: #FFE6D4;
} border-radius: 20rpx 20rpx 0rpx 0rpx;
.total_box{ padding: 10px 14px;
width: 100%; }
background: #F5F5F5;
border-radius: 20rpx; .total_box {
padding: 14px; width: 100%;
} background: #F5F5F5;
.yellow_box{ border-radius: 20rpx;
margin-top: 10px; padding: 14px;
padding: 14px; }
width: 100%;
background: linear-gradient(90deg, #FBF2D4 0%, #F7E4B5 100%); .yellow_box {
border-radius: 20rpx; margin-top: 10px;
} padding: 14px;
.riseBtn{ width: 100%;
width: 156rpx; background: linear-gradient(90deg, #FBF2D4 0%, #F7E4B5 100%);
height: 56rpx; border-radius: 20rpx;
text-align: center; }
line-height: 56rpx;
font-size: 12px; .riseBtn {
background-color: #F7E4B5; width: 156rpx;
border: 1px solid #FF6E02; height: 56rpx;
color: #FF6E02; text-align: center;
border-radius: 28rpx; line-height: 56rpx;
} font-size: 12px;
.video-box { background-color: #F7E4B5;
padding: 20rpx; border: 1px solid #FF6E02;
width: 694rpx; color: #FF6E02;
height: 369rpx; border-radius: 28rpx;
background: #DEEFE5; }
border: 2px solid #47DB87;
border-radius: 16rpx; .video-box {
} padding: 20rpx;
width: 694rpx;
.contain-box { height: 369rpx;
width: 406rpx; background: #DEEFE5;
height: 228rpx; border: 2px solid #47DB87;
background: #00B74F; border-radius: 16rpx;
border-radius: 16rpx; }
}
.category_item{ .contain-box {
width: 312rpx; width: 406rpx;
height: 90rpx; height: 228rpx;
text-align: center; background: #00B74F;
line-height: 90rpx; border-radius: 16rpx;
background: #F5F5F5; }
border-radius: 20rpx;
} .category_item {
width: 312rpx;
height: 90rpx;
text-align: center;
line-height: 90rpx;
background: #F5F5F5;
border-radius: 20rpx;
}
.play_btn_2 {
width: 65rpx;
height: 65rpx;
position: absolute;
left: 165.5rpx;
top: 78rpx
}
</style> </style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Loading…
Cancel
Save