From 2a9fb49b32b0f4fd255a944e5137c998922f5602 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Thu, 21 Nov 2024 17:55:32 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/accessory/child/accessory_store_edit_form.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/accessory/child/accessory_store_edit_form.js b/js/accessory/child/accessory_store_edit_form.js index dc36b8b..840031b 100644 --- a/js/accessory/child/accessory_store_edit_form.js +++ b/js/accessory/child/accessory_store_edit_form.js @@ -112,12 +112,12 @@ function getInputDetailList() { // 设置文件类型 function handleFileType(index, file, result) { let html = '', img = ''; - if (file.ext === 'doc' || file.ext === 'docx') { + if (file.ext === 'doc' || file.ext === 'docx' || file.name.indexOf('doc') > -1 || file.name.indexOf('docx') > -1) { img = '../../../images/docx.png'; - } else if (file.ext === 'xls' || file.ext === 'xlsx') { + } else if (file.ext === 'xls' || file.ext === 'xlsx' || file.name.indexOf('xls') > -1 || file.name.indexOf('xlsx') > -1) { img = '../../../images/xlsx.png'; - } else if (file.ext === 'pdf') { - img = '../../../images/PDF.png'; + } else if (file.ext === 'pdf' || file.name.indexOf('pdf') > -1) { + img = '../../../images/pdf.png'; } else { return ''; }