From 93770e4c3d1b7edaee1da5ae051cd82dd4829144 Mon Sep 17 00:00:00 2001 From: modendeveloper Date: Fri, 13 Sep 2024 23:39:44 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E3=80=90=E5=95=86=E5=9F=8E=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E3=80=91=E5=BA=97=E9=93=BA=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=B5=84=E6=96=99--=E6=9C=AA=E4=B8=8A=E4=BC=A0=E5=B0=81?= =?UTF-8?q?=E9=9D=A2=E5=9B=BE=E7=89=87=E4=B9=9F=E5=8F=AF=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagesInn/inn/innProfileEdit.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pagesInn/inn/innProfileEdit.vue b/pagesInn/inn/innProfileEdit.vue index 91b4ca7..0368a5d 100644 --- a/pagesInn/inn/innProfileEdit.vue +++ b/pagesInn/inn/innProfileEdit.vue @@ -331,6 +331,11 @@ export default { }) }, submit() { + const suffixs = ['.png', '.jpg', '.jpeg', '.bmp', '.gif', '.webp', '.psd', '.svg', '.tiff'] + const suffix = this.innApplyInfo.cover ? this.innApplyInfo.cover.substring(this.innApplyInfo.cover.lastIndexOf(".")) : ''; + const isImg = suffixs.indexOf(suffix.toLowerCase()) > -1 + console.log(suffix); + if(this.loading) { return } @@ -338,7 +343,7 @@ export default { this.$dialog.error('请上传店铺LOGO') return } - if (!this.innApplyInfo.cover && this.innApplyInfo.coverType === 1) { + if (!isImg && this.innApplyInfo.coverType === 1) { this.$dialog.error('请上传店铺封面图片') return }