提交
This commit is contained in:
@@ -8,11 +8,15 @@
|
||||
<!-- <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 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>
|
||||
<view class="flex p14lr p20tb bc-fff mt10" style="border-bottom: 1rpx solid #DDDCDC;;"
|
||||
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>
|
||||
<image class="play_btn_2" src="../../static/image/index/play.png" />
|
||||
</view>
|
||||
<view class="ml10">
|
||||
<text class="fs16 cor-000 fw600">上车、下车的方法</text>
|
||||
<view class="fs14 mt5 cor-666">上车、下车的方法</view>
|
||||
<text class="fs16 cor-000 fw600">{{allVideoList[0]?.description}}</text>
|
||||
<view class="fs14 mt5 cor-666">{{item.description}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -20,25 +24,22 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
querySysConfigList,
|
||||
queryProjectList
|
||||
} from '@/jtools/api/question';
|
||||
import storage from '@/jtools/storage';
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
subject:'1',
|
||||
tCar:0,
|
||||
categoryList:[{
|
||||
name:'手动挡C1'
|
||||
},{
|
||||
name:'自动挡C2'
|
||||
}],
|
||||
carTypeList:[{
|
||||
label:'捷达',
|
||||
value:0
|
||||
},{
|
||||
label:'新桑塔纳',
|
||||
value:1
|
||||
},{
|
||||
label:'爱丽舍',
|
||||
value:2
|
||||
}],
|
||||
allVideoList:[],
|
||||
videoList:[{
|
||||
label:"111"
|
||||
},{
|
||||
@@ -50,12 +51,69 @@
|
||||
}]
|
||||
}
|
||||
},
|
||||
onLoad(op){
|
||||
if(op.subject){
|
||||
this.subject=op.subject
|
||||
this.getDiverType()
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
formateTime(time) {
|
||||
const h = parseInt(time / 3600)
|
||||
const minute = parseInt(time / 60 % 60)
|
||||
const second = Math.ceil(time % 60)
|
||||
const hours = h < 10 ? '0' + h : h
|
||||
const formatSecond = second > 59 ? 59 : second
|
||||
return `${hours > 0 ? `${hours}:` : ''}${minute < 10 ? '0' + minute : minute}:${formatSecond < 10 ? '0' + formatSecond : formatSecond}`
|
||||
},
|
||||
toOperateDetail(val){
|
||||
let arr = JSON.parse(JSON.stringify(this.allVideoList[0].videoList))
|
||||
arr = arr.map(item => {
|
||||
return {
|
||||
...item,
|
||||
projectId:item.videoId,
|
||||
videoTime:this.formateTime(item.videoTime)
|
||||
}
|
||||
})
|
||||
let jsonString = JSON.stringify(arr)
|
||||
uni.navigateTo({
|
||||
url: "/pages/questionBank/videoDetail?videoList=" + jsonString + "&subject=" + this.subject +
|
||||
"&projectId=" + val + "&type=2"
|
||||
})
|
||||
},
|
||||
getOperateList() {
|
||||
queryProjectList({
|
||||
"carTypeId": storage.get('carType') || '1001',
|
||||
"subject": String(this.subject),
|
||||
"driveType": this.categoryList[this.tCar].configItemCode,
|
||||
"type": "2"
|
||||
}).then(resp => {
|
||||
if(resp.code==='0000'){
|
||||
this.videoList=resp.data[0]?resp.data[0].videoList:[]
|
||||
this.allVideoList=resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getDiverType() {
|
||||
const carTypeId = storage.get('carType') || '1001'
|
||||
querySysConfigList(carTypeId, 'DriveType').then(resp => {
|
||||
if (resp.code === '0000') {
|
||||
this.categoryList=resp.data.map(item=>{
|
||||
return {
|
||||
...item,
|
||||
name:item.configItemName
|
||||
}
|
||||
})
|
||||
this.getOperateList()
|
||||
}
|
||||
})
|
||||
},
|
||||
chooseCar(val){
|
||||
this.tCar=val
|
||||
},
|
||||
changeCategory(val){
|
||||
|
||||
this.tCar=val.index
|
||||
this.getOperateList()
|
||||
},
|
||||
toDetail(){
|
||||
uni.navigateTo({
|
||||
@@ -93,4 +151,11 @@
|
||||
background: #00B74F;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.play_btn_2 {
|
||||
width: 65rpx;
|
||||
height: 65rpx;
|
||||
position: absolute;
|
||||
left: 117.5rpx;
|
||||
top: 52rpx
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="flex ai-c jc-c">
|
||||
<view class="flex type_box jc-sb ai-c">
|
||||
<view class="flex type_box jc-sb ai-c" v-if="navTitle!=='考前密卷'">
|
||||
<view class="type_item" v-for="(item,index) of tabsList" :key="index" :class="tCurrent==item.value?'checked':'unchecked'" @tap="sectionChange(item.value)">{{item.label}}</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -83,7 +83,7 @@
|
||||
<view class="wp100 flex jc-sb ai-c p14 bc-fff" v-if="isShowAll" style="position: fixed;bottom: 0;left: 0;">
|
||||
<view style="width: 220rpx;">
|
||||
<view v-if="type==='practice'" style="width: 220rpx;height: 80rpx;"></view>
|
||||
<view v-else class="btn" style="text-align: center;" @tap="submitPaper">
|
||||
<view v-else-if="type=='exam'" class="btn" style="text-align: center;" @tap="submitPaper">
|
||||
<u-count-down ref="countDown_1" :time=" 1*60*60 * 1000" format="HH:mm:ss" @change="timeChange"></u-count-down>
|
||||
<text>交卷</text>
|
||||
</view>
|
||||
@@ -147,8 +147,14 @@
|
||||
</view>
|
||||
<template #confirmButton>
|
||||
<view class="p10" >
|
||||
<u-button :customStyle="{width:'45%',marginRight:'10px',height:'68rpx',lineHeight:'68rpx',borderRadius:'34rpx',color:'#666',border:'1px solid #666',display:'inline-block'}" @click="continueExam">继续考试</u-button>
|
||||
<u-button :customStyle="{width:'45%',marginLeft:'10px',height:'68rpx',lineHeight:'68rpx',borderRadius:'34rpx',color:'#fff',backgroundColor:'#05C341',display:'inline-block'}" @click="toSubmit">现在交卷</u-button>
|
||||
<template v-if="isShowAll">
|
||||
<u-button :customStyle="{width:'45%',marginRight:'10px',height:'68rpx',lineHeight:'68rpx',borderRadius:'34rpx',color:'#666',border:'1px solid #666',display:'inline-block'}" @click="continueExam">继续考试</u-button>
|
||||
<u-button :customStyle="{width:'45%',marginLeft:'10px',height:'68rpx',lineHeight:'68rpx',borderRadius:'34rpx',color:'#fff',backgroundColor:'#05C341',display:'inline-block'}" @click="toSubmit">现在交卷</u-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<u-button :customStyle="{width:'45%',marginRight:'10px',height:'68rpx',lineHeight:'68rpx',borderRadius:'34rpx',color:'#666',border:'1px solid #666',display:'inline-block'}" @click="toLeave">确定离开</u-button>
|
||||
<u-button :customStyle="{width:'45%',marginLeft:'10px',height:'68rpx',lineHeight:'68rpx',borderRadius:'34rpx',color:'#fff',backgroundColor:'#05C341',display:'inline-block'}" @click="continueExam">继续考试</u-button>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
</u-modal>
|
||||
@@ -157,7 +163,7 @@
|
||||
<view class="wp100 flex jc-sb p14 bc-fff">
|
||||
<view style="width: 220rpx;">
|
||||
<view v-if="type==='practice'" style="width: 220rpx;height: 80rpx;"></view>
|
||||
<view v-else class="btn" style="text-align: center;" @tap="submitPaper">
|
||||
<view v-else-if="type=='exam'" class="btn" style="text-align: center;" @tap="submitPaper">
|
||||
<u-count-down ref="countDown_2" :time="1 * 60 * 60 * 1000" format="HH:mm:ss"></u-count-down>
|
||||
<text>交卷</text>
|
||||
</view>
|
||||
@@ -263,6 +269,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
originArray:'',
|
||||
showBestAnswer:false,
|
||||
nowPrice:68,
|
||||
showVip:false,
|
||||
@@ -305,6 +312,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useQuestionStore,['getCurrentIndex']),
|
||||
toLeave(){
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
},
|
||||
isShowBest(val){
|
||||
this.showBestAnswer=val
|
||||
},
|
||||
@@ -414,8 +426,10 @@ export default {
|
||||
})
|
||||
},
|
||||
submitPaper(){
|
||||
this.$refs.countDown_1.pause();
|
||||
this.$refs.countDown_2.pause();
|
||||
if(this.isShowAll){
|
||||
this.$refs.countDown_1.pause();
|
||||
this.$refs.countDown_2.pause();
|
||||
}
|
||||
this.$refs.countDown_3.pause();
|
||||
this.$emit('update:isSubmit',true)
|
||||
},
|
||||
@@ -581,6 +595,7 @@ export default {
|
||||
this.questionList[this.topicIndex].clickAnswer = this.questionList[this.topicIndex].clickAnswer.replace(reg2,"");
|
||||
}
|
||||
}
|
||||
this.originArray=JSON.stringify(this.questionList)
|
||||
if(this.tCurrent!==1&&this.questionList[this.topicIndex].type!='3'){
|
||||
const arr1=this.questionList[this.topicIndex].clickAnswer.split('')
|
||||
const arr2=this.questionList[this.topicIndex].trueAnswer.split('')
|
||||
@@ -644,19 +659,24 @@ export default {
|
||||
this.$emit('changeTab',index)
|
||||
},
|
||||
getQuestionList(val) {
|
||||
const arr = JSON.parse(val)
|
||||
this.questionList=[]
|
||||
arr.forEach(item=>{
|
||||
let isCollect=false
|
||||
if(this.collectList.includes(item.questionId)){
|
||||
isCollect=true
|
||||
}
|
||||
this.questionList.push({
|
||||
isChoose:false,
|
||||
isCollect:isCollect,
|
||||
...item
|
||||
if(val&&val.length){
|
||||
const arr = JSON.parse(val)
|
||||
this.questionList=[]
|
||||
arr.forEach(item=>{
|
||||
let isCollect=false
|
||||
if(this.collectList.includes(item.questionId)){
|
||||
isCollect=true
|
||||
}
|
||||
this.questionList.push({
|
||||
isChoose:false,
|
||||
isCollect:isCollect,
|
||||
...item
|
||||
})
|
||||
})
|
||||
})
|
||||
}else{
|
||||
this.questionList=JSON.parse(this.originArray)
|
||||
}
|
||||
|
||||
if(this.navTitle==='顺序答题'){
|
||||
this.pickerTopic(this[`currentIndex_subject${this.subject}`])
|
||||
}else{
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
import neverWriteIcon from "../../static/image/practice/neverWrite_icon.png"
|
||||
import {
|
||||
querySysConfigList,
|
||||
querySpecialNum
|
||||
} from '@/jtools/api/question';
|
||||
import storage from '@/jtools/storage';
|
||||
export default {
|
||||
@@ -94,8 +95,90 @@
|
||||
this.subject=op.subject
|
||||
}
|
||||
this.getExamPoint()
|
||||
this.getQuestionNum()
|
||||
},
|
||||
methods: {
|
||||
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
|
||||
}]
|
||||
}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
|
||||
}]
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getExamPoint(){
|
||||
const carTypeId=storage.get('carType') || '1001'
|
||||
const examKey = this.subject=='1'?'ExamKeysOfSubjectOne':'ExamKeysOfSubjectFour'
|
||||
@@ -106,13 +189,31 @@
|
||||
})
|
||||
},
|
||||
toAnswer(title,isError,isNew) {
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle="+title+"&isError="+isError+"&isNew="+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
|
||||
})
|
||||
}
|
||||
},
|
||||
toQuestionBank(val){
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/questionBank?navTitle="+val.configItemName+"&examKey="+val.configItemCode
|
||||
url:"/pages/questionBank/questionBank?navTitle="+val.configItemName+"&examKey="+val.configItemCode+"&subject="+this.subject
|
||||
})
|
||||
},
|
||||
toIconSkill(){
|
||||
|
||||
@@ -2,12 +2,17 @@
|
||||
<view>
|
||||
<!-- <u-navbar title="模拟考试" @rightClick="rightClick" :autoBack="true">
|
||||
</u-navbar> -->
|
||||
<j-navbar :isDefineBack="true" @toBack="toBack">模拟考试</j-navbar>
|
||||
<Question ref="question" :tabsList="tabsList" v-model:isSubmit="isSubmit" type="exam" :subject="subject" navTitle="模拟考试" />
|
||||
<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" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapActions
|
||||
} from 'pinia' //引入映射函数
|
||||
import useUserStore from '@/jtools/store/user'
|
||||
import {
|
||||
getTestQuestion
|
||||
} from '@/jtools/api/question';
|
||||
@@ -19,6 +24,9 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type:'',
|
||||
isShowAll:true,
|
||||
title:"模拟考试",
|
||||
subject:1,
|
||||
isSubmit:false,
|
||||
tabsList:[{
|
||||
@@ -31,23 +39,50 @@
|
||||
}
|
||||
},
|
||||
onLoad(op) {
|
||||
if(op.title){
|
||||
this.title=op.title
|
||||
}
|
||||
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
|
||||
}).then(resp=>{
|
||||
subject: this.subject,
|
||||
...param
|
||||
}).then(async (resp)=>{
|
||||
if(resp.code==='0000'){
|
||||
this.$refs.question.getQuestionList(JSON.stringify(resp.data))
|
||||
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))
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(useUserStore, ["vipOnList"])
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useUserStore, ['searchUserVip']),
|
||||
toBack(){
|
||||
this.$refs.question.submitPaper()
|
||||
},
|
||||
changeTab(val){
|
||||
if(val==1){
|
||||
uni.navigateTo({
|
||||
url:"/pages/questionBank/practiceExams?subject="+this.subject+'&title=考前密卷&isExam1=1'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,26 +50,12 @@
|
||||
if (op && op.navTitle) {
|
||||
this.navTitle = op.navTitle
|
||||
const param = {}
|
||||
if (this.navTitle === '顺序答题' || this.navTitle === '精简500题') {
|
||||
if (this.navTitle === '顺序答题') {
|
||||
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.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))
|
||||
} else {
|
||||
if (this.navTitle === '错题本') {
|
||||
@@ -92,9 +78,34 @@
|
||||
if(op.isNew&&op.isNew=='1'){
|
||||
param.isNew=Number(op.isNew)
|
||||
}
|
||||
queryQuestion(param).then(res => {
|
||||
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))
|
||||
}
|
||||
})
|
||||
@@ -120,7 +131,7 @@
|
||||
this.$refs.question.getQuestionList(JSON.stringify(list))
|
||||
} else {
|
||||
this.$refs.question.isShowBest(false)
|
||||
this.$refs.question.getQuestionList(JSON.stringify(this.questionArr))
|
||||
this.$refs.question.getQuestionList()
|
||||
}
|
||||
},
|
||||
rightClick() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view>
|
||||
<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" />
|
||||
<sunny-video style="width: 100%" videoHeight="422rpx" ref="sunny-video"
|
||||
:src="videoList[currentIndex].videoUrl" />
|
||||
<view class="p14tb bc-fff">
|
||||
<view class="skill-sequence-panel-content-wrapper pr14" v-if="videoType=='test'">
|
||||
<scroll-view class="skill-sequence-panel-content" scroll-x>
|
||||
@@ -10,7 +10,7 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="flex ai-c jc-sb mt10 wp100 p14">
|
||||
<text class="fs18 fw600 cor-000">C1捷达-基础操作视频讲解</text>
|
||||
<text class="fs18 fw600 cor-000">{{title}}</text>
|
||||
<view class="flex" @tap="popupShow=true" v-if="videoType!='test'">
|
||||
<text class="fs14 cor-666">更多</text>
|
||||
<u-icon color="#666" name="arrow-right" size="18"></u-icon>
|
||||
@@ -20,17 +20,19 @@
|
||||
<view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bc-fff pl14">
|
||||
<view class="bc-fff pl14 pb10">
|
||||
<view class="skill-sequence-panel-content-wrapper">
|
||||
<scroll-view class="skill-sequence-panel-content" scroll-x :scroll-left="164*currentIndex">
|
||||
<view class="skill-sequence-skill-wrapper" v-for="(item, index) in videoList" :key="index"
|
||||
@click="checkVideo(item.projectId)">
|
||||
@tap="checkVideo(item.projectId)">
|
||||
<view>
|
||||
<view class="mb10 relative">
|
||||
<image class="contain-box" src="../../static/image/index/jpsp.png"></image>
|
||||
<view class="contain-box" style="overflow: hidden;">
|
||||
<image class="contain-box" 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">13:14</text>
|
||||
<text style="position: absolute;right: 8rpx;bottom: 8rpx;color:#fff">{{item.videoTime}}</text>
|
||||
</view>
|
||||
<text :style="{color:projectId==item.projectId?'#FF6E02':'#333'}">{{item.description}}</text>
|
||||
</view>
|
||||
@@ -45,11 +47,11 @@
|
||||
</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"
|
||||
@tap="toDetail">
|
||||
<view class="pic relative">
|
||||
<image class="pic" src="../../static/image/index/jpsp.png"></image>
|
||||
@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>
|
||||
<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">{{item.videoTime}}</text>
|
||||
</view>
|
||||
<view class="ml10">
|
||||
<text class="fs16 cor-000 fw600">{{item.description}}</text>
|
||||
@@ -69,6 +71,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title:'',
|
||||
currentIndex:0,
|
||||
videoIndex: 0,
|
||||
testList: [{
|
||||
@@ -131,34 +134,34 @@
|
||||
if(op.projectId){
|
||||
this.projectId=op.projectId
|
||||
}
|
||||
if(op.driveType){
|
||||
this.param.driveType=op.driveType
|
||||
}
|
||||
if(op.subject){
|
||||
this.param.subject=op.subject
|
||||
}
|
||||
if(op.type){
|
||||
this.param.type=op.type
|
||||
}
|
||||
this.getVieoList()
|
||||
if(op.type=='1'){
|
||||
if(this.param.subject=='2'){
|
||||
this.title='科二基础项目讲解'
|
||||
}else{
|
||||
this.title='科三基础项目讲解'
|
||||
}
|
||||
}else{
|
||||
this.title='基础操作讲解'
|
||||
}
|
||||
if(op.videoList){
|
||||
this.videoList=JSON.parse(op.videoList)
|
||||
this.currentIndex=this.videoList.findIndex(item=>item.projectId==this.projectId)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getVieoList(){
|
||||
queryProjectList({
|
||||
"carTypeId": storage.get('carType') || '1001',
|
||||
"driveType": this.param.driveType,
|
||||
"subject": this.param.subject,
|
||||
"type": this.param.type
|
||||
}).then(resp=>{
|
||||
this.videoList=resp.data
|
||||
this.currentIndex=this.videoList.findIndex(item=>item.projectId==this.projectId)
|
||||
})
|
||||
},
|
||||
checkTest(val) {
|
||||
this.videoIndex = val
|
||||
},
|
||||
checkVideo(val) {
|
||||
this.popupShow=false
|
||||
this.projectId = val
|
||||
this.currentIndex=this.videoList.findIndex(item=>item.projectId==this.projectId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,12 +63,12 @@
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user