...
|
...
|
@@ -409,6 +409,7 @@ |
|
|
const tip = require('common/tip');
|
|
|
const yoho = require('yoho');
|
|
|
const share = require('common/share');
|
|
|
const bus = require('common/vue-bus');
|
|
|
|
|
|
require('vue-swipe/dist/vue-swipe.css');
|
|
|
|
...
|
...
|
@@ -498,6 +499,17 @@ |
|
|
});
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
/*
|
|
|
刷新购物车
|
|
|
*/
|
|
|
refreshCart: function() {
|
|
|
$.get('/product/cart-count.json').then(result=> {
|
|
|
if (result.code === 200) {
|
|
|
this.cartCount = result.data.cart_goods_count;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
created() {
|
...
|
...
|
@@ -555,11 +567,8 @@ |
|
|
|
|
|
// 读取购物车数量
|
|
|
if (this.isApp) {
|
|
|
$.get('/product/cart-count.json').then(result=> {
|
|
|
if (result.code === 200) {
|
|
|
this.cartCount = result.data.cart_goods_count;
|
|
|
}
|
|
|
});
|
|
|
this.refreshCart();
|
|
|
bus.on('app.shoppingcart,refresh', () => this.refreshCart);
|
|
|
}
|
|
|
}
|
|
|
};
|
...
|
...
|
|