|
@@ -3,7 +3,7 @@ |
|
@@ -3,7 +3,7 @@ |
3
|
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
|
3
|
* @author: liangzhifeng<zhifeng.liang@yoho.cn>
|
4
|
* @date: 2015/10/20
|
4
|
* @date: 2015/10/20
|
5
|
*/
|
5
|
*/
|
6
|
- var $ = require('jquery'),
|
6
|
+var $ = require('jquery'),
|
7
|
Swiper = require('yoho.iswiper'),
|
7
|
Swiper = require('yoho.iswiper'),
|
8
|
Hammer = require('yoho.hammer'),
|
8
|
Hammer = require('yoho.hammer'),
|
9
|
lazyLoad = require('yoho.lazyload');
|
9
|
lazyLoad = require('yoho.lazyload');
|
|
@@ -15,6 +15,8 @@ var goodsSwiper, |
|
@@ -15,6 +15,8 @@ var goodsSwiper, |
15
|
var goodsDiscountEl = document.getElementById('goodsDiscount'),
|
15
|
var goodsDiscountEl = document.getElementById('goodsDiscount'),
|
16
|
goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl);
|
16
|
goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl);
|
17
|
|
17
|
|
|
|
18
|
+var $cart = $('.cart-bar');
|
|
|
19
|
+
|
18
|
require('./desc');
|
20
|
require('./desc');
|
19
|
require('./comments-consults');
|
21
|
require('./comments-consults');
|
20
|
|
22
|
|
|
@@ -67,6 +69,16 @@ if (goodsDiscountHammer) { |
|
@@ -67,6 +69,16 @@ if (goodsDiscountHammer) { |
67
|
});
|
69
|
});
|
68
|
}
|
70
|
}
|
69
|
|
71
|
|
|
|
72
|
+//购物车商品数量
|
|
|
73
|
+$.ajax({
|
|
|
74
|
+ type: 'GET',
|
|
|
75
|
+ url: '/cart/index/count',
|
|
|
76
|
+ success: function(data) {
|
|
|
77
|
+ if (data.code === 200) {
|
|
|
78
|
+ $cart.find('.num-tag').html(data.data.cart_goods_count).removeClass('hide');
|
|
|
79
|
+ }
|
|
|
80
|
+ }
|
|
|
81
|
+});
|
70
|
|
82
|
|
71
|
require('./like');
|
83
|
require('./like');
|
72
|
|
84
|
|