diff --git a/pages/certificate_information/add.vue b/pages/certificate_information/add.vue index 0ae6497..91024c5 100644 --- a/pages/certificate_information/add.vue +++ b/pages/certificate_information/add.vue @@ -335,7 +335,8 @@ export default { this.form.REVIEW_TIME = uni.$u.timeFormat(event.value, 'yyyy-mm-dd') }, fnAfterRead(event) { - var houzhui = event.file.url.replace(/.+\./, ""); + console.log(event.file) + var houzhui = event.file.name.substring(event.file.name.lastIndexOf('.') + 1); console.log(houzhui); if (houzhui == "jpg" || houzhui == "png") { this.form.fileList.push(event.file) @@ -346,7 +347,8 @@ export default { } }, fnAfterRead1(event) { - var houzhui = event.file.url.replace(/.+\./, ""); + console.log(event.file) + var houzhui = event.file.name.substring(event.file.name.lastIndexOf('.') + 1); console.log(houzhui); if (houzhui == "jpg" || houzhui == "png") { this.form.fileListBack.push(event.file)