Authored by 于良

接口请求参数增加client_type和对应的key

... ... @@ -52,7 +52,7 @@ class DetailData
$param = Yohobuy::param();
$param['article_id'] = $id;
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList['h5'];
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
$result = Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getArticle', $param);
$article = $result['data'];
... ... @@ -73,7 +73,7 @@ class DetailData
$param = Yohobuy::param();
$param['article_id'] = $id;
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList['h5'];
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
$result = Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getArticle', $param);
$article = $result['data'];
... ... @@ -100,7 +100,7 @@ class DetailData
$param = Yohobuy::param();
$param['article_id'] = $id;
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList['h5'];
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
$urlList['getArticleContent'] = Yohobuy::httpBuildQuery(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getArticleContent', $param);
... ... @@ -108,7 +108,7 @@ class DetailData
$param = Yohobuy::param();
$param['article_id'] = $id;
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList['h5'];
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
$urlList['getBrand'] = Yohobuy::httpBuildQuery(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getBrand', $param);
... ... @@ -120,7 +120,7 @@ class DetailData
$param['tags'] = $article['tag'];
$param['offset'] = 0;
$param['limit'] = 3;
$param['private_key'] = Yohobuy::$privateKeyList['h5'];
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
$urlList['getOtherArticle'] = Yohobuy::httpBuildQuery(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getOtherArticle', $param);
}
... ...
... ... @@ -145,6 +145,8 @@ class PlusstarData
$param = Yohobuy::param();
$param['uid'] = $uid;
$param['brandId'] = $cached['getBrandInfo']['data']['brand_id'];
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
$getUidBrandFav = Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_FAVORITE . 'getUidBrandFav', $param);
// file_put_contents('../../../../../../Desktop/app/n/getUidBrandFav.txt', var_export($getUidBrandFav, true));
... ... @@ -165,6 +167,8 @@ class PlusstarData
// 品牌详情信息
$param = Yohobuy::param();
$param['id'] = $id;
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
$brandInfo = Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_PLUSSTAR_NEW . 'getbrandinfo', $param, 3600);
// file_put_contents('../../../../../../Desktop/app/n/getbrandinfo.txt', var_export($brandInfo, true));
... ... @@ -187,7 +191,7 @@ class PlusstarData
$param['udid'] = $udid;
$param['limit'] = 3;
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList['h5'];
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
$article = Yohobuy::get(Yohobuy::SERVICE_URL.self::URI_BRANDINFO_ARTICLE.'getArticleByBrand', $param);
... ...