cxmo 1 年之前
父节点
当前提交
a297fdb059
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/views/training_manage/modifyVideoPage.vue

+ 2 - 2
src/views/training_manage/modifyVideoPage.vue

@@ -295,14 +295,14 @@ export default {
                 return;
             type!=='publish'&&this.$message.success(`${this.form.VideoId ? '编辑' : '添加'}成功`);
             type!=='publish'&&this.changeRoute();
-            this.form.VideoId = res.Data?res.Data.VideoId:'';
+            !this.form.VideoId&&(this.form.VideoId = res.Data?res.Data.VideoId:'');
         },
         //发布视频
         async publishVideo(){
             let res = {}
             await this.modifyVideo('publish');
             if(this.form.VideoId){
-                res = VideoInterface.publishVideo({VideoId:this.form.VideoId,PublishState:1})
+                res = await VideoInterface.publishVideo({VideoId:this.form.VideoId,PublishState:1})
                 if(res.Ret!==200) return;
                 this.$message.success("发布成功");
             }