Commit dd2a3e88 authored by Morson's avatar Morson

页面调整

parent c701448c
......@@ -17,22 +17,22 @@
icon_auth_notice_new: 'https://qn-static.banshouhui.com/auth_notice_new.png',
// 服务规范教程视频
service_standard: {
"Course1": {
"course1": {
url: "https://qn-static.banshouhui.com/self-support/videoen.mp4",
title: "第一节 师傅考核规则",
desc: "接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。",
},
"Course2": {
"course2": {
url: "https://qn-static.banshouhui.com/self-support/videoen.mp4",
title: "第二节 安装材料及工具",
desc: "接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。",
},
"Course3": {
"course3": {
url: "https://qn-static.banshouhui.com/self-support/videoen.mp4",
title: "第二节 安装施工规范",
desc: "接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。",
},
"Course4": {
"course4": {
url: "https://qn-static.banshouhui.com/self-support/videoen.mp4",
title: "第二节 录单上传要求",
desc: "接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。",
......
......@@ -7,6 +7,7 @@
class="course-video"
id="courseVideo"
:src="courseSrc"
@play="playCourse"
@error="videoErrorCallback"
controls
></video
......@@ -94,7 +95,6 @@ export default {
this.courseSrc = app.globalData.service_standard[e.id].url;
this.courseTitle = app.globalData.service_standard[e.id].title;
this.courseDesc = app.globalData.service_standard[e.id].desc;
this.changeCourseStatus();
}
if (e.status) {
......@@ -123,6 +123,12 @@ export default {
}
return "#" + rgb.join("");
},
playCourse: function (e) {
if(this.courseStatus && (this.courseStatus == "1"||this.courseStatus == 1)) {
return
}
this.changeCourseStatus();
},
changeCourseStatus() {
let that = this;
if (that.courseId) {
......
......@@ -79,16 +79,16 @@
tipsTitle: '提示:',
// 简单使用固定培训视频
tutorials: [{
id: 'Course1',
id: 'course1',
courseId: 1,
title: '',
value: '去学习',
courseActive: {},
status: 1,
status: 0,
url: ''
},
{
id: 'Course2',
id: 'course2',
courseId: 2,
title: '',
value: '去学习',
......@@ -97,7 +97,7 @@
url: ''
},
{
id: 'Course3',
id: 'course3',
courseId: 3,
title: '',
value: '去学习',
......@@ -106,7 +106,7 @@
url: ''
},
{
id: 'Course4',
id: 'course4',
courseId: 4,
title: '',
value: '去学习',
......@@ -161,6 +161,8 @@
item['value'] = item['status'] ? '已学习' : '去学习'
item['courseActive'] = item['status'] ? this.learnStyle : this.learnedStyle
})
},
onShow() {
this.loadLearnData();
},
methods: {
......@@ -169,9 +171,8 @@
that.$u.api
.listOrderingTutorials()
.then(res => {
debugger
const results = res.data;
if (res.code == 200 && results && results.length > 0) {
if (res.code == 200 && results) {
that.tutorials.forEach((data, i) => {
if (results.hasOwnProperty(data.id)) {
data.status = results[data.id];
......@@ -187,7 +188,6 @@
}
})
.catch(e => {
debugger;
console.log(e, 'loadLearnData');
});
},
......
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