...
|
...
|
@@ -153,14 +153,24 @@ function loadCartDetail(key) { |
|
|
};
|
|
|
|
|
|
$.getJSON('http://www.yohobuy.com/common/shoppingCart/?callback=?', param, function(jsonData) {
|
|
|
var totalGoods, data;
|
|
|
var totalGoods = [],
|
|
|
infoArr = [
|
|
|
'main_goods',
|
|
|
'advance_goods',
|
|
|
'outlet_goods',
|
|
|
'gift_goods',
|
|
|
'need_pay_gifts'
|
|
|
],
|
|
|
data;
|
|
|
|
|
|
if (jsonData.code === 200) {
|
|
|
data = jsonData.data;
|
|
|
totalGoods = $.merge(data.main_goods, data.advance_goods);
|
|
|
totalGoods = $.merge(totalGoods, data.outlet_goods);
|
|
|
totalGoods = $.merge(totalGoods, data.gift_goods);
|
|
|
totalGoods = $.merge(totalGoods, data.need_pay_gifts);
|
|
|
$.each(infoArr, function(k, v) {
|
|
|
if (data[v]) {
|
|
|
totalGoods = $.merge(totalGoods, data[v]);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
if (totalGoods && totalGoods.length) {
|
|
|
data.totalGoods = totalGoods;
|
|
|
$miniCart.html(cartFn({
|
...
|
...
|
@@ -360,7 +370,7 @@ $goCart.hover(function() { |
|
|
if ($goCart.hasClass('on-hover')) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
data = $goCart.data();
|
|
|
if (data && data.num * 1) {
|
|
|
_html = '<div class="loading-cart"><h3>加载中,请稍后</h3></div>';
|
...
|
...
|
|