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

修改国际化内容

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