From d3c160308d79b7310c3e311d38b3c476b55304c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Tue, 9 May 2023 11:00:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/trainingAvatar/index.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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; }, // 上传图片