shop-list.page.js 930 Bytes
/**
 * 店铺、品牌列表页
 * @author: jiangfeng<jeff.jiang@yoho.cn>
 */

var Dialog = require('../plugins/dialog').Dialog;

var Shop = {
    init: function() {
        require('./list/list-search');
        require('./list/favorite');

        $('#brand-info').click(function() {
            Shop.brandInfoDialog().show();
            $('body').css({overflow: 'hidden'});
            $('.body-mask').css({width: '100%'});

            // $('.brand-info').addClass('nano');
            $('.brand-info-dialog .brand-info-content').nanoScroller();
        });
    },

    brandInfoDialog: function() {
        var infoDaialog = new Dialog({
            className: 'brand-info-dialog',
            content: $('.brand-info-wrapper').html(),
            keep: false,
            closeCb: function() {
                $('body').css({overflow: 'auto'});
            }
        });

        return infoDaialog;
    }
};

Shop.init();