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