diff --git a/src/views/system/trainingAvatar/index.vue b/src/views/system/trainingAvatar/index.vue index 2f45da2..8cdf469 100644 --- a/src/views/system/trainingAvatar/index.vue +++ b/src/views/system/trainingAvatar/index.vue @@ -219,11 +219,15 @@ export default { }; }, handleAvatarSuccess(res, file) { - this.video.VideoPath = process.env.VUE_APP_BASE_API + res.imgUrl; - this.items.itemDirectoryUrl = res.imgUrl; - this.$emit("item", JSON.stringify(this.items)); - this.$modal.msgSuccess("上传视频成功"); - this.openimg = false; + if (res.code == 200) { + this.video.VideoPath = process.env.VUE_APP_BASE_API + res.imgUrl; + this.items.itemDirectoryUrl = res.imgUrl; + this.$emit("item", JSON.stringify(this.items)); + this.$modal.msgSuccess("上传视频成功"); + this.openimg = false; + } else { + this.$message.error(res.msg); + } this.uploadbtn = true; }, // 上传图片