提交 8a02c791 authored 作者: 王鹏飞's avatar 王鹏飞

修改国际化内容

上级 af1cdf8b
...@@ -139,28 +139,28 @@ export default class CourseAction extends BaseACTION { ...@@ -139,28 +139,28 @@ export default class CourseAction extends BaseACTION {
__.live.live_status = parseInt(__.live.live_status) __.live.live_status = parseInt(__.live.live_status)
let str = '' let str = ''
switch (__.live.live_status) { switch (__.live.live_status) {
case 1: str = '直播未开始'; break case 1: str = _vIn.$t('live.notStarted'); break
case 2: str = '正在直播'; break case 2: str = _vIn.$t('live.liveStreaming'); break
case 3: str = '直播结束'; break case 3: str = _vIn.$t('live.liveEnd'); break
case 4: str = '即将开始'; break case 4: str = _vIn.$t('live.start'); break
case 5: str = '直播结束'; break case 5: str = _vIn.$t('live.liveEnd'); break
default: str = '直播未开始' default: str = _vIn.$t('live.notStarted')
} }
// 5分钟内显示“即将开始”,5~1小时内“N分钟后开始”,1~24小时内“N小时后开始”,1天以上“N天后开始”天就显示年月日 // 5分钟内显示“即将开始”,5~1小时内“N分钟后开始”,1~24小时内“N小时后开始”,1天以上“N天后开始”天就显示年月日
if (__.live.live_status === 1 && __.live.start_time) { if (__.live.live_status === 1 && __.live.start_time) {
const time = (new Date(__.live.start_time).getTime() - new Date().getTime()) / 1000 const time = (new Date(__.live.start_time).getTime() - new Date().getTime()) / 1000
if (time <= 5 * 60) { if (time <= 5 * 60) {
str = '即将开始' str = _vIn.$t('live.start')
} else if (time <= 1 * 60 * 60) { } else if (time <= 1 * 60 * 60) {
str = parseInt(time / 60) + '分钟后开始' str = _vIn.$t('live.startInMinutes', { minutes: parseInt(time / 60) })
} else if (time <= 24 * 60 * 60) { } else if (time <= 24 * 60 * 60) {
str = parseInt(time / (60 * 60)) + '小时' + parseInt(time / 60 % 60) + '分钟后开始' str = _vIn.$t('live.startInHours', { h: parseInt(time / (60 * 60)), min: parseInt(time / 60 % 60) })
} else { } else {
str = parseInt(time / (24 * 60 * 60)) + '天后开始' str = _vIn.$t('live.startInDay', { day: parseInt(time / (24 * 60 * 60)) })
} }
} }
if (__.live.live_status === 3 && __.live.enable_record && __.live.record_url) { if (__.live.live_status === 3 && __.live.enable_record && __.live.record_url) {
str = '观看回放' str = _vIn.$t('live.watchReplay')
} }
__.live.statusStr = str __.live.statusStr = str
} }
...@@ -184,7 +184,7 @@ export default class CourseAction extends BaseACTION { ...@@ -184,7 +184,7 @@ export default class CourseAction extends BaseACTION {
}) })
} }
json.tabs1ChapterList.course.push({ json.tabs1ChapterList.course.push({
title: '课程大作业', title: _vIn.$t('action.courseAction.courseWork'),
isUp: true, isUp: true,
chapters: [], chapters: [],
id: 'course_work', id: 'course_work',
...@@ -193,7 +193,7 @@ export default class CourseAction extends BaseACTION { ...@@ -193,7 +193,7 @@ export default class CourseAction extends BaseACTION {
type: 99 type: 99
}) })
json.tabs1ChapterList.course.push({ json.tabs1ChapterList.course.push({
title: '课程资料', title: _vIn.$t('action.courseAction.courseData'),
isUp: true, isUp: true,
chapters: [], chapters: [],
id: 'course_info', id: 'course_info',
...@@ -202,7 +202,7 @@ export default class CourseAction extends BaseACTION { ...@@ -202,7 +202,7 @@ export default class CourseAction extends BaseACTION {
type: 100 type: 100
}) })
json.tabs1ChapterList.course.push({ json.tabs1ChapterList.course.push({
title: '教学评估', title: _vIn.$t('action.courseAction.teachingEvaluation'),
isUp: true, isUp: true,
chapters: [], chapters: [],
id: 'teach_evaluation', id: 'teach_evaluation',
...@@ -227,7 +227,7 @@ export default class CourseAction extends BaseACTION { ...@@ -227,7 +227,7 @@ export default class CourseAction extends BaseACTION {
}) })
} }
json.tabs1ChapterList.course.push({ json.tabs1ChapterList.course.push({
title: '课程考试', title: _vIn.$t('action.courseAction.courseExam'),
isUp: true, isUp: true,
chapters: courseExamChildren, chapters: courseExamChildren,
id: 'course_exam', id: 'course_exam',
......
...@@ -13,7 +13,12 @@ ...@@ -13,7 +13,12 @@
"credit": "Credits", "credit": "Credits",
"to": " to ", "to": " to ",
"totalScore": "Overall result:", "totalScore": "Overall result:",
"none": "No" "none": "No",
"workData": "Assignment & material",
"courseWork": "Final assignment",
"courseData": "Course materials",
"courseExam": "Course exam",
"teachingEvaluation": "Teaching evaluation"
} }
}, },
"components": { "components": {
......
...@@ -13,7 +13,12 @@ ...@@ -13,7 +13,12 @@
"credit": "学分", "credit": "学分",
"to": " 至 ", "to": " 至 ",
"totalScore": "总成绩:", "totalScore": "总成绩:",
"none": "暂无" "none": "暂无",
"workData": "大作业及资料",
"courseWork": "课程大作业",
"courseData": "课程资料",
"courseExam": "课程考试",
"teachingEvaluation": "教学评估"
} }
}, },
"components": { "components": {
......
...@@ -8,7 +8,8 @@ export default { ...@@ -8,7 +8,8 @@ export default {
props: { props: {
isSkip: Boolean, isSkip: Boolean,
video: Object, video: Object,
autoplay: { type: Boolean, default: false } autoplay: { type: Boolean, default: false },
disabled: { type: Boolean, default: false }
}, },
data() { data() {
return { player: null } return { player: null }
...@@ -41,6 +42,12 @@ export default { ...@@ -41,6 +42,12 @@ export default {
language: this.$i18n.locale === 'zh-CN' ? 'zh-cn' : 'en-us' language: this.$i18n.locale === 'zh-CN' ? 'zh-cn' : 'en-us'
}, },
function (player) { function (player) {
// 禁止调整进度,隐藏声音和倍数
if (this.disabled) {
$('.prism-volume, .prism-setting-speed').hide()
$('.prism-progress').css('pointer-events', 'none')
}
player.on('ready', function () { player.on('ready', function () {
// 跳过片头 // 跳过片头
_this.isSkip && player.seek(6) _this.isSkip && player.seek(6)
......
...@@ -68,7 +68,8 @@ export default { ...@@ -68,7 +68,8 @@ export default {
ppts: [], ppts: [],
pptIndex: 0, pptIndex: 0,
isSeek: false, isSeek: false,
menuVisible: true menuVisible: true,
timer: null
} }
}, },
watch: { watch: {
...@@ -162,6 +163,11 @@ export default { ...@@ -162,6 +163,11 @@ export default {
this.detail = response this.detail = response
}) })
}, },
// 定时自动获取课程详情
autoGetChapterList() {
this.timer && clearInterval(this.timer)
this.timer = setInterval(this.getCourse, 10000)
},
// PPT列表更新 // PPT列表更新
handlePPTupdate(list) { handlePPTupdate(list) {
this.ppts = list this.ppts = list
...@@ -174,6 +180,10 @@ export default { ...@@ -174,6 +180,10 @@ export default {
}, },
beforeMount() { beforeMount() {
this.getCourse() this.getCourse()
// this.autoGetChapterList()
},
beforeDestroy() {
this.timer && clearInterval(this.timer)
} }
} }
</script> </script>
......
...@@ -494,22 +494,22 @@ export default { ...@@ -494,22 +494,22 @@ export default {
cAction.Course.getCourseAssess(this.cid, this.sid) cAction.Course.getCourseAssess(this.cid, this.sid)
.then(json1 => { .then(json1 => {
const _courseArr = json.tabs1ChapterList.course // const _courseArr = json.tabs1ChapterList.course
/* 进行一次 对照,将 视频 vid 赋值 */ // /* 进行一次 对照,将 视频 vid 赋值 */
/* BUG: 如果有某一章 都没有视频时,对照失败,从没有的那一章开始,后面全部没有vid */ // /* BUG: 如果有某一章 都没有视频时,对照失败,从没有的那一章开始,后面全部没有vid */
for (let i = 0; i < json1.video.length; i++) { // for (let i = 0; i < json1.video.length; i++) {
const _tmp = json1.video[i].arr // const _tmp = json1.video[i].arr
const _tmp1 = _courseArr[i].chapters // const _tmp1 = _courseArr[i].chapters
for (let j = 0; j < _tmp.length; j++) { // for (let j = 0; j < _tmp.length; j++) {
for (let k = j; k < _tmp1.length; k++) { // for (let k = j; k < _tmp1.length; k++) {
if (_tmp[j].id === _tmp1[k].id) { // if (_tmp[j].id === _tmp1[k].id) {
_tmp[j].vid = _tmp1[k].vid // _tmp[j].vid = _tmp1[k].vid
_tmp[j].duration = _tmp1[k].duration // _tmp[j].duration = _tmp1[k].duration
break // break
} // }
} // }
} // }
} // }
this.tabs[3].assess = json1 this.tabs[3].assess = json1
loading.close() loading.close()
}) })
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论