提交 09d70db6 authored 作者: zyx's avatar zyx

update

上级 3edc05ed
......@@ -4,7 +4,12 @@ module.exports = {
// apiBaseURL: '//demo-login.ezijing.com/'
webpack: {
externals: {
'CKEDITOR': 'window.CKEDITOR'
'CKEDITOR': 'window.CKEDITOR',
'VideoJs': 'window.swfobject',
'Base64': 'window.Base64',
// 'sentNotify': 'window.sentNotify',
'Aliplayer': 'window.Aliplayer',
'AliPlayerComponent': 'window.AliPlayerComponent'
}
},
ProvidePlugin: {
......
......@@ -4,7 +4,12 @@ module.exports = {
apiBaseURL: '//api.ezijing.com/',
webpack: {
externals: {
'CKEDITOR': 'window.CKEDITOR'
'CKEDITOR': 'window.CKEDITOR',
'VideoJs': 'window.swfobject',
'Base64': 'window.Base64',
// 'sentNotify': 'window.sentNotify',
'Aliplayer': 'window.Aliplayer',
'AliPlayerComponent': 'window.AliPlayerComponent'
}
},
ProvidePlugin: {
......
......@@ -4,7 +4,12 @@ module.exports = {
apiBaseURL: '//api.ezijing.com/',
webpack: {
externals: {
'CKEDITOR': 'window.CKEDITOR'
'CKEDITOR': 'window.CKEDITOR',
'VideoJs': 'window.swfobject',
'Base64': 'window.Base64',
// 'sentNotify': 'window.sentNotify',
'Aliplayer': 'window.Aliplayer',
'AliPlayerComponent': 'window.AliPlayerComponent'
}
},
ProvidePlugin: {
......
......@@ -14,6 +14,17 @@
<script type="text/javascript" src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/es5-sham.min.js"></script>
<!-- 三方插件引入 -->
<script type="text/javascript" src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/videoJs/videoJs.js"></script>
<script type="text/javascript" src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/convertString/base64-new.js"></script>
<!-- <script type="text/javascript" src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/notify/notification.js"></script> -->
<!-- <script type="text/javascript" src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/errorCollection/collection.js"></script> -->
<!-- 直接引入aliyun播放插件 JS -->
<script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js"></script>
<script type="text/javascript" charset="utf-8" src="https://player.alicdn.com/aliplayer/presentation/js/aliplayercomponents.min.js"></script>
<!-- 解决iframe嵌套,CC视频在safri中打开免登陆兼容问题 -->
<script src="//view.csslcloud.net/js/_fix_.js"></script>
<script src="//view.csslcloud.net/js/jquery-1.9.0.min.js" type="text/javascript"></script>
<script src="//view.csslcloud.net/js/sdk/3.1.0/liveSDK.js" type="text/javascript"></script>
<!--[if lt IE 9]>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/console-polyfill.js"></script>
<script src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/static/compatible/html5shiv.min.js"></script>
......
......@@ -351,7 +351,7 @@ export default {
loadAjax () {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.Player.getExamDetail(this.sid, this.cid, this.id).then(_data => {
let json = _data.homework
const json = _data.homework
if (json) {
json.score = _data.score
json.work_contents = _data.work_contents
......
......@@ -6,7 +6,7 @@
</template>
<script>
import cAction from '@actions'
import cAction from '@action'
import Aliplayer from 'Aliplayer'
import AliPlayerComponent from 'AliPlayerComponent'
import Base64 from 'Base64'
......@@ -57,7 +57,7 @@ export default {
/* 注意 flash 初始化时,需要页面DOM存在 + videoId存在 */
continueStart = this.lastTime || 0 // 如果传递有上次播放时间,则记录缓存,以便player.start时使用
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.chapterAction.getCurrentChapterDetailAliyun(this.videoId).then(json => {
cAction.Player.getCurrentChapterDetailAliyun(this.videoId).then(json => {
this.videoArr = json.video
const player = this.getPlayer()
if (!objPlayer || !player.innerHTML) {
......@@ -133,8 +133,8 @@ export default {
_d.m3u8Url = that.videoArr[videoPlayer.getComponent('QualityComponent').definition || 'LD'] || ''
_d.m3u8RequestId = window.G.m3u8RequestId
_d.UA = window.navigator.userAgent
var arr = JSON.stringify({'action': 'aliVideoErr', info: Base64.encode(str), 'auth': 'aliVideoErr', 'code': Base64.encode(e.paramData.error_code), 'err': Base64.encode(JSON.stringify(_d))}).split('')
// var arr = JSON.stringify({ 'action': 'aliVideoErr', info: Base64.encode(str), 'auth': 'aliVideoErr', 'code': Base64.encode('4006') }).split('')
var arr = JSON.stringify({ action: 'aliVideoErr', info: Base64.encode(str), auth: 'aliVideoErr', code: Base64.encode(e.paramData.error_code), err: Base64.encode(JSON.stringify(_d)) }).split('')
// var arr = JSON.stringify({ action: 'aliVideoErr', info: Base64.encode(str), auth: 'aliVideoErr', code: Base64.encode('4006') }).split('')
var strArr = []
for (var i = 0; i < arr.length; i++) {
strArr[i] = arr[i].charCodeAt()
......@@ -152,7 +152,7 @@ export default {
continueStart = videoPlayer.getCurrentTime()
/* 当视频过期时,重新 获取接口 更改播放地址 重新播放 */
const loading = that.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.chapterAction.getCurrentChapterDetailAliyun(that.videoId).then(json => {
cAction.Player.getCurrentChapterDetailAliyun(that.videoId).then(json => {
that.videoArr = json.video
const player = that.getPlayer()
if (!objPlayer || !player.innerHTML) {
......
......@@ -131,7 +131,7 @@ export default {
if (document.querySelector('#editor-chapterWork')) {
this.initckeditor()
if (this.homeData.work_contents) {
let json = JSON.parse(this.homeData.work_contents)
const json = JSON.parse(this.homeData.work_contents)
if (json[0].is_encoded) {
json[0].descreption = Base64.decode(json[0].descreption)
}
......@@ -151,7 +151,7 @@ export default {
setTimeout(() => {
cAction.Player.getHomeworkStopTime(this.sid, this.cid, this.chapterId).then(data => {
this.deadLine = data.dead_line || ''
let deadLine = data.dead_line ? new Date(data.dead_line).getTime() : ''
const deadLine = data.dead_line ? new Date(data.dead_line).getTime() : ''
// deadLine = new Date().getTime() - 100
this.deadLineFlag = ((new Date().getTime() > deadLine) && !!deadLine)
// console.log(this.deadLine)
......@@ -165,7 +165,7 @@ export default {
}
/* 只能提交 单个问题 */
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
let str = JSON.stringify([{
const str = JSON.stringify([{
question_id: this.chapterWork.questions[0].id,
descreption: Base64.encode(this.ckeditor.getData()),
file_url: this.successFileUrl,
......@@ -205,18 +205,18 @@ export default {
filebrowserImageUploadUrl: '/api/ckeditor/img/upload',
// resize_enabled: typeof this.props.resizable === 'boolean' ? this.props.resizable : true,
toolbar: [
// { name: 'document', items: [ 'Source', '-', 'Save', 'NewPage', 'Preview' ] },
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
{ name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] },
// { name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
{ name: 'editing', items: [ 'Find', 'Replace' ] },
// { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
// { name: 'document', items: ['Source', '-', 'Save', 'NewPage', 'Preview'] },
{ name: 'styles', items: ['Styles', 'Format', 'Font', 'FontSize'] },
{ name: 'colors', items: ['TextColor', 'BGColor'] },
{ name: 'tools', items: ['Maximize', 'ShowBlocks'] },
// { name: 'clipboard', items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'] },
{ name: 'editing', items: ['Find', 'Replace'] },
// { name: 'forms', items: ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'] },
'/',
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
{ name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl' ] },
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule' ] }
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat'] },
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl'] },
{ name: 'links', items: ['Link', 'Unlink', 'Anchor'] },
{ name: 'insert', items: ['Image', 'Table', 'HorizontalRule'] }
]
}))
}
......
......@@ -128,7 +128,7 @@ export default {
if (document.querySelector('#editor-courseWork')) {
this.initckeditor()
if (this.homeData.course_id) {
let json = this.homeData
const json = this.homeData
this.successFileUrl = json.file_url
this.ckeditor.setData(json.essay_description)
this.title = json.essay_name
......@@ -154,7 +154,7 @@ export default {
}
/* 只能提交 单个问题 */
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
let _strContent = this.ckeditor.getData()
const _strContent = this.ckeditor.getData()
.replace(/<(a|b|p|em|span|strong|table|tbody|thead|th|tr|td|div).*?>/gi, '')
.replace(/<\/.*?>/gi, '')
......@@ -197,18 +197,18 @@ export default {
filebrowserImageUploadUrl: '/api/ckeditor/img/upload',
// resize_enabled: typeof this.props.resizable === 'boolean' ? this.props.resizable : true,
toolbar: [
// { name: 'document', items: [ 'Source', '-', 'Save', 'NewPage', 'Preview' ] },
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
{ name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] },
// { name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
{ name: 'editing', items: [ 'Find', 'Replace' ] },
// { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
// { name: 'document', items: ['Source', '-', 'Save', 'NewPage', 'Preview'] },
{ name: 'styles', items: ['Styles', 'Format', 'Font', 'FontSize'] },
{ name: 'colors', items: ['TextColor', 'BGColor'] },
{ name: 'tools', items: ['Maximize', 'ShowBlocks'] },
// { name: 'clipboard', items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'] },
{ name: 'editing', items: ['Find', 'Replace'] },
// { name: 'forms', items: ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'] },
'/',
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
{ name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl' ] },
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule' ] }
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat'] },
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl'] },
{ name: 'links', items: ['Link', 'Unlink', 'Anchor'] },
{ name: 'insert', items: ['Image', 'Table', 'HorizontalRule'] }
]
}))
}
......
......@@ -42,7 +42,7 @@
<!-- 简答题 -->
<template v-if='exam.shortAnswerList.length'>
<template v-for='(item, index) in exam.shortAnswerList'>
<div class='q-group'>
<div v-bind:key="index" class='q-group'>
<div class='q-sa-title'>{{exam.radioList.length+exam.checkboxList.length+index+1}}.&nbsp;&nbsp;简答题</div>
<div class="edit_html" v-html="item.content || ''"></div>
<textarea :id="('editor-exam' + index)" v-model="item.user_answer"></textarea>
......@@ -296,7 +296,7 @@ export default {
if (!this.exam.shortAnswerList) { return }
/* 删除所有 ckeditor 实例 */
const instances = CKEDITOR.instances
for (let name in instances) { instances[name].destroy() }
for (const name in instances) { instances[name].destroy() }
for (let i = 0; i < this.exam.shortAnswerList.length; i++) {
if (!instances['editor-exam' + i]) {
CKEDITOR.replace('editor-exam' + i, {
......@@ -305,18 +305,18 @@ export default {
filebrowserImageUploadUrl: '/api/ckeditor/img/upload',
// resize_enabled: typeof this.props.resizable === 'boolean' ? this.props.resizable : true,
toolbar: [
// { name: 'document', items: [ 'Source', '-', 'Save', 'NewPage', 'Preview' ] },
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
{ name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] },
// { name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
{ name: 'editing', items: [ 'Find', 'Replace' ] },
// { name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
// { name: 'document', items: ['Source', '-', 'Save', 'NewPage', 'Preview'] },
{ name: 'styles', items: ['Styles', 'Format', 'Font', 'FontSize'] },
{ name: 'colors', items: ['TextColor', 'BGColor'] },
{ name: 'tools', items: ['Maximize', 'ShowBlocks'] },
// { name: 'clipboard', items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'] },
{ name: 'editing', items: ['Find', 'Replace'] },
// { name: 'forms', items: ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'] },
'/',
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
{ name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl' ] },
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule' ] }
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat'] },
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl'] },
{ name: 'links', items: ['Link', 'Unlink', 'Anchor'] },
{ name: 'insert', items: ['Image', 'Table', 'HorizontalRule'] }
]
})
}
......@@ -370,10 +370,10 @@ export default {
this.$message.error('已做过,不能再提交')
return
}
let body = { answers: {}, type: !e.submitType ? 1 : 0 } // type: 0 缓存;type: 1 提交
const body = { answers: {}, type: !e.submitType ? 1 : 0 } // type: 0 缓存;type: 1 提交
body.answers.radioList = []
for (let i = 0; i < this.exam.radioList.length; i++) {
let tmp = this.exam.radioList[i]
const tmp = this.exam.radioList[i]
if (!tmp.user_answer && !e.submitType) {
this.$message.error('还有单选题未做,不能提交')
return
......@@ -385,7 +385,7 @@ export default {
}
body.answers.checkboxList = []
for (let i = 0; i < this.exam.checkboxList.length; i++) {
let tmp = this.exam.checkboxList[i]
const tmp = this.exam.checkboxList[i]
if (!tmp.user_answer.length && !e.submitType) {
this.$message.error('还有多选题未做,不能提交')
return
......@@ -397,7 +397,7 @@ export default {
}
body.answers.shortAnswerList = []
for (let i = 0; i < this.exam.shortAnswerList.length; i++) {
let tmp = this.exam.shortAnswerList[i]
const tmp = this.exam.shortAnswerList[i]
tmp.user_answer = tmp.ckeditor.getData()
if (!tmp.user_answer && !e.submitType) {
this.$message.error('还有简答题未做,不能提交')
......@@ -424,9 +424,9 @@ export default {
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
},
_SubmitMouseLeftDown () {
let _fn1 = this.repeatExam.bind(this, false)
const _fn1 = this.repeatExam.bind(this, false)
document.addEventListener('keydown', _fn1, false)
let _fn3 = function () {
const _fn3 = function () {
document.removeEventListener('keydown', _fn1)
document.removeEventListener('mouseup', _fn3)
}
......
......@@ -82,7 +82,7 @@
<script>
import cAction from '@action'
import cTool from '@tools'
import cTool from '@tool'
import sideChapterList from './rightSide/sideChapterList.vue'
import sideChapterPpt from './rightSide/sideChapterPpt.vue'
......
......@@ -90,63 +90,63 @@ export default [
]
},
/* 学习系统 - player */
// {
// path: '/player/:sid/:cid',
// redirect: '/player/0/0/error/404',
// component: () => import('@/pages/player/index.vue'),
// props: true,
// children: [
// { path: 'error/404', component: () => import('@/components/errorPages/404.vue') },
// {
// path: 'chapter-video/:id/:videoType',
// name: 'video',
// component: () => import('@/pages/player/chapterVideo/chapterVideo.vue'),
// props: true
// },
// {
// path: 'chapter-exam/:id',
// name: 'chapterExam',
// component: () => import('@/pages/player/chapterExam/chapterExam.vue'),
// props: true
// },
// {
// path: 'chapter-read/:id',
// name: 'chapterRead',
// component: () => import('@/pages/player/chapterRead/chapterRead.vue'),
// props: true
// },
// {
// path: 'chapter-work/:id',
// name: 'chapterWork',
// component: () => import('@/pages/player/chapterWork/chapterWork.vue'),
// props: true
// },
// {
// path: 'course-info/:id',
// name: 'courseInfo',
// component: () => import('@/pages/player/courseInfo/courseInfo.vue'),
// props: true
// },
// {
// path: 'course-work/:id',
// name: 'courseWork',
// component: () => import('@/pages/player/courseWork/courseWork.vue'),
// props: true
// },
// {
// path: 'exam/:id',
// name: 'exam',
// component: () => import('@/pages/player/exam/exam.vue'),
// props: true
// },
// {
// path: 'live/:id',
// name: 'live',
// component: () => import('@/pages/player/live/live.vue'),
// props: true
// }
// ]
// },
{
path: '/player/:sid/:cid',
redirect: '/player/0/0/error/404',
component: () => import('@/pages/player/index.vue'),
props: true,
children: [
{ path: 'error/404', component: () => import('@/components/errorPages/404.vue') },
{
path: 'chapter-video/:id/:videoType',
name: 'video',
component: () => import('@/pages/player/chapterVideo/chapterVideo.vue'),
props: true
},
{
path: 'chapter-exam/:id',
name: 'chapterExam',
component: () => import('@/pages/player/chapterExam/chapterExam.vue'),
props: true
},
{
path: 'chapter-read/:id',
name: 'chapterRead',
component: () => import('@/pages/player/chapterRead/chapterRead.vue'),
props: true
},
{
path: 'chapter-work/:id',
name: 'chapterWork',
component: () => import('@/pages/player/chapterWork/chapterWork.vue'),
props: true
},
{
path: 'course-info/:id',
name: 'courseInfo',
component: () => import('@/pages/player/courseInfo/courseInfo.vue'),
props: true
},
{
path: 'course-work/:id',
name: 'courseWork',
component: () => import('@/pages/player/courseWork/courseWork.vue'),
props: true
},
{
path: 'exam/:id',
name: 'exam',
component: () => import('@/pages/player/exam/exam.vue'),
props: true
},
{
path: 'live/:id',
name: 'live',
component: () => import('@/pages/player/live/live.vue'),
props: true
}
]
},
/* 如果所有页面都没找到 - 指向 */
{ path: '*', component: () => import('@/components/errorPages/404.vue') }
]
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论