Commit 30087f9f authored by lixin's avatar lixin

上传系列课程时,填写的标题未生效问题

parent 2a2e5095
...@@ -742,16 +742,25 @@ export default { ...@@ -742,16 +742,25 @@ export default {
title: `确认要删除${video.name ? video.name : ""}吗?`, title: `确认要删除${video.name ? video.name : ""}吗?`,
content: "删除操作同时会删除已经上传的视频文件", content: "删除操作同时会删除已经上传的视频文件",
onOk() { onOk() {
deleteChaper(video.id).then((resp) => { if(video.id!=undefined){
if (resp.resp_code === 200) { deleteChaper(video.id).then((resp) => {
self.videoSeries.forEach((item, index) => { if (resp.resp_code === 200) {
self.videoSeries.forEach((item, index) => {
console.log(item, video);
if (item.id === video.id) {
self.videoSeries.splice(index, 1);
}
});
}
});
} else if(video.videoId!=undefined){
self.videoSeries.forEach((item, index) => {
console.log(item, video); console.log(item, video);
if (item.id === video.id) { if (item.videoId === video.videoId) {
self.videoSeries.splice(index, 1); self.videoSeries.splice(index, 1);
} }
}); });
} }
});
}, },
onCancel() {}, onCancel() {},
}); });
...@@ -1107,7 +1116,9 @@ export default { ...@@ -1107,7 +1116,9 @@ export default {
beforeVideoUpload(file) { beforeVideoUpload(file) {
const { type } = file; const { type } = file;
const title = file.name.substring(0, file.name.indexOf(".")); const title = file.name.substring(0, file.name.indexOf("."));
this.video.title = title; if( this.video.title==undefined || this.video.title==''){
this.video.title = title;
}
if (type.startsWith("video")) { if (type.startsWith("video")) {
return true; return true;
} else { } else {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* https://cli.vuejs.org/zh/config/#%E7%9B%AE%E6%A0%87%E6%B5%8F%E8%A7%88%E5%99%A8 * https://cli.vuejs.org/zh/config/#%E7%9B%AE%E6%A0%87%E6%B5%8F%E8%A7%88%E5%99%A8
* *
*/ */
const url = 'http://192.168.10.14:9090' const url = 'http://edu.qkdata.com:10081'
// 基础路径,发布前修改这里,当前配置打包出来的资源都是相对路径 // 基础路径,发布前修改这里,当前配置打包出来的资源都是相对路径
let publicPath = '/admin' let publicPath = '/admin'
......
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