Fix: 【商城小程序】店铺修改资料--未上传封面图片也可修改成功
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user