From 15ec56597c56277570449bfea6bad1b2dbf313ab Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Tue, 24 May 2022 13:34:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shequzhili/xiangmu/cpts/project-info.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/views/modules/shequzhili/xiangmu/cpts/project-info.vue b/src/views/modules/shequzhili/xiangmu/cpts/project-info.vue index 8bcc953c..b0dd01ac 100644 --- a/src/views/modules/shequzhili/xiangmu/cpts/project-info.vue +++ b/src/views/modules/shequzhili/xiangmu/cpts/project-info.vue @@ -685,12 +685,20 @@ export default { handleImgSuccess (res, file, fileList) { console.log("res.data.url", file); if (res.code === 0 && res.msg === "success") { - console.log("res.data.url", res.data.url); + let format = file.name.split(".").pop(); + let srcType = file.raw.type; + let type = 'file'; + console.log("==============================srcType: ", srcType); + if(srcType.indexOf('image')!=-1){ + type = 'image' + } else if(srcType.indexOf('video')!=-1){ + type = 'video' + } this.fmData.internalFile.push({ - format: file.name.split(".").pop(), + format, name: file.name, size: file.size, - type: file.raw.type, + type, url: res.data.url, }); console.log(this.fmData.internalFile);