Selaa lähdekoodia

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner-admin into dev

lifanagju_citu 8 kuukautta sitten
vanhempi
commit
407d594aaa
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      src/views/mall/product/spu/form/index.vue

+ 5 - 0
src/views/mall/product/spu/form/index.vue

@@ -175,6 +175,11 @@ const submitForm = async () => {
       typeof item === 'object' ? newSliderPicUrls.push(item.url) : newSliderPicUrls.push(item)
     })
     deepCopyFormData.sliderPicUrls = newSliderPicUrls
+
+    // 判断sku图片是否有上传
+    const hasPicUrl = deepCopyFormData.skus?.every(e => e.picUrl)
+    if (!hasPicUrl) return message.warning('请将规格列表中的图片上传完整')
+    
     // 校验都通过后提交表单
     const data = deepCopyFormData as ProductSpuApi.Spu
     const id = params.id as unknown as number