cxmo 1 an în urmă
părinte
comite
a297fdb059
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      src/views/training_manage/modifyVideoPage.vue

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

@@ -295,14 +295,14 @@ export default {
                 return;
                 return;
             type!=='publish'&&this.$message.success(`${this.form.VideoId ? '编辑' : '添加'}成功`);
             type!=='publish'&&this.$message.success(`${this.form.VideoId ? '编辑' : '添加'}成功`);
             type!=='publish'&&this.changeRoute();
             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(){
         async publishVideo(){
             let res = {}
             let res = {}
             await this.modifyVideo('publish');
             await this.modifyVideo('publish');
             if(this.form.VideoId){
             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;
                 if(res.Ret!==200) return;
                 this.$message.success("发布成功");
                 this.$message.success("发布成功");
             }
             }