From 5fb43d29f47d9b316414b28ea84a6fab3133b856 Mon Sep 17 00:00:00 2001 From: gaoshp <291585735@qq.com> Date: 星期一, 22 四月 2024 22:33:18 +0800 Subject: [PATCH] 完善报警统计 --- src/components/scUpload/index.vue | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/components/scUpload/index.vue b/src/components/scUpload/index.vue index 1a0a0b9..15744dc 100644 --- a/src/components/scUpload/index.vue +++ b/src/components/scUpload/index.vue @@ -95,7 +95,8 @@ height: this.height + "px" }, cropperDialogVisible: false, - cropperFile: null + cropperFile: null, + hostNew: '' } }, watch:{ @@ -108,15 +109,23 @@ } }, mounted() { - this.value = this.modelValue - this.newFile(this.modelValue) + this.getHost().then(res => { + this.value = this.modelValue + this.newFile(this.modelValue) + }) }, methods: { + getHost () { + if (this.host) return this.hostNew = this.host + return this.$API.setting.component.getImgHost.get().then(res => { + this.hostNew = res.data + '/visual/' + }) + }, newFile(url){ if(url){ this.file = { status: "success", - url: `${this.host}${url}` + url: `${this.hostNew}${url}` } }else{ this.file = null -- Gitblit v1.9.3