diff --git a/pages/product/addGood/addGood.vue b/pages/product/addGood/addGood.vue index a2ba749..eafd22b 100644 --- a/pages/product/addGood/addGood.vue +++ b/pages/product/addGood/addGood.vue @@ -212,6 +212,7 @@ setFormData: { store_name: '', imageList: [], + attrValue: [], cate_name: '', //平台名称 unit_name: '', //商品单位 cate_id: '', // 平台分类id @@ -317,6 +318,7 @@ initDataEditData() { this.setFormData = { imageList: [], + attrValue: [], specification: '', image: '', //主图 slider_image: '', // 轮播图 @@ -372,9 +374,7 @@ imageList: res.data.content?.image } }) - // 多规格 - if (this.setFormData.spec_type == 1) { - } + // 单规格 if (this.setFormData.spec_type == 0) { this.$refs.priceRef.setDatas(res.data.attrValue[0]); } @@ -611,7 +611,8 @@ uni.navigateTo({ url:'/pages/product/addGood/specGood?product_id=' + this.product_id, success: (e) => { - uni.$emit() + // console.log(this.setFormData.attrValue, e); + e.eventChannel.emit('updateAttrValue', this.setFormData.attrValue); } }) } diff --git a/pages/product/addGood/components/price.vue b/pages/product/addGood/components/price.vue index 6c5819b..60a06ae 100644 --- a/pages/product/addGood/components/price.vue +++ b/pages/product/addGood/components/price.vue @@ -1,6 +1,6 @@