dynamic-data.js 809 Bytes
/**
 * 动态获取页面数据
 * @author liuchuanyang
 * @date 2016/10/09
 */
var $ = require('yoho-jquery');

function getDynamicById(id) {
    'use strict';

    var param = {
        return_type: 'jsonp',
        id: id
    };

    return $.getJSON('//guang.yohobuy.com/guang/suggest?callback=?', param);
}

function getDynamicByIds(ids) {
    'use strict';

    var param = {
        return_type: 'jsonp',
        ids: ids
    };

    return $.getJSON('//guang.yohobuy.com/guang/suggest?callback=?', param);
}

function getDynamicCommentList(id, page) {
    'use strict';

    var param = {
        id: id,
        page: page
    };

    return $.getJSON('//guang.yohobuy.com/guang/suggest?callback=?', param);
}

module.exports = {
    getDynamicById,
    getDynamicByIds,
    getDynamicCommentList
};