From 4a153ea84cfa1ea9b0df71e54b647931886c3afc Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Mon, 20 Nov 2023 18:38:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=A4=9A=E8=A7=84=E6=A0=BC?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/product/addGood/addGood.vue | 9 +- pages/product/addGood/components/price.vue | 51 ++--- pages/product/addGood/specGood.vue | 207 ++++++++++++++++++++- 3 files changed, 235 insertions(+), 32 deletions(-) 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 @@