CommentData.php
1.34 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
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2016-3-23
* Time: 15:03
*/
namespace LibModels\Web\Home;
use Api\Yohobuy;
use Api\Sign;
class CommentData
{
//获取评论列表
public static function getCommentListData($uid)
{
$param = array();
$param = Yohobuy::param();
$param['method'] = 'web.show.queryOrderProductCommentList';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(API_URL, $param);
}
//评论商品
public static function saveShareOrder($uid, $productSkn, $productId, $content, $goodsId, $orderId, $erpSkuId)
{
//组装parameters参数数组
$parameters = array(
//'anonymous' => false,
'content' => $content,
'goodsId' => $goodsId,
'orderId' => $orderId,
'productId' => $productId,
'productSkn' => $productSkn,
'uid' => $uid,
'erpSkuId' => $erpSkuId
);
$param = array();
$param = Yohobuy::param();
$param['method'] = 'show.saveShareOrder';
$param['parameters'] = json_encode($parameters);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(API_URL, $param);
}
}