ComplaintsData.php
2.09 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
<?php
namespace LibModels\Web\Home;
use Api\Yohobuy;
use Api\Sign;
class ComplaintsData
{
/**
* 获取投诉列表
* @param type $uid
* @param type $page
* @param type $limit
* @return type
*/
public static function getComplaintsList($uid, $page = 1, $limit = 10,$clientType = 'web')
{
$param = Yohobuy::param();
$param['method'] = 'web.complaints.getList';
$param['uid'] = $uid;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 添加投诉
* @param type $params
* @return type
*/
public static function addComplaints($params,$clientType = 'web')
{
$param = Yohobuy::param();
$param['method'] = 'web.complaints.add';
$param['uid'] = $params['uid'];
$param['title'] = $params['title'];
$param['customer'] = $params['customer'];
$param['complaintsType'] = $params['complaintsType'];
$param['orderCode'] = $params['orderCode'];
$param['content'] = $params['content'];
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 取消投诉
* @param type $uid
* @param type $id
*/
public static function cancelComplaints($uid, $id, $clientType = 'web')
{
$param = Yohobuy::param();
$param['method'] = 'web.complaints.cancel';
$param['uid'] = $uid;
$param['id'] = $id;
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
}