...
|
...
|
@@ -31,9 +31,13 @@ class DetailData |
|
|
*/
|
|
|
public static function baseInfo($productId, $uid)
|
|
|
{
|
|
|
return Yohobuy::jsonPost(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_BASE_INFO, array(
|
|
|
'param' => intval($productId), 'userId' => intval($uid)
|
|
|
));
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'h5.product.data';
|
|
|
$param['product_id'] = $productId;
|
|
|
$param['uid'] = $uid;
|
|
|
$param['client_secret'] = Sign::getSign($param);
|
|
|
|
|
|
return Yohobuy::post(Yohobuy::API_URL, $param);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -44,7 +48,12 @@ class DetailData |
|
|
*/
|
|
|
public static function sizeInfo($productSkn)
|
|
|
{
|
|
|
return Yohobuy::jsonPost(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_SIZE_INFO, array('param' => intval($productSkn)));
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'h5.product.intro';
|
|
|
$param['productskn'] = $productSkn;
|
|
|
$param['client_secret'] = Sign::getSign($param);
|
|
|
|
|
|
return Yohobuy::post(Yohobuy::API_URL, $param);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -57,11 +66,14 @@ class DetailData |
|
|
*/
|
|
|
public static function consultList($productId, $pageNum, $pageSize)
|
|
|
{
|
|
|
return Yohobuy::jsonPost(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_CONSULT_LIST, array(
|
|
|
'productId' => intval($productId),
|
|
|
'pageNum' => intval($pageNum),
|
|
|
'pageSize' => intval($pageSize),
|
|
|
));
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'h5.consult.li';
|
|
|
$param['product_id'] = $productId;
|
|
|
$param['page'] = $pageNum;
|
|
|
$param['limit'] = $pageSize;
|
|
|
$param['client_secret'] = Sign::getSign($param);
|
|
|
|
|
|
return Yohobuy::post(Yohobuy::API_URL, $param);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -74,25 +86,22 @@ class DetailData |
|
|
*/
|
|
|
public static function commentList($productId, $pageNum, $pageSize)
|
|
|
{
|
|
|
return Yohobuy::jsonPost(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_COMMENT_LIST, array(
|
|
|
'productId' => intval($productId),
|
|
|
'pageNum' => intval($pageNum),
|
|
|
'pageSize' => intval($pageSize),
|
|
|
));
|
|
|
// 暂未提供提口
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 为你优选的商品列表
|
|
|
*
|
|
|
* @todo 需要替换成JAVA接口
|
|
|
* @param int $productSkn 商品SKN号
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function preference($productSkn)
|
|
|
public static function preference($productSkn, $channel, $brandId)
|
|
|
{
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'app.product.topreference';
|
|
|
$param['product_skn'] = $productSkn;
|
|
|
$param['method'] = 'h5.preference.Search';
|
|
|
$param['productskn'] = $productSkn;
|
|
|
$param['yhchannel'] = $channel;
|
|
|
$param['brandId'] = $brandId;
|
|
|
$param['client_secret'] = Sign::getSign($param);
|
|
|
|
|
|
return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 缓存1小时
|
...
|
...
|
@@ -108,7 +117,7 @@ class DetailData |
|
|
public static function addConsult($uid, $productId, $content)
|
|
|
{
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'app.consult.add';
|
|
|
$param['method'] = 'h5.consult.add';
|
|
|
$param['product_id'] = $productId;
|
|
|
$param['content'] = $content;
|
|
|
$param['uid'] = $uid;
|
...
|
...
|
|