Parcourir la source

商品详情和购物车跳转到结算页面时传入商品分类编号,以便查询可用优惠券

卢越 il y a 1 an
Parent
commit
2eb1a1bf41
2 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 2 1
      pages/goods/index.vue
  2. 1 0
      pages/index/cart.vue

+ 2 - 1
pages/goods/index.vue

@@ -156,7 +156,8 @@
       data: JSON.stringify({
         items: [{
           skuId: e.id,
-          count: e.goods_num
+          count: e.goods_num,
+		  categoryId: state.goodsInfo.categoryId
         }]
       }),
     });

+ 1 - 0
pages/index/cart.vue

@@ -107,6 +107,7 @@
 				skuId: item.sku.id,
 				count: item.count,
 				cartId: item.id,
+				categoryId: item.spu.categoryId
 			})
 			goods_list.push({
 				// goods_id: item.goods_id,