Commit 03028cd0 authored by 李俊赕's avatar 李俊赕
parents 02a1db7c a9d72104
<template> <template>
<view> <view class="learn-vedio">
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view><video object-fit="cover" class="course-video" id="courseVideo" :src="courseSrc" @error="videoErrorCallback" controls></video></view> <view><video object-fit="cover" class="course-video" id="courseVideo" :src="courseSrc"
<uni-group> @error="videoErrorCallback" controls></video></view>
<view class="course-title">{{ courseTitle }}</view> <view class="title-content">
<view class="course-desc">{{ courseDesc }}</view> <view class="item-content">
</uni-group> <view class="item-st">
<text class="item-st-text">{{courseTitle.split(' ') ? courseTitle.split(' ')[0] : ''}}</text>
</view>
<view class="item-title">{{courseTitle.split(' ') ? courseTitle.split(' ')[1] : ''}}</view>
</view>
<view>接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。</view>
</view>
<view class="learn-view">
<view class="learn-view-title">内容大纲</view>
<view class="learn-list" v-for="(item, key) in courseOutline" :key="key">
<view class="learn-list-item">{{item}}</view>
<view class="line-view"></view>
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
let app = getApp(); let app = getApp();
export default { export default {
data() { data() {
return { return {
courseId: '', courseId: '',
...@@ -20,14 +33,15 @@ export default { ...@@ -20,14 +33,15 @@ export default {
courseSrc: '', courseSrc: '',
courseTitle: '', courseTitle: '',
courseDesc: '', courseDesc: '',
courseOutline: ['1 aaa', '2 bbb'] // 视频大纲
}; };
}, },
onLoad(e) { onLoad(e) {
if (e) { if (e) {
if(e.courseId) { if (e.courseId) {
this.courseId = e.courseId; this.courseId = e.courseId;
} }
if(e.id) { if (e.id) {
this.courseId = e.courseId; this.courseId = e.courseId;
this.courseSrc = app.globalData.service_standard[e.id].url; this.courseSrc = app.globalData.service_standard[e.id].url;
this.courseTitle = app.globalData.service_standard[e.id].title; this.courseTitle = app.globalData.service_standard[e.id].title;
...@@ -35,7 +49,7 @@ export default { ...@@ -35,7 +49,7 @@ export default {
this.changeCourseStatus(); this.changeCourseStatus();
} }
if(e.status) { if (e.status) {
this.courseStatus = e.status; this.courseStatus = e.status;
} }
} }
...@@ -63,9 +77,11 @@ export default { ...@@ -63,9 +77,11 @@ export default {
}, },
changeCourseStatus() { changeCourseStatus() {
let that = this let that = this
if(that.courseId) { if (that.courseId) {
that.$u.api.saveCourseRate({courseId: that.courseId}).then(res => { that.$u.api.saveCourseRate({
if(res.code == 200) { courseId: that.courseId
}).then(res => {
if (res.code == 200) {
// uni.navigateBack({delta: 1}) // uni.navigateBack({delta: 1})
uni.navigateTo({ uni.navigateTo({
url: "/pages/learn/exam" url: "/pages/learn/exam"
...@@ -76,7 +92,7 @@ export default { ...@@ -76,7 +92,7 @@ export default {
title: "更新课程状态失败" title: "更新课程状态失败"
}) })
} }
}).catch(e=> { }).catch(e => {
}) })
} else { } else {
...@@ -86,19 +102,118 @@ export default { ...@@ -86,19 +102,118 @@ export default {
} }
}, },
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.course-video { .learn-vedio {
width: 750rpx; background-color: #F4F5F7;
} position: absolute;
.course-title { top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.course-video {
width: 100%;
}
.course-title {
font-size: 36rpx; font-size: 36rpx;
font-weight: 700; font-weight: 700;
padding: 80rpx 60rpx 40rpx 60rpx; padding: 80rpx 60rpx 40rpx 60rpx;
} }
.course-desc {
.course-desc {
margin-left: 60rpx; margin-left: 60rpx;
}
.title-content {
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
background-color: #FFFFFF;
color: #999999;
font-size: 24rpx;
.item-content {
display: flex;
}
.item-st {
width: 80rpx;
height: 36rpx;
background-image: linear-gradient(to right, #FF930D, #FFC174);
font-size: 16rpx;
border-radius: 6rpx 36rpx 36rpx 6rpx;
padding-top: 8rpx;
padding-right: 2rpx;
text-align: center;
margin-right: 20rpx;
.item-st-text {
color: #FFFFFF;
}
}
.item-title {
color: #333333;
font-size: 28rpx;
}
}
.item-content {
display: flex;
padding-bottom: 30rpx;
}
.item-st {
width: 80rpx;
height: 36rpx;
background-image: linear-gradient(to right, #FF930D, #FFC174);
font-size: 16rpx;
border-radius: 6rpx 36rpx 36rpx 6rpx;
padding-top: 8rpx;
padding-right: 2rpx;
text-align: center;
margin-right: 20rpx;
}
.item-title {
color: #333333;
font-size: 28rpx;
}
.learn-view {
background-color: #FFFFFF;
border-radius: 12rpx;
padding: 38rpx 30rpx 30rpx 30rpx;
margin-bottom: 20rpx;
font-size: 32rpx;
color: #333333;
.learn-view-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 10rpx;
} }
.learn-list {
.learn-list-item {
font: 24rpx;
margin-top: 30rpx;
margin-bottom: 30rpx;
}
.line-view {
background-color: #F4F5F7;
height: 2rpx;
width: 100%;
}
}
}
</style> </style>
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
buttonStyle() { buttonStyle() {
return { return {
'color': '#FFFFFF', 'color': '#FFFFFF',
'width': '300rpx', 'width': '500rpx',
'height': '112rpx', 'height': '112rpx',
'background-color': '#2272FF', 'background-color': '#2272FF',
'font-size': '32rpx', 'font-size': '32rpx',
...@@ -293,6 +293,9 @@ ...@@ -293,6 +293,9 @@
padding-right: 2rpx; padding-right: 2rpx;
text-align: center; text-align: center;
margin-right: 20rpx; margin-right: 20rpx;
.item-st-text {
color: #FFFFFF;
}
} }
.item-title { .item-title {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment