gift-advance.js 614 Bytes
/**
 * 赠品/加价购
 * @author: xuqi<qi.xu@yoho.cn>
 * @date: 2015/10/23
 */

var $ = require('jquery'),
    lazyLoad = require('yoho.lazyload');

var chosePanel = require('./chose-panel');

lazyLoad($('.lazy'));

$('.gift-advance-page').delegate('.chose', 'tap', function() {
    var id = $(this).closest('.gift-advance-good').data('id');

    $.ajax({
        type: 'GET',
        url: '/shoppingCart/goodinfo',
        data: {
            id: id
        },
        success: function(data) {
            if (data.code === 200) {
                chosePanel.show(data.data);
            }
        }
    });
});