diff --git a/src/views/system/stationAvatar/index.vue b/src/views/system/stationAvatar/index.vue index 51c017c..570969e 100644 --- a/src/views/system/stationAvatar/index.vue +++ b/src/views/system/stationAvatar/index.vue @@ -189,7 +189,15 @@ export default { }, watch: { tovideo: { - handler(newimg, oldimg) {} + handler(newimg, oldimg) { + if (this.tovideo == null) { + this.video.VideoPath = null; + } else if (this.tovideo == "") { + this.video.VideoPath = null; + } else { + this.video.VideoPath = process.env.VUE_APP_BASE_API + this.tovideo; + } + } }, item: { handler(newimg, oldimg) { @@ -275,7 +283,8 @@ export default { this.uploadbtn = false; uploadVideoUrl(formData).then(response => { if (response.code == 200) { - this.video.VideoPath = process.env.VUE_APP_BASE_API + response.imgUrl; + this.video.VideoPath = + process.env.VUE_APP_BASE_API + response.imgUrl; this.$emit("imgUrl", response.imgUrl); this.items.itemDirectoryUrl = response.imgUrl; this.$emit("item", JSON.stringify(this.items)); @@ -318,7 +327,8 @@ export default { } else if (this.types == "posterVideoUrl") { updatePoserHeads(formData).then(response => { if (response.code == 200) { - this.video.VideoPath = process.env.VUE_APP_BASE_API + response.imgUrl; + this.video.VideoPath = + process.env.VUE_APP_BASE_API + response.imgUrl; this.$emit("imgUrl", response.imgUrl); this.openimg = false; } else {