|
|
@@ -422,7 +422,7 @@
|
|
|
//初始化购物车商品
|
|
|
initShopData(product, cartId,num) {
|
|
|
const that = this;
|
|
|
- that.shopList = that.shopList.concat([{
|
|
|
+ that.shopList = ([{
|
|
|
name: product.store_name,//商品
|
|
|
num: num,//购物车中的数量
|
|
|
id: product.product_id,//当前商品id
|
|
|
@@ -432,7 +432,7 @@
|
|
|
image: product.image,//商品主图
|
|
|
price: product.price,//商品价格
|
|
|
is_consumer:product.is_consumer//商品类型
|
|
|
- }])
|
|
|
+ }]).concat(that.shopList);
|
|
|
console.log(this, '初始化后this对象')
|
|
|
//初始化该商品为1
|
|
|
that.changeCartShop(cartId, num)
|