Authored by 刘传洋

m

... ... @@ -358,9 +358,16 @@ Cart = {
if ($('[data-role="gift-sel-btn"]').length) {
new RConfirm(content, function() {
var firstGift = $('[data-role="gift-sel-btn"]')[0];
var $firstGift = $('[data-role="gift-sel-btn"]');
var $sitem = $firstGift;
$('html,body').animate({scrollTop: $(firstGift).offset().top - 50 + 'px'}, 500);
if (!$sitem.is(':visible')) {
$sitem = $sitem.closest('.sale-info');
}
$('html,body').animate({scrollTop: $sitem.offset().top - 50 + 'px'}, 500, 'swing', function() {
$firstGift.click();
});
}, function() {
Cart._submit($this);
... ...