Bladeren bron

修改bug.

zhangfufeng 1 week geleden
bovenliggende
commit
cf49d2a28d
1 gewijzigde bestanden met toevoegingen van 11 en 5 verwijderingen
  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({