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 ''; }