diff --git a/manifest.json b/manifest.json index f185b40..66db3ac 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "惠农商户平台", "appid" : "__UNI__1EE148C", "description" : "", - "versionName" : "1.1.3", - "versionCode" : 113, + "versionName" : "1.1.4", + "versionCode" : 114, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages/product/addGood/addGood_one.vue b/pages/product/addGood/addGood_one.vue index 0da4791..1f8e1d4 100644 --- a/pages/product/addGood/addGood_one.vue +++ b/pages/product/addGood/addGood_one.vue @@ -695,7 +695,8 @@ changeSpecType2() { this.showSpecType = false; this.setFormData.spec_type = this.spec_type + ''; - this.setFormData.attrValue = []; + if(this.spec_type==0) this.setFormData.attrValue = [{}]; + else this.setFormData.attrValue = []; this.setFormData.attr = []; }, // 跳转多规格页面 diff --git a/pages/product/addGood/addGood_supply.vue b/pages/product/addGood/addGood_supply.vue index 6d5a2af..096021d 100644 --- a/pages/product/addGood/addGood_supply.vue +++ b/pages/product/addGood/addGood_supply.vue @@ -305,7 +305,7 @@ this.showCommodity = true;; this.initData(); this.initClasiffy(); - if (this.import == 1) { + if (this.import == 1 ) { this.getOpenerEventChannel().once('importAttrValue', (e) => { this.attrValue = e.attrValue; uni.setStorageSync('attrValue', JSON.stringify(e.attrValue)); @@ -697,7 +697,6 @@ } Loading(); if(this.setFormData.spec_type == 0){ - postData.unit_name = '无' postData.attr = [{ value: '规格', detail: [] @@ -710,6 +709,7 @@ }) postData.spec_type = 1; //供应链商家必须使用多规格 } + if(!postData.unit_name&&postData.unit_name!==0&&postData.unit_name!=='0') postData.unit_name = '无'; if(postData.attrValue.length==0)return Toast('请填写规格') if (this.product_id) { productUpdate(this.merId, this.product_id, postData) @@ -758,9 +758,8 @@ changeSpecType2() { this.showSpecType = false; this.setFormData.spec_type = this.spec_type + ''; - this.setFormData.attrValue = [ - {} - ]; + if(this.spec_type==0) this.setFormData.attrValue = [{}]; + else this.setFormData.attrValue = []; this.setFormData.attr = []; }, // 跳转自定义规格页面 diff --git a/pages/product/addGood/specGood.vue b/pages/product/addGood/specGood.vue index 3e6d3d3..286d1ce 100644 --- a/pages/product/addGood/specGood.vue +++ b/pages/product/addGood/specGood.vue @@ -158,7 +158,7 @@ this.attrValue = JSON.parse(uni.getStorageSync('attrValue') || '[]'); this.attr = JSON.parse(uni.getStorageSync('attr') || '[]'); this.getOpenerEventChannel().once('updateAttrValue', (e) => { - e.attrValue.forEach((item, index) => { + if(e.attrValue.length>0) e.attrValue.forEach((item, index) => { item.uuid = Date.now() + '-' + Math.floor(Math.random() * 10000); }) this.attrValue = e.attrValue;