diff --git a/pages/shop/photoAlbum/addPhoto.vue b/pages/shop/photoAlbum/addPhoto.vue index 5e0c9f8..07c5c77 100644 --- a/pages/shop/photoAlbum/addPhoto.vue +++ b/pages/shop/photoAlbum/addPhoto.vue @@ -232,11 +232,32 @@ async submitPhoto() { // 1. 防连点核心逻辑:如果正在提交中,直接return阻止后续执行 if (this.isSubmitting) return; - + console.log(this.formData,'this.formData'); // 2. 表单必填项校验:校验图片和名称是否填写 if (!this.formData.url) { + if(this.formData.type==1){ + if(this.formData.class_type==1){ + uni.showToast({ + title: '请先上传店铺主图', + icon: 'none', + duration: 2000 + }); + }else if(this.formData.class_type==2){ + uni.showToast({ + title: '请先上传环境图片', + icon: 'none', + duration: 2000 + }); + }else if(this.formData.class_type==3){ + uni.showToast({ + title: '请先上传作品图片', + icon: 'none', + duration: 2000 + }); + } + } uni.showToast({ - title: '请先上传店铺主图', + title: '请先上传图片/视频', icon: 'none', duration: 2000 }); diff --git a/pages/shop/photoAlbum/photoManage.vue b/pages/shop/photoAlbum/photoManage.vue index cb871a2..b8ca90d 100644 --- a/pages/shop/photoAlbum/photoManage.vue +++ b/pages/shop/photoAlbum/photoManage.vue @@ -1,6 +1,6 @@