This commit is contained in:
2023-08-28 02:02:46 +08:00
parent 37c5de0899
commit f762ca430d
11 changed files with 586 additions and 249 deletions

View File

@@ -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)
}
}
}