diff --git a/src/views/product/addProduct/index.vue b/src/views/product/addProduct/index.vue index 0d643f8..4304e45 100644 --- a/src/views/product/addProduct/index.vue +++ b/src/views/product/addProduct/index.vue @@ -790,11 +790,31 @@ - + + + +
+
+ +
+
+ +
+
@@ -1276,7 +1296,11 @@ const defaultObj = { attr: [], extension_type: 0, integral_rate: -1, - content: '', + content: { + title: '', + image: [], + }, + // content: '', spec_type: 0, give_coupon_ids: [], is_gift_bag: 0, @@ -1418,7 +1442,7 @@ export default { ], mer_cate_id: [ { - required: true, message: '请选择商户商品分类', trigger: 'change' + required: false, message: '请选择商户商品分类', trigger: 'change' } ], cate_id: [ @@ -2173,6 +2197,7 @@ export default { this.fullscreenLoading = true; productDetailApi(this.$route.params.id) .then(async res => { + if(res.data.content_arr)res.data.content = res.data.content_arr; let info = res.data; this.infoData(info); this.getSpecsLst(info.cate_id); @@ -2296,6 +2321,9 @@ export default { if (tit === "1" && num === "pi") { _this.oneFormBatch[0].image = img[0]; } + if (tit === "3"){ + _this.formValidate.content.image = img; + } }, tit); }, handleSubmitUp() { @@ -2360,9 +2388,9 @@ export default { if (!this.formValidate.cate_id) { return this.$message.warning("基本信息-平台商品分类不能为空"); } - if (!this.formValidate.mer_cate_id) { - return this.$message.warning("基本信息-商户商品分类不能为空"); - } + // if (!this.formValidate.mer_cate_id) { + // return this.$message.warning("基本信息-商户商品分类不能为空"); + // } if (!this.formValidate.image) { return this.$message.warning("基本信息-商品封面图不能为空"); } @@ -2670,6 +2698,10 @@ export default { height: 100%; } } +.details_pictrue{ + width: 120px; + height: 120px; +} .iview-video-style { width: 40%; height: 180px; diff --git a/src/views/product/productList/editAttr.vue b/src/views/product/productList/editAttr.vue index d2d5f5b..1a8a920 100644 --- a/src/views/product/productList/editAttr.vue +++ b/src/views/product/productList/editAttr.vue @@ -269,7 +269,7 @@ export default { ruleInline: { mer_cate_id: [ { - required: true, + required: false, message: '请选择商户分类', trigger: 'change', type: 'array', @@ -521,9 +521,9 @@ export default { that.loading1 = false }) } else { - if (!that.formValidate.mer_cate_id) { - that.$message.warning('请选择商户商品分类!') - } + // if (!that.formValidate.mer_cate_id) { + // that.$message.warning('请选择商户商品分类!') + // } } }) },