Commit dd2a3e88 authored by Morson's avatar Morson

页面调整

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