Browse Source

修改bug.

zhangfufeng 2 months ago
parent
commit
cf49d2a28d
1 changed files with 11 additions and 5 deletions
  1. 11 5
      src/views/goods/create.vue

+ 11 - 5
src/views/goods/create.vue

@@ -1937,20 +1937,26 @@ export default {
         products.push(proItem);
       });
       // }
-
+      let goodsParam = JSON.parse(JSON.stringify(this.goods));
+      let recGoods = goodsParam.recGoods;
+      let list = [];
+      recGoods.forEach(item => {
+        list.push(item[2]);
+      });
+      goodsParam.gallery = this.goods.gallery.join(",");
+      goodsParam.channel = this.goods.channel.join(",");
+      goodsParam.recGoods = list.join(",");
       let finalGoods = {
-        goods: this.goods,
+        goods: goodsParam,
 
         products: products,
         attributes: this.attributes,
         selectedCitys: this.selectedSubmitCity,
         external: this.dyForm,
-        goodsSupplement: this.goodsSupplement
+        // goodsSupplement: this.goodsSupplement
         // noServiceTimeRange: this.noServiceRanges
       };
 
-      finalGoods.goods.channel = finalGoods.goods.channel.join(",");
-      finalGoods.goods.gallery = finalGoods.goods.gallery.join(",");
       dyGoods(finalGoods)
         .then(response => {
           this.$notify.success({