detail-consult-api.js
665 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
/**
* Created by TaoHuang on 2016/6/13.
*/
'use strict';
const api = global.yoho.API;
/**
* 咨询内容列表
*/
const indexAsync = function(uid, pid, page, size) {
let param = {};
param.method = 'app.consult.li';
param.product_id = pid;
if (!uid) {
param.uid = uid;
}
param.page = page;
param.limit = size;
return api.get('', param);
};
/**
* 添加咨询操作
*/
const createAsync = function(uid, pid, content) {
return api.post('', {
method: 'h5.consult.add',
product_id: pid,
content: content,
uid: uid
});
};
module.exports = {
indexAsync,
createAsync
};