|
@@ -38,7 +38,7 @@
|
|
|
<el-upload
|
|
|
ref="upload"
|
|
|
accept=".mp4"
|
|
|
- :action="action"
|
|
|
+ :action="base_url+'/upload'"
|
|
|
class="upload-demo"
|
|
|
:data="videoUploadData"
|
|
|
:file-list="form.fileList"
|
|
@@ -126,7 +126,7 @@
|
|
|
<el-upload
|
|
|
ref="upload"
|
|
|
accept=".vtt"
|
|
|
- :action="action"
|
|
|
+ :action="base_url+'/upload'"
|
|
|
class="upload-demo"
|
|
|
:data="zhUploadData"
|
|
|
:limit="limit"
|
|
@@ -155,7 +155,7 @@
|
|
|
<el-upload
|
|
|
ref="upload"
|
|
|
accept=".vtt"
|
|
|
- :action="action"
|
|
|
+ :action="base_url+'/upload'"
|
|
|
class="upload-demo"
|
|
|
:data="enUploadData"
|
|
|
:limit="limit"
|
|
@@ -200,7 +200,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { videoAdd, videoEdit, videoDetail } from './api/video'
|
|
|
+ import { videoAdd, videoEdit } from './api/video'
|
|
|
import { chapterList } from './api/chapter'
|
|
|
export default {
|
|
|
name: 'DepartmentManagementEdit',
|
|
@@ -270,12 +270,11 @@
|
|
|
this.videoId = route.query.videoId
|
|
|
if (route.query.videoId) {
|
|
|
this.title = '编辑视频'
|
|
|
- this.getVideoDetail()
|
|
|
} else {
|
|
|
this.title = '添加视频'
|
|
|
}
|
|
|
console.log(route.query, 'ids')
|
|
|
- this.action = baseURL + '/common/upload'
|
|
|
+ // this.action = baseURL + '/common/upload'
|
|
|
this.chapterData = []
|
|
|
this.getChapterList()
|
|
|
},
|
|
@@ -285,30 +284,7 @@
|
|
|
getTnyMac(res) {
|
|
|
this.form.intro = res
|
|
|
},
|
|
|
- //获取视频详情
|
|
|
- async getVideoDetail() {
|
|
|
- let params = {
|
|
|
- courseId: this.courseId,
|
|
|
- videoId: this.videoId,
|
|
|
- }
|
|
|
- const { data } = await videoDetail(params)
|
|
|
- console.log(data, '视频详情')
|
|
|
- this.form = data
|
|
|
- this.form.fileList = data.url_resource
|
|
|
- let time = data.duration
|
|
|
- this.hours =
|
|
|
- parseInt(time / 3600) < 10
|
|
|
- ? '0' + parseInt(time / 3600)
|
|
|
- : parseInt(time / 3600)
|
|
|
- this.minute =
|
|
|
- parseInt((time % 3600) / 60) < 10
|
|
|
- ? '0' + parseInt((time % 3600) / 60)
|
|
|
- : parseInt((time % 3600) / 60)
|
|
|
- this.second =
|
|
|
- parseInt((time % 3600) % 60) < 10
|
|
|
- ? '0' + parseInt((time % 3600) % 60)
|
|
|
- : parseInt((time % 3600) % 60)
|
|
|
- },
|
|
|
+
|
|
|
//返回上一页
|
|
|
goBack() {
|
|
|
this.$router.push({
|