HelpData.php
1.58 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
<?php
namespace LibModels\Web\Home;
use Api\Yohobuy;
use Api\Sign;
class HelpData
{
/**
* 查询帮助列表分类
* @return type
*/
public static function getHelpCategory()
{
$param = Yohobuy::param();
$param['method'] = 'web.help.category';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(API_URL, $param);
}
/**
* 查看问题详情
* @param type $cateId
* @param type $page
* @param type $limit
* @return type
*/
public static function getHelpDetail($cateId, $page = 1, $limit = 10, $problem = '')
{
$param = Yohobuy::param();
$param['method'] = 'web.help.getHelpDetailList';
$param['category_id'] = $cateId;
$param['page'] = $page;
$param['limit'] = $limit;
if ($problem) {
$param['problem'] = $problem;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(API_URL, $param);
}
/**
* 获取常见问题
* @param type $cateId
* @param type $problem 检索关键字
* @return type
*/
public static function getCommonFaqLimit($cateId, $problem = '')
{
$param = Yohobuy::param();
$param['method'] = 'web.help.getCommonFaqList';
$param['category_id'] = $cateId;
if ($problem) {
$param['problem'] = $problem;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(API_URL, $param);
}
}