detail-comment-api.js 497 Bytes
/**
 * Created by TaoHuang on 2016/6/13.
 */

'use strict';

const library = '../../../library';
const API = require(`${library}/api`).API;
const sign = require(`${library}/sign`);
const log = require(`${library}/logger`);

const api = new API();

/**
 * 获取评论
 */
module.exports.indexAsync = function(pid, page, size) {
    return api.get('', sign.apiSign({
        method: 'app.comment.li',
        product_id: pid,
        page: page,
        limit: size
    })).catch(log.error);
};