help-api.js
1.45 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**
* 帮助中心首页
* @author: wsl<shuiling.wang@yoho.cn>
* @date: 2016/12/13
*/
'use strict';
const api = global.yoho.API;
// 获取热词搜索
const getHotSearch = () => {
return api.get('', {
method: 'app.helper.hotSearch',
showPlatform: 'yohobuy_pc'
}, {
code: 200,
cache: true
});
};
// 获取首页帮助分类以及常见问题
const gethomeCategoryFaq = () => {
return api.get('', {
method: 'app.helper.homeCategoryFaq',
showPlatform: 'yohobuy_pc'
}, {
code: 200,
cache: true
});
};
// 获取自助服务
const getSelfService = () => {
return api.get('', {
method: 'app.helper.selfService',
showPlatform: 'yohobuy_pc'
}, {
code: 200
});
};
const helpSearch = (params) => {
return api.get('', {
method: 'app.helper.search',
showPlatform: 'yohobuy_pc',
keyword: params.keywords,
page: params.page,
viewNum: '15',
debug: 'XYZ'
}, {
code: 200
});
};
const allQA = () => {
return api.get('', {
method: 'app.helper.allQA',
showPlatform: 'yohobuy_pc'
}, {
code: 200
});
};
const onlineService = () => {
return api.get('', {
method: 'app.helper.getServiceOnline'
}, {
code: 200
});
};
module.exports = {
getHotSearch,
gethomeCategoryFaq,
getSelfService,
helpSearch,
allQA,
onlineService
};