|
@@ -38,10 +38,6 @@ class DetailData |
|
@@ -38,10 +38,6 @@ class DetailData |
38
|
$param['client_secret'] = Sign::getSign($param);
|
38
|
$param['client_secret'] = Sign::getSign($param);
|
39
|
|
39
|
|
40
|
return Yohobuy::post(Yohobuy::API_URL, $param);
|
40
|
return Yohobuy::post(Yohobuy::API_URL, $param);
|
41
|
-
|
|
|
42
|
-// return Yohobuy::jsonPost(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_BASE_INFO, array(
|
|
|
43
|
-// 'param' => intval($productId), 'userId' => intval($uid)
|
|
|
44
|
-// ));
|
|
|
45
|
}
|
41
|
}
|
46
|
|
42
|
|
47
|
/**
|
43
|
/**
|
|
@@ -52,7 +48,12 @@ class DetailData |
|
@@ -52,7 +48,12 @@ class DetailData |
52
|
*/
|
48
|
*/
|
53
|
public static function sizeInfo($productSkn)
|
49
|
public static function sizeInfo($productSkn)
|
54
|
{
|
50
|
{
|
55
|
- return Yohobuy::jsonPost(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_SIZE_INFO, array('param' => intval($productSkn)));
|
51
|
+ $param = Yohobuy::param();
|
|
|
52
|
+ $param['method'] = 'h5.product.intro';
|
|
|
53
|
+ $param['productskn'] = $productSkn;
|
|
|
54
|
+ $param['client_secret'] = Sign::getSign($param);
|
|
|
55
|
+
|
|
|
56
|
+ return Yohobuy::post(Yohobuy::API_URL, $param);
|
56
|
}
|
57
|
}
|
57
|
|
58
|
|
58
|
/**
|
59
|
/**
|
|
@@ -65,11 +66,14 @@ class DetailData |
|
@@ -65,11 +66,14 @@ class DetailData |
65
|
*/
|
66
|
*/
|
66
|
public static function consultList($productId, $pageNum, $pageSize)
|
67
|
public static function consultList($productId, $pageNum, $pageSize)
|
67
|
{
|
68
|
{
|
68
|
- return Yohobuy::jsonPost(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_CONSULT_LIST, array(
|
|
|
69
|
- 'productId' => intval($productId),
|
|
|
70
|
- 'pageNum' => intval($pageNum),
|
|
|
71
|
- 'pageSize' => intval($pageSize),
|
|
|
72
|
- ));
|
69
|
+ $param = Yohobuy::param();
|
|
|
70
|
+ $param['method'] = 'h5.consult.li';
|
|
|
71
|
+ $param['product_id'] = $productId;
|
|
|
72
|
+ $param['page'] = $pageNum;
|
|
|
73
|
+ $param['limit'] = $pageSize;
|
|
|
74
|
+ $param['client_secret'] = Sign::getSign($param);
|
|
|
75
|
+
|
|
|
76
|
+ return Yohobuy::post(Yohobuy::API_URL, $param);
|
73
|
}
|
77
|
}
|
74
|
|
78
|
|
75
|
/**
|
79
|
/**
|
|
@@ -82,25 +86,22 @@ class DetailData |
|
@@ -82,25 +86,22 @@ class DetailData |
82
|
*/
|
86
|
*/
|
83
|
public static function commentList($productId, $pageNum, $pageSize)
|
87
|
public static function commentList($productId, $pageNum, $pageSize)
|
84
|
{
|
88
|
{
|
85
|
- return Yohobuy::jsonPost(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_COMMENT_LIST, array(
|
|
|
86
|
- 'productId' => intval($productId),
|
|
|
87
|
- 'pageNum' => intval($pageNum),
|
|
|
88
|
- 'pageSize' => intval($pageSize),
|
|
|
89
|
- ));
|
89
|
+ // 暂未提供提口
|
90
|
}
|
90
|
}
|
91
|
|
91
|
|
92
|
/**
|
92
|
/**
|
93
|
* 为你优选的商品列表
|
93
|
* 为你优选的商品列表
|
94
|
*
|
94
|
*
|
95
|
- * @todo 需要替换成JAVA接口
|
|
|
96
|
* @param int $productSkn 商品SKN号
|
95
|
* @param int $productSkn 商品SKN号
|
97
|
* @return array
|
96
|
* @return array
|
98
|
*/
|
97
|
*/
|
99
|
- public static function preference($productSkn)
|
98
|
+ public static function preference($productSkn, $channel, $brandId)
|
100
|
{
|
99
|
{
|
101
|
$param = Yohobuy::param();
|
100
|
$param = Yohobuy::param();
|
102
|
- $param['method'] = 'app.product.topreference';
|
|
|
103
|
- $param['product_skn'] = $productSkn;
|
101
|
+ $param['method'] = 'h5.preference.Search';
|
|
|
102
|
+ $param['productskn'] = $productSkn;
|
|
|
103
|
+ $param['yhchannel'] = $channel;
|
|
|
104
|
+ $param['brandId'] = $brandId;
|
104
|
$param['client_secret'] = Sign::getSign($param);
|
105
|
$param['client_secret'] = Sign::getSign($param);
|
105
|
|
106
|
|
106
|
return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 缓存1小时
|
107
|
return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 缓存1小时
|
|
@@ -116,7 +117,7 @@ class DetailData |
|
@@ -116,7 +117,7 @@ class DetailData |
116
|
public static function addConsult($uid, $productId, $content)
|
117
|
public static function addConsult($uid, $productId, $content)
|
117
|
{
|
118
|
{
|
118
|
$param = Yohobuy::param();
|
119
|
$param = Yohobuy::param();
|
119
|
- $param['method'] = 'app.consult.add';
|
120
|
+ $param['method'] = 'h5.consult.add';
|
120
|
$param['product_id'] = $productId;
|
121
|
$param['product_id'] = $productId;
|
121
|
$param['content'] = $content;
|
122
|
$param['content'] = $content;
|
122
|
$param['uid'] = $uid;
|
123
|
$param['uid'] = $uid;
|