detail-comment-api.js
851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* Created by TaoHuang on 2016/6/13.
*/
'use strict';
const api = global.yoho.API;
/**
* 获取评论
*/
const indexAsync = (pid, page, size) => {
return api.get('', {
method: 'app.comment.li',
product_id: pid,
page: page,
limit: size
});
};
/**
* 商品详情页的评论列表
*
* @param pid 商品productId
* @param page 分页
* @param size 每页大小
*
* @returns {Promise}
* @see http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/sns/show/show_productShareOrderList.md
*/
const getShareOrderListAsync = (pid, page, size) => {
// filterId = filterId || 0;
return api.get('', {
method: 'show.productShareOrderList',
productId: pid,
page: page,
limit: size
});
};
module.exports = {
indexAsync,
getShareOrderListAsync
};