Authored by 毕凯

Merge branch 'master' into release/4.8

Showing 89 changed files with 743 additions and 542 deletions

Too many changes to show.

To preserve performance only 89 of 89+ files are displayed.

... ... @@ -27,9 +27,9 @@
<link rel="dns-prefetch" href="//img12.static.yhbimg.com">
<link rel="dns-prefetch" href="//img13.static.yhbimg.com">
<link rel="stylesheet" href="//cdn.yoho.cn/myohobuy/1.3.16/index.css">
<link rel="apple-touch-icon-precomposed" href="http://static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png">
<link rel="apple-touch-startup-image" sizes="640x920" href="http://static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" sizes="320x460" href="http://static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)">
<link rel="apple-touch-icon-precomposed" href="//static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png">
<link rel="apple-touch-startup-image" sizes="640x920" href="//static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" sizes="320x460" href="//static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)">
</head>
<body >
<header id="yoho-header" class="yoho-header boys">
... ... @@ -95,8 +95,8 @@
</a>
</div>
<script src="http://cdn.yoho.cn/myohobuy/1.3.16/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/1.3.16/index.js"></script>
<script src="//cdn.yoho.cn/myohobuy/1.3.16/lib.js"></script>
<script src="//cdn.yoho.cn/myohobuy/1.3.16/index.js"></script>
<script type="text/javascript">
(function(w,d,s,j,f){
... ... @@ -107,7 +107,7 @@
a.async=1;
a.src=j;
m.parentNode.insertBefore(a,m);
})(window,document,'script','http://cdn.yoho.cn/yas-jssdk/1.0.14/yas.js','_yas');
})(window,document,'script','//cdn.yoho.cn/yas-jssdk/1.0.14/yas.js','_yas');
</script>
<script>
seajs.use('js/common');
... ... @@ -123,5 +123,5 @@
})(window,document,'script','dataLayer','GTM-W958MG');
</script>
<script src="http://static.yohobuy.com/js/analytics/analysis.js"></script>
<script src="//static.yohobuy.com/js/analytics/analysis.js"></script>
</html>
\ No newline at end of file
... ...
... ... @@ -27,9 +27,9 @@
<link rel="dns-prefetch" href="//img12.static.yhbimg.com">
<link rel="dns-prefetch" href="//img13.static.yhbimg.com">
<link rel="stylesheet" href="//cdn.yoho.cn/myohobuy/1.3.16/index.css">
<link rel="apple-touch-icon-precomposed" href="http://static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png">
<link rel="apple-touch-startup-image" sizes="640x920" href="http://static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" sizes="320x460" href="http://static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)">
<link rel="apple-touch-icon-precomposed" href="//static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png">
<link rel="apple-touch-startup-image" sizes="640x920" href="//static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" sizes="320x460" href="//static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)">
</head>
<body class=passport-body>
<div class="login-page passport-page yoho-page">
... ...
存放PC模板的预编译文件
\ No newline at end of file
... ... @@ -56,7 +56,7 @@ class HuodongWebAction extends Controller_Abstract
{
if (!$this->isAjax() && Mobile::isMobile()) {
header("HTTP/1.1 301 Moved Permanently");
header('Location:http://huodong.m.yohobuy.com'.$_SERVER['REQUEST_URI']);
header('Location://huodong.m.yohobuy.com'.$_SERVER['REQUEST_URI']);
exit();
}
... ...
... ... @@ -77,7 +77,7 @@ class WebAction extends Controller_Abstract
case 'develop': // 开发
default:
$this->_view->assign('devEnv', true);
$this->_useSession = true;
$this->_useSession = false;
break;
}
... ... @@ -601,7 +601,7 @@ class WebAction extends Controller_Abstract
$apiDomain = $this->getApiDomain();
$this->_view->assign('simpleHeader', array(
'logo' => array(
'img' => 'http://static.yohobuy.com/newheader/img/logo_e.png',
'img' => '//static.yohobuy.com/newheader/img/logo_e.png',
'url' => SITE_MAIN
),
'tool' => array(
... ...
... ... @@ -11,7 +11,7 @@
namespace Api;
use WebPlugin\Cache;
use Plugin\Cache;
class Yohobuy
{
/* 正式环境 */
... ... @@ -44,13 +44,21 @@ class Yohobuy
// const SERVICE_URL = 'http://preservice.yoho.cn/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://api2.open.yohobuy.com/';
<<<<<<< HEAD
=======
>>>>>>> master
/**
* 登录老接口Api配置
*/
const API_LOGIN_URL = 'http://api.open.yohobuy.com';
const API_LOGIN_URL_TEST = 'http://test.open.yohobuy.com';
<<<<<<< HEAD
=======
>>>>>>> master
/**
* 私钥列表
*
... ... @@ -63,7 +71,11 @@ class Yohobuy
'web' => '0ed29744ed318fd28d2c07985d3ba633',
'h5' => 'fd4ad5fcfa0de589ef238c0e7331b585',
);
<<<<<<< HEAD
=======
>>>>>>> master
/**
... ... @@ -77,7 +89,11 @@ class Yohobuy
else {
return 'web';
}
<<<<<<< HEAD
=======
>>>>>>> master
// // 苹果设备
// if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {
// return 'iphone';
... ... @@ -187,7 +203,11 @@ class Yohobuy
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
<<<<<<< HEAD
if ($useGzip) {
=======
if ($useGzip) {
>>>>>>> master
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
}
if (!empty($userAgent)) {
... ... @@ -230,7 +250,11 @@ class Yohobuy
public static function post($url, $data = array(), $returnJson = false, $timeout = 10, $header = array(), $cookie = array())
{
$ch = curl_init($url);
<<<<<<< HEAD
=======
>>>>>>> master
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
if (!empty($header)) {
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
... ... @@ -352,7 +376,11 @@ class Yohobuy
continue;
}
$result[$name] = $response['data'];
<<<<<<< HEAD
}
=======
}
>>>>>>> master
else {
$result[$name] = $response;
}
... ... @@ -496,7 +524,11 @@ class Yohobuy
return $result;
}
<<<<<<< HEAD
=======
>>>>>>> master
/**
* 获取用户User-Agent
* @return bool
... ... @@ -508,7 +540,11 @@ class Yohobuy
}
return $_SERVER['HTTP_USER_AGENT'];
}
<<<<<<< HEAD
=======
>>>>>>> master
/**
* 判断是否手机
* @return bool
... ...
... ... @@ -312,14 +312,14 @@ class ChannelConfig
'sale_index' => array('domain' => 'sale', 'module' => 's'), //sale.yohobuy.com
);
//左侧广告默认图片-passport相关页面
public static $leftDefaultImg = 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190';
public static $leftDefaultImg = '//img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190';
//多品店品牌ID
public static $moreBrandIds = array(1025, 504, 1351, 1362, 613, 456, 842,
656, 1310, 1063, 861, 1417, 1200, 1207, 1209, 1306, 972, 308, 856);
//默认头像
public static $headDefaultImgIco = 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100';
public static $headDefaultImgIco = '//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100';
//商品详情页的默认头像
public static $itemHeadDefaultImgIco = 'http://static.yohobuy.com/images/v3/boy.jpg';
public static $itemHeadDefaultImgIco = '//static.yohobuy.com/images/v3/boy.jpg';
//性别
public static $genderArr = array(
array(
... ...
... ... @@ -38,14 +38,14 @@ class BrandData
$param = Yohobuy::param();
$param['content_code'] = $contentCode;
$param['client_secret'] = Sign::getSign($param);
$urlList['brandTop'] = Yohobuy::httpBuildQuery(Yohobuy::SERVICE_URL . self::URI_BRAND_TOPPOS, $param);
$urlList['brandTop'] = Yohobuy::httpBuildQuery(SERVICE_URL . self::URI_BRAND_TOPPOS, $param);
/* 按字母"A-Z"分组的品牌列表数据 */
$param = Yohobuy::param();
$param['method'] = 'app.brand.brandlist';
$param['yh_channel'] = $channel;
$param['client_secret'] = Sign::getSign($param);
$urlList['brandList'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
$urlList['brandList'] = Yohobuy::httpBuildQuery(API_URL, $param);
return Yohobuy::getMulti($urlList, array(), 3600); // 有缓存1小时
}
... ... @@ -66,7 +66,7 @@ class BrandData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 有缓存1小时
return Yohobuy::get(API_URL, $param, 3600); // 有缓存1小时
}
/**
... ... @@ -82,7 +82,7 @@ class BrandData
$param['content_code'] = $contentCode;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_BRAND_TOPPOS, $param);
return Yohobuy::get(SERVICE_URL . self::URI_BRAND_TOPPOS, $param);
}
/**
... ... @@ -106,7 +106,7 @@ class BrandData
$cache = empty($uid) ? 3600 : false;
return Yohobuy::get(Yohobuy::API_URL, $param, $cache); // 有缓存1小时
return Yohobuy::get(API_URL, $param, $cache); // 有缓存1小时
}
/**
... ... @@ -123,7 +123,7 @@ class BrandData
$param['method'] = 'app.brand.banner';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 有缓存1小时
return Yohobuy::get(API_URL, $param, 3600); // 有缓存1小时
}
/**
... ... @@ -168,7 +168,7 @@ class BrandData
$param['yh_channel'] = $channel;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -203,7 +203,7 @@ class BrandData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -214,7 +214,7 @@ class BrandData
*/
public static function getBrandLogo($id)
{
return Yohobuy::yarClient(Yohobuy::SERVICE_URL . '/shops/service/v1/brand', 'getBrandByids', array($id));
return Yohobuy::yarClient(SERVICE_URL . '/shops/service/v1/brand', 'getBrandByids', array($id));
}
/**
... ... @@ -225,7 +225,7 @@ class BrandData
*/
public static function getBrandLogoByDomain($domain)
{
return Yohobuy::yarClient(Yohobuy::SERVICE_URL . '/shops/service/v1/brand', 'getBrandByDomain', array($domain));
return Yohobuy::yarClient(SERVICE_URL . '/shops/service/v1/brand', 'getBrandByDomain', array($domain));
}
}
... ...
... ... @@ -30,7 +30,7 @@ class ClassData
$param['method'] = 'app.sort.get';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -73,7 +73,7 @@ class ClassData
$param['gender'] = $gender;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -108,7 +108,7 @@ class ClassData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -37,7 +37,7 @@ class FocusData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'guang/api/v1/attention/getlist', $param);
return Yohobuy::get(SERVICE_URL . 'guang/api/v1/attention/getlist', $param);
}
}
... ...
... ... @@ -39,7 +39,7 @@ class ActivityData
$param['activity_id'] = $activityId;
$param['coupon_id'] = $couponId;
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_GET_NAMED_COUPON, $param);
return Yohobuy::get(SERVICE_URL . self::URI_GET_NAMED_COUPON, $param);
}
/**
... ... @@ -55,7 +55,7 @@ class ActivityData
$param['uid'] = $uid;
$param['activity_id'] = $activityId;
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_GET_ALL_COUPON, $param);
return Yohobuy::get(SERVICE_URL . self::URI_GET_ALL_COUPON, $param);
}
/**
... ... @@ -68,7 +68,7 @@ class ActivityData
{
$param = array('activity_id' => $activityId);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_GET_ACTIVITY_INFO, $param, 3600); // 有缓存1小时
return Yohobuy::get(SERVICE_URL . self::URI_GET_ACTIVITY_INFO, $param, 3600); // 有缓存1小时
}
/**
... ... @@ -122,7 +122,7 @@ class ActivityData
public static function message($uid, $title, $content, $type = 1, $verify_key = '', $send_uid = 0, $call_back = '')
{
//调用接口发送站内信
return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_SEND_MESSAGE, 'setSingleMessage', array(
return Yohobuy::yarClient(SERVICE_URL . self::URI_SEND_MESSAGE, 'setSingleMessage', array(
$uid, $title, $content, $type, $verify_key, $send_uid, $call_back
));
}
... ...
... ... @@ -46,7 +46,7 @@ class DetailData
// 先尝试获取一级缓存(master), 有数据则直接返回.
$cached = Cache::get($key, 'master');
if (!empty($cached)) {
// $article = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticle', array($id, $clientType), false, 1000);
// $article = Yohobuy::yarClient(SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticle', array($id, $clientType), false, 1000);
// 获取资讯
$param = Yohobuy::param();
... ... @@ -54,7 +54,7 @@ class DetailData
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
$result = Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getArticle', $param);
$result = Yohobuy::get(SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getArticle', $param);
$article = $result['data'];
if (isset($article['pageViews'])) {
... ... @@ -65,7 +65,7 @@ class DetailData
}
// 获取资讯
// $article = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticle', array($id, $clientType), false, 1500);
// $article = Yohobuy::yarClient(SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticle', array($id, $clientType), false, 1500);
// ksort($article);
// file_put_contents('../../../../../../Desktop/app/o/getArticle.txt', var_export($article, true));
... ... @@ -75,7 +75,7 @@ class DetailData
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
$result = Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getArticle', $param);
$result = Yohobuy::get(SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getArticle', $param);
$article = $result['data'];
// file_put_contents('../../../../../../Desktop/app/n/getArticle3.txt', var_export($article, true));
... ... @@ -94,7 +94,7 @@ class DetailData
$param = Yohobuy::param();
$param['author_id'] = $article['author_id'];
$param['client_secret'] = Sign::getSign($param);
$urlList['getAuthor'] = Yohobuy::httpBuildQuery(Yohobuy::SERVICE_URL . self::URI_PACKAGE_AUTHOR . 'getAuthor', $param);
$urlList['getAuthor'] = Yohobuy::httpBuildQuery(SERVICE_URL . self::URI_PACKAGE_AUTHOR . 'getAuthor', $param);
// 获取资讯内容
$param = Yohobuy::param();
... ... @@ -102,7 +102,7 @@ class DetailData
$param['client_type'] = $clientType;
$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);
$urlList['getArticleContent'] = Yohobuy::httpBuildQuery(SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getArticleContent', $param);
// 获取资讯相关的品牌
$param = Yohobuy::param();
... ... @@ -110,7 +110,7 @@ class DetailData
$param['client_type'] = $clientType;
$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);
$urlList['getBrand'] = Yohobuy::httpBuildQuery(SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getBrand', $param);
// 获取资讯相关的其它资讯
if (isset($article['tag'])) {
... ... @@ -122,7 +122,7 @@ class DetailData
$param['limit'] = 3;
$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);
$urlList['getOtherArticle'] = Yohobuy::httpBuildQuery(SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getOtherArticle', $param);
}
$multiResult = Yohobuy::getMulti($urlList, array());
... ... @@ -138,21 +138,21 @@ class DetailData
/*
// 获取作者信息
Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_PACKAGE_AUTHOR, 'getAuthor', array($article['author_id'], $clientType), function ($retval) use (&$result) {
Yohobuy::yarConcurrentCall(SERVICE_URL . self::URI_PACKAGE_AUTHOR, 'getAuthor', array($article['author_id'], $clientType), function ($retval) use (&$result) {
$result['getAuthor'] = empty($retval) ? array() : $retval;
ksort($retval);
file_put_contents('../../../../../../Desktop/app/o/getAuthor.txt', var_export($retval, true));
});
// 获取资讯内容
Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticleContent', array($id, $clientType), function ($retval) use (&$result) {
Yohobuy::yarConcurrentCall(SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticleContent', array($id, $clientType), function ($retval) use (&$result) {
$result['getArticleContent'] = empty($retval) ? array() : $retval;
ksort($retval);
file_put_contents('../../../../../../Desktop/app/o/getArticleContent.txt', var_export($retval, true));
});
// 获取资讯相关的品牌
Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getBrand', array($id, $clientType), function ($retval) use (&$result) {
Yohobuy::yarConcurrentCall(SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getBrand', array($id, $clientType), function ($retval) use (&$result) {
$result['getBrand'] = empty($retval) ? array() : $retval;
ksort($retval);
file_put_contents('../../../../../../Desktop/app/o/getBrand.txt', var_export($retval, true));
... ... @@ -160,7 +160,7 @@ class DetailData
// 获取资讯相关的其它资讯
if (isset($article['tag'])) {
Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getOtherArticle', array($article['tag'], $id, 0, 3, $clientType), function ($retval) use (&$result) {
Yohobuy::yarConcurrentCall(SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getOtherArticle', array($article['tag'], $id, 0, 3, $clientType), function ($retval) use (&$result) {
$result['getOtherArticle'] = empty($retval) ? array() : $retval;
ksort($retval);
file_put_contents('../../../../../../Desktop/app/o/getOtherArticle.txt', var_export($retval, true));
... ... @@ -206,19 +206,19 @@ class DetailData
$clientType = $isApp ? 'iphone' : 'h5';
// 获取资讯
$article = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticle', array($id, $clientType));
$article = Yohobuy::yarClient(SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticle', array($id, $clientType));
if (!isset($article['author_id'])) {
return $result;
}
$result['getArticle'] = $article;
// 获取资讯内容
Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticleContent', array($id, $clientType), function ($retval) use (&$result) {
Yohobuy::yarConcurrentCall(SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticleContent', array($id, $clientType), function ($retval) use (&$result) {
$result['getArticleContent'] = empty($retval) ? array() : $retval;
});
// 获取资讯相关的品牌
Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getBrand', array($id, $clientType), function ($retval) use (&$result) {
Yohobuy::yarConcurrentCall(SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getBrand', array($id, $clientType), function ($retval) use (&$result) {
$result['getBrand'] = empty($retval) ? array() : $retval;
});
... ... @@ -243,12 +243,12 @@ class DetailData
$clientType = $isApp ? 'iphone' : 'h5';
// 获取资讯内容
Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticleContent', array($id, $clientType), function ($retval) use (&$result) {
Yohobuy::yarConcurrentCall(SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticleContent', array($id, $clientType), function ($retval) use (&$result) {
$result['getArticleContent'] = empty($retval) ? array() : $retval;
});
// 获取资讯相关的品牌
Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getBrand', array($id, $clientType), function ($retval) use (&$result) {
Yohobuy::yarConcurrentCall(SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getBrand', array($id, $clientType), function ($retval) use (&$result) {
$result['getBrand'] = empty($retval) ? array() : $retval;
});
... ... @@ -268,10 +268,10 @@ class DetailData
$param['client_type'] = 'h5';
$param['private_key'] = Yohobuy::$privateKeyList['h5'];
$param['client_secret'] = Sign::getSign($param);
$result = Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getArticleContent', $param);
$result = Yohobuy::get(SERVICE_URL . self::URI_PACKAGE_ARTICLE . 'getArticleContent', $param);
return $result['data'];
// return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticleContent', array($id, 'h5'));
// return Yohobuy::yarClient(SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticleContent', array($id, 'h5'));
}
}
... ...
... ... @@ -33,7 +33,7 @@ class ListData
$param = Yohobuy::param();
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_CATEGORY, $param, 3600); // 有缓存1小时
return Yohobuy::get(SERVICE_URL . self::URI_CATEGORY, $param, 3600); // 有缓存1小时
}
/**
... ... @@ -73,7 +73,7 @@ class ListData
$cache = $useCache ? 300 : false;
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_ARTICLELIST, $param, $cache); // 缓存5分钟
return Yohobuy::get(SERVICE_URL . self::URI_ARTICLELIST, $param, $cache); // 缓存5分钟
}
/**
... ... @@ -100,7 +100,7 @@ class ListData
$param['udid'] = $udid;
$param['client_secret'] = Sign::getSign($param);
$urlList[$value['id']] = Yohobuy::httpBuildQuery(Yohobuy::SERVICE_URL . self::URI_ARTICLELIST, $param);
$urlList[$value['id']] = Yohobuy::httpBuildQuery(SERVICE_URL . self::URI_ARTICLELIST, $param);
}
return Yohobuy::getMulti($urlList);
... ... @@ -117,12 +117,12 @@ class ListData
$result = array();
if (is_numeric($id)) {
// $result = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_AUTHOR, 'getAuthor', array($id), 3600); // 缓存1小时
// $result = Yohobuy::yarClient(SERVICE_URL . self::URI_AUTHOR, 'getAuthor', array($id), 3600); // 缓存1小时
$param = Yohobuy::param();
$param['author_id'] = $id;
$param['client_secret'] = Sign::getSign($param);
$article = Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_AUTHOR . 'getAuthor', $param, 3600);
$article = Yohobuy::get(SERVICE_URL . self::URI_AUTHOR . 'getAuthor', $param, 3600);
$result = $article['data'];
}
... ...
... ... @@ -31,12 +31,12 @@ class OptData
$param['uid'] = $uid;
$param['id'] = $id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL.'guang/service/v2/favorite/toggleBrand', $param);
return Yohobuy::get(SERVICE_URL.'guang/service/v2/favorite/toggleBrand', $param);
// if ($opt == 'ok') {
// return Yohobuy::yarClient(Yohobuy::SERVICE_URL . 'guang/service/v2/favorite/', 'toggleBrand', array($uid, $id));
// return Yohobuy::yarClient(SERVICE_URL . 'guang/service/v2/favorite/', 'toggleBrand', array($uid, $id));
// } else {
// return Yohobuy::yarClient(Yohobuy::SERVICE_URL . 'guang/service/v2/favorite/', 'toggleBrand', array($uid, $id));
// return Yohobuy::yarClient(SERVICE_URL . 'guang/service/v2/favorite/', 'toggleBrand', array($uid, $id));
// }
}
... ... @@ -56,13 +56,13 @@ class OptData
$param['client_secret'] = Sign::getSign($param);
if ($opt === 'cancel') {
// return Yohobuy::yarClient(Yohobuy::SERVICE_URL . 'shops/service/v1/favorite/', 'addUidProductFav', array($uid, $skn));
// return Yohobuy::yarClient(SERVICE_URL . 'shops/service/v1/favorite/', 'addUidProductFav', array($uid, $skn));
return Yohobuy::get(Yohobuy::SERVICE_URL.'shops/service/v1/favorite/addUidProductFav', $param);
return Yohobuy::get(SERVICE_URL.'shops/service/v1/favorite/addUidProductFav', $param);
} else {
// return Yohobuy::yarClient(Yohobuy::SERVICE_URL . 'shops/service/v1/favorite/', 'delUidProductFav', array($uid, $skn));
// return Yohobuy::yarClient(SERVICE_URL . 'shops/service/v1/favorite/', 'delUidProductFav', array($uid, $skn));
return Yohobuy::get(Yohobuy::SERVICE_URL.'shops/service/v1/favorite/delUidProductFav', $param);
return Yohobuy::get(SERVICE_URL.'shops/service/v1/favorite/delUidProductFav', $param);
}
}
... ... @@ -82,13 +82,13 @@ class OptData
$param['client_secret'] = Sign::getSign($param);
if ($opt === 'cancel') {
// return Yohobuy::yarClient(Yohobuy::SERVICE_URL . 'guang/service/v2/praise', 'cancelPraise', array($id, $udid));
// return Yohobuy::yarClient(SERVICE_URL . 'guang/service/v2/praise', 'cancelPraise', array($id, $udid));
return Yohobuy::get(Yohobuy::SERVICE_URL.'guang/api/v2/praise/cancel', $param);
return Yohobuy::get(SERVICE_URL.'guang/api/v2/praise/cancel', $param);
} else {
// return Yohobuy::yarClient(Yohobuy::SERVICE_URL . 'guang/service/v2/praise', 'setPraise', array($id, $udid));
// return Yohobuy::yarClient(SERVICE_URL . 'guang/service/v2/praise', 'setPraise', array($id, $udid));
return Yohobuy::get(Yohobuy::SERVICE_URL.'guang/api/v2/praise/setPraise', $param);
return Yohobuy::get(SERVICE_URL.'guang/api/v2/praise/setPraise', $param);
}
}
... ... @@ -108,13 +108,13 @@ class OptData
$param['client_secret'] = Sign::getSign($param);
if ($opt === 'cancel') {
// return Yohobuy::yarClient(Yohobuy::SERVICE_URL . 'guang/service/v2/favorite/', 'cancelFavorite', array($id, $uid));
// return Yohobuy::yarClient(SERVICE_URL . 'guang/service/v2/favorite/', 'cancelFavorite', array($id, $uid));
return Yohobuy::get(Yohobuy::SERVICE_URL.'guang/api/v1/favorite/cancelFavorite', $param);
return Yohobuy::get(SERVICE_URL.'guang/api/v1/favorite/cancelFavorite', $param);
} else {
// return Yohobuy::yarClient(Yohobuy::SERVICE_URL . 'guang/service/v2/favorite/', 'setFavorite', array($id, $uid));
// return Yohobuy::yarClient(SERVICE_URL . 'guang/service/v2/favorite/', 'setFavorite', array($id, $uid));
return Yohobuy::get(Yohobuy::SERVICE_URL.'guang/api/v1/favorite/setFavorite', $param);
return Yohobuy::get(SERVICE_URL.'guang/api/v1/favorite/setFavorite', $param);
}
}
... ...
... ... @@ -42,7 +42,7 @@ class PlusstarData
// 存放接口列表
$urlList = array();
// 接口调用的URL
$url = Yohobuy::SERVICE_URL . self::URI_BRANDLIST;
$url = SERVICE_URL . self::URI_BRANDLIST;
// 公共的参数
$param = Yohobuy::param();
... ... @@ -81,7 +81,7 @@ class PlusstarData
// 存放接口列表
$urlList = array();
// 接口调用的URL
$url = Yohobuy::SERVICE_URL . self::URI_BRANDLIST;
$url = SERVICE_URL . self::URI_BRANDLIST;
// 公共的参数
$param = Yohobuy::param();
... ... @@ -140,7 +140,7 @@ class PlusstarData
if (!empty($cached)) {
// 判断用户是否已收藏
if ($isUidOk) {
// $getUidBrandFav = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_FAVORITE, 'getUidBrandFav', array($uid, $cached['getBrandInfo']['data']['brand_id']), false, 1000);
// $getUidBrandFav = Yohobuy::yarClient(SERVICE_URL . self::URI_BRANDINFO_FAVORITE, 'getUidBrandFav', array($uid, $cached['getBrandInfo']['data']['brand_id']), false, 1000);
$param = Yohobuy::param();
$param['uid'] = $uid;
... ... @@ -148,7 +148,7 @@ class PlusstarData
$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);
$getUidBrandFav = Yohobuy::get(SERVICE_URL . self::URI_BRANDINFO_FAVORITE . 'getUidBrandFav', $param);
// file_put_contents('../../../../../../Desktop/app/n/getUidBrandFav.txt', var_export($getUidBrandFav, true));
if (isset($getUidBrandFav['code']) && $getUidBrandFav['code'] == 200) {
... ... @@ -161,7 +161,7 @@ class PlusstarData
}
// 品牌详情信息
// $brandInfo = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_PLUSSTAR, 'getBrandInfo', array(array('id' => $id)), 3600); // 缓存1小时
// $brandInfo = Yohobuy::yarClient(SERVICE_URL . self::URI_BRANDINFO_PLUSSTAR, 'getBrandInfo', array(array('id' => $id)), 3600); // 缓存1小时
// file_put_contents('../../../../../../Desktop/app/o/getbrandinfo.txt', var_export($brandInfo, true));
// 品牌详情信息
... ... @@ -170,7 +170,7 @@ class PlusstarData
$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);
$brandInfo = Yohobuy::get(SERVICE_URL . self::URI_BRANDINFO_PLUSSTAR_NEW . 'getbrandinfo', $param, 3600);
// file_put_contents('../../../../../../Desktop/app/n/getbrandinfo.txt', var_export($brandInfo, true));
if (!isset($brandInfo['data']['brand_id'])) {
... ... @@ -194,7 +194,7 @@ class PlusstarData
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
$article = Yohobuy::get(Yohobuy::SERVICE_URL.self::URI_BRANDINFO_ARTICLE.'getArticleByBrand', $param);
$article = Yohobuy::get(SERVICE_URL.self::URI_BRANDINFO_ARTICLE.'getArticleByBrand', $param);
$result['getArticleByBrand'] = empty($article['data']) ? array() : $article['data'];
// file_put_contents('../../../../../../Desktop/app/n/getArticleByBrand.txt', var_export($result['getArticleByBrand'], true));
... ... @@ -205,7 +205,7 @@ class PlusstarData
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
$uidBrandFavRes = Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_FAVORITE . 'getUidBrandFav', $param);
$uidBrandFavRes = Yohobuy::get(SERVICE_URL . self::URI_BRANDINFO_FAVORITE . 'getUidBrandFav', $param);
if (isset($uidBrandFavRes['code']) && $uidBrandFavRes['code'] == 200) {
$result['getUidBrandFav'] = true;
... ... @@ -231,7 +231,7 @@ class PlusstarData
// $param['gender'] = $gender;
// $param['order'] = 's_t_desc';
// $param['client_secret'] = Sign::getSign($param);
// $newProduct = Yohobuy::get(Yohobuy::API_URL, $param, 1800); // 缓存30分钟
// $newProduct = Yohobuy::get(API_URL, $param, 1800); // 缓存30分钟
$condition = array();
$condition['brand'] = $brandInfo['data']['brand_id'];
... ... @@ -263,7 +263,7 @@ class PlusstarData
$skn = $value['product_skn'];
$result['getUidProductFav'][$skn] = false;
// if ($isUidOk) {
// Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_FAVORITE, 'getUidProductFav', array($uid, $value['product_skn']), function($retval) use(&$result, &$skn) {
// Yohobuy::yarConcurrentCall(SERVICE_URL . self::URI_BRANDINFO_FAVORITE, 'getUidProductFav', array($uid, $value['product_skn']), function($retval) use(&$result, &$skn) {
// $result['getUidProductFav'][$skn] = empty($retval['data']) ? false : $retval['data'];
// });
// }
... ...
... ... @@ -49,7 +49,7 @@ class CartData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -74,7 +74,7 @@ class CartData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -98,7 +98,7 @@ class CartData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -124,7 +124,7 @@ class CartData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -142,7 +142,7 @@ class CartData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -161,7 +161,7 @@ class CartData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -179,7 +179,7 @@ class CartData
$param['promotion_id'] = $promotionId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -214,7 +214,7 @@ class CartData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -240,7 +240,7 @@ class CartData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -267,7 +267,7 @@ class CartData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -304,7 +304,7 @@ class CartData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -322,7 +322,7 @@ class CartData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -341,7 +341,7 @@ class CartData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -405,7 +405,7 @@ class CartData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, false, false, 5, $userAgent);
return Yohobuy::get(API_URL, $param, false, false, 5, $userAgent);
}
/**
... ... @@ -429,7 +429,7 @@ class CartData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
... ... @@ -448,7 +448,7 @@ class CartData
$param['page'] = $page;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -470,7 +470,7 @@ class CartData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -508,7 +508,7 @@ class CartData
$param['orderCode'] = $orderCode;
$param['payment'] = $payment;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -27,14 +27,14 @@ class GradeData
$param['uid'] = $uid;
$param['method'] = 'app.passport.vip';
$param['client_secret'] = Sign::getSign($param);
$urlList['grade'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
$urlList['grade'] = Yohobuy::httpBuildQuery(API_URL, $param);
//获取用户基本信息数据(用来得到username)
$param = Yohobuy::param();
$param['uid'] = $uid;
$param['method'] = 'app.passport.profile';
$param['client_secret'] = Sign::getSign($param);
$urlList['userProfile'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
$urlList['userProfile'] = Yohobuy::httpBuildQuery(API_URL, $param);
return Yohobuy::getMulti($urlList);
}
... ... @@ -53,7 +53,7 @@ class GradeData
$param['uid'] = $uid;
$param['method'] = 'app.passport.getPrivilege';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -29,7 +29,7 @@ class GuangData
$param['limit'] = $limit;
$param['yh_channel'] = $yh_channel;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::SERVICE_URL . self::GUANG_URI . 'getUserFavArticleList', $param);
return Yohobuy::post(SERVICE_URL . self::GUANG_URI . 'getUserFavArticleList', $param);
}
}
... ...
... ... @@ -23,7 +23,7 @@ class HelpData
$param['method'] = 'app.help.li';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/*
... ... @@ -38,7 +38,7 @@ class HelpData
$param['code'] = $code;
$param['return_type'] = 'html';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_OLD, $param, true);
return Yohobuy::post(API_OLD, $param, true);
}
}
... ...
... ... @@ -30,7 +30,7 @@ class IndexData
$param['content_code'] = $contentCode;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v5/resource/get', $param);
return Yohobuy::get(SERVICE_URL . 'operations/api/v5/resource/get', $param);
}
/**
... ... @@ -45,7 +45,7 @@ class IndexData
$param['method'] = 'app.cover.getCoverStart';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -72,7 +72,7 @@ class IndexData
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v5/resource/home', $param, false, false, 2);
return Yohobuy::get(SERVICE_URL . 'operations/api/v5/resource/home', $param, false, false, 2);
}
/**
... ... @@ -85,7 +85,7 @@ class IndexData
$param = Yohobuy::param();
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v5/entrance/getEntrance', $param);
return Yohobuy::get(SERVICE_URL . 'operations/api/v5/entrance/getEntrance', $param);
}
}
... ...
... ... @@ -28,7 +28,7 @@ class OnlineData
$params = Yohobuy::param();
$params['client_secret'] = Sign::getSign($params);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::ONLINE_URI . 'getCategory', $params, 3600);
return Yohobuy::get(SERVICE_URL . self::ONLINE_URI . 'getCategory', $params, 3600);
}
/*
... ... @@ -42,7 +42,7 @@ class OnlineData
$params['category_id'] = $cateId;
$params['client_secret'] = Sign::getSign($params);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::ONLINE_URI . 'getHelp', $params, 3600);
return Yohobuy::get(SERVICE_URL . self::ONLINE_URI . 'getHelp', $params, 3600);
}
}
... ...
... ... @@ -28,7 +28,7 @@ class OrderData
$param['yh_channel'] = $channel;
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/*
... ... @@ -46,7 +46,7 @@ class OrderData
$param['method'] = 'app.SpaceOrders.close';
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/*
... ... @@ -64,7 +64,7 @@ class OrderData
$param['method'] = 'app.SpaceOrders.delOrderByCode';
$param['client_secret'] = Sign::getSign($param);
//调用接口删除订单
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -84,7 +84,7 @@ class OrderData
$param['session_key'] = $sessionKey;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/*
... ... @@ -104,7 +104,7 @@ class OrderData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/*
... ... @@ -120,7 +120,7 @@ class OrderData
$param['yh_channel'] = $yh_channel;
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get(Yohobuy::SERVICE_URL . '/operations/api/v5/resource/get', $param);
return Yohobuy::get(SERVICE_URL . '/operations/api/v5/resource/get', $param);
}
/*
... ... @@ -138,7 +138,7 @@ class OrderData
$param['yh_channel'] = $yh_channel;
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get(Yohobuy::SERVICE_URL . '/operations/api/v5/resource/get', $param);
return Yohobuy::get(SERVICE_URL . '/operations/api/v5/resource/get', $param);
}
/**
... ... @@ -160,7 +160,7 @@ class OrderData
$param['client_secret'] = Sign::getSign($param);
// 调用接口获得数据
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
}
... ...
... ... @@ -33,8 +33,8 @@ class SideData
// $query = Yohobuy::httpBuildQuery('', $param);
//
// $urlList = array();
// $urlList['getEntrance'] = Yohobuy::SERVICE_URL . self::URI_LEFTNAV_ENTRANCE . $query;
// $urlList['getCategory'] = Yohobuy::SERVICE_URL . self::URI_LEFTNAV_CATEGORY . $query;
// $urlList['getEntrance'] = SERVICE_URL . self::URI_LEFTNAV_ENTRANCE . $query;
// $urlList['getCategory'] = SERVICE_URL . self::URI_LEFTNAV_CATEGORY . $query;
//
// return Yohobuy::getMulti($urlList);
... ... @@ -43,7 +43,7 @@ class SideData
$param['private_key'] = 'fd4ad5fcfa0de589ef238c0e7331b585'; // 调用Android的private_key不然会有参数验证错误的bug
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_LEFTNAV_CATEGORY, $param);
return Yohobuy::get(SERVICE_URL . self::URI_LEFTNAV_CATEGORY, $param);
}
}
... ...
... ... @@ -31,7 +31,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, $cache); // 缓存1小时
return Yohobuy::get(API_URL, $param, $cache); // 缓存1小时
}
/**
... ... @@ -45,7 +45,7 @@ class UserData
$param['method'] = 'app.resources.getNotices';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -62,7 +62,7 @@ class UserData
$param['udid'] = $udid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -78,7 +78,7 @@ class UserData
$param['yh_channel'] = $yh_channel;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -100,7 +100,7 @@ class UserData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -120,7 +120,7 @@ class UserData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -142,7 +142,7 @@ class UserData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -161,7 +161,7 @@ class UserData
$param['fav_id'] = $fav_id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -183,7 +183,7 @@ class UserData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -201,7 +201,7 @@ class UserData
$param['skn'] = $skn;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -217,14 +217,14 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);*/
return Yohobuy::get(API_URL, $param);*/
$param = Yohobuy::param();
$param['method'] = 'app.yoho.yohocoin';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -245,7 +245,7 @@ class UserData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::$type(Yohobuy::API_URL, $param);
return Yohobuy::$type(API_URL, $param);
}
/**
... ... @@ -268,7 +268,7 @@ class UserData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -284,7 +284,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -300,7 +300,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -336,7 +336,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -354,7 +354,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -372,7 +372,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -391,7 +391,7 @@ class UserData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'suggest/api/v1/suggest/getList', $param);
return Yohobuy::get(SERVICE_URL . 'suggest/api/v1/suggest/getList', $param);
}
/**
... ... @@ -412,7 +412,7 @@ class UserData
$param['suggest_id'] = $suggest_id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'suggest/api/v1/suggest/is_reliable', $param);
return Yohobuy::get(SERVICE_URL . 'suggest/api/v1/suggest/is_reliable', $param);
}
/**
... ... @@ -435,7 +435,7 @@ class UserData
$param['suggest_type'] = $suggest_type;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'suggest/api/v1/suggest/saveSuggest', $param);
return Yohobuy::get(SERVICE_URL . 'suggest/api/v1/suggest/saveSuggest', $param);
}
/**
... ... @@ -455,7 +455,7 @@ class UserData
$param['method'] = 'app.inbox.getlist';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -468,7 +468,7 @@ class UserData
$param = Yohobuy::param();
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v1/help/getCategory', $param);
return Yohobuy::get(SERVICE_URL . 'operations/api/v1/help/getCategory', $param);
}
/**
... ... @@ -482,7 +482,7 @@ class UserData
$param['method'] = 'app.help.li';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -499,7 +499,7 @@ class UserData
$param['code'] = $code;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, true, true);
return Yohobuy::get(API_URL, $param, true, true);
}
}
... ...
... ... @@ -30,7 +30,7 @@ class BackData
$param['method'] = 'app.passport.getArea';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -48,7 +48,7 @@ class BackData
$param['method'] = 'app.register.backpwdByEmail';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -65,7 +65,7 @@ class BackData
$param['code'] = $code;
// 默认返回的不是json类型数据,是html
return Yohobuy::get(Yohobuy::YOHOBUY_URL . 'passport/back/update', $param, true);
return Yohobuy::get(YOHOBUY_URL . 'passport/back/update', $param, true);
}
/**
... ... @@ -85,7 +85,7 @@ class BackData
$param['method'] = 'app.register.sendBackpwdCodeToMobile';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -107,7 +107,7 @@ class BackData
$param['method'] = 'app.register.validBackpwdCode';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -130,7 +130,7 @@ class BackData
$param['method'] = 'app.register.changepwdByMobileCode';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -36,7 +36,7 @@ class BindData
$param['source_type'] = $sourceType;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -52,7 +52,7 @@ class BindData
$param['area'] = $area;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -68,7 +68,7 @@ class BindData
$param['area'] = $area;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -98,7 +98,7 @@ class BindData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -114,7 +114,7 @@ class BindData
$param['area'] = $area;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -135,7 +135,7 @@ class BindData
$param['area'] = $area;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -39,7 +39,7 @@ class LoginData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -55,7 +55,7 @@ class LoginData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -81,7 +81,7 @@ class LoginData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -31,7 +31,7 @@ class RegData
// $param = Yohobuy::param();
// $param['method'] = 'app.passport.getArea';
// $param['client_secret'] = Sign::getSign($param);
// $data = Yohobuy::get(Yohobuy::API_URL, $param);
// $data = Yohobuy::get(API_URL, $param);
// $result = array();
// if (!empty($data['data'])) {
// $build = array();
... ... @@ -127,7 +127,7 @@ class RegData
$param['mobile'] = $mobile;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -147,7 +147,7 @@ class RegData
$param['code'] = $code;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -167,7 +167,7 @@ class RegData
$param['password'] = $password;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
}
... ...
... ... @@ -34,7 +34,7 @@ class BrandData
$param['type'] = $isBrand ? 'brand' : 'product';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -54,7 +54,7 @@ class BrandData
$param['type'] = $isBrand ? 'brand' : 'product';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
}
... ...
... ... @@ -45,7 +45,7 @@ class DetailData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -68,7 +68,7 @@ class DetailData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -94,7 +94,7 @@ class DetailData
$param['limit'] = $pageSize;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -108,7 +108,7 @@ class DetailData
$param['method'] = 'app.consult.common';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -128,7 +128,7 @@ class DetailData
$param['limit'] = $pageSize;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -148,7 +148,7 @@ class DetailData
$param['brandId'] = $brandId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 缓存1小时
return Yohobuy::get(API_URL, $param, 3600); // 缓存1小时
}
/**
... ... @@ -167,7 +167,7 @@ class DetailData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -183,7 +183,7 @@ class DetailData
$param['product_skn'] = $productSkn;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -201,7 +201,7 @@ class DetailData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -219,7 +219,7 @@ class DetailData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -239,7 +239,7 @@ class DetailData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -35,7 +35,7 @@ class ListData
// $param['order'] = 's_t_desc';
// $param['client_secret'] = Sign::getSign($param);
//
// return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 有缓存1小时
// return Yohobuy::get(API_URL, $param, 3600); // 有缓存1小时
$condition = array();
$condition['query'] = implode(' ', $skns);
... ... @@ -53,7 +53,7 @@ class ListData
*/
public static function productInfoBySkcs($skcs)
{
return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_PRODUCT, 'getLessInfoByProductSkcs', array(array('productSkcs' => $skcs)));
return Yohobuy::yarClient(SERVICE_URL . self::URI_PRODUCT, 'getLessInfoByProductSkcs', array(array('productSkcs' => $skcs)));
}
}
... ...
... ... @@ -30,7 +30,7 @@ class NewsaleData
$param['content_code'] = $contentCode;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v5/resource/get', $param);
return Yohobuy::get(SERVICE_URL . 'operations/api/v5/resource/get', $param);
}
/**
... ... @@ -56,7 +56,7 @@ class NewsaleData
$param['dayLimit'] = 1;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -108,7 +108,7 @@ class NewsaleData
$param = array_merge($param, $queriedParams);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 600); // 缓存10分钟
return Yohobuy::get(API_URL, $param, 600); // 缓存10分钟
}
/**
... ... @@ -132,7 +132,7 @@ class NewsaleData
$param['p_d'] = '0.1,0.9';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -175,7 +175,7 @@ class NewsaleData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -202,7 +202,7 @@ class NewsaleData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -36,7 +36,7 @@ class RecomData
$param['yh_channel'] = $channel;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 3600);
return Yohobuy::get(API_URL, $param, 3600);
}
/**
... ... @@ -55,7 +55,7 @@ class RecomData
$param['yh_channel'] = '3';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 3600);
return Yohobuy::get(API_URL, $param, 3600);
}
/**
... ... @@ -74,7 +74,7 @@ class RecomData
// $param['yh_channel'] = '4';
// $param['client_secret'] = Sign::getSign($param);
//
// return Yohobuy::get(Yohobuy::API_URL, $param);
// return Yohobuy::get(API_URL, $param);
// 人气单品
$param = array(
array(
... ... @@ -86,7 +86,7 @@ class RecomData
),
'N', false
);
$result['top'] = Yohobuy::yarClient(Yohobuy::SERVICE_URL . '/search/service/v1/product', 'search', $param, 3600); // 缓存1小时
$result['top'] = Yohobuy::yarClient(SERVICE_URL . '/search/service/v1/product', 'search', $param, 3600); // 缓存1小时
// 新品到着
$param = array(
array('status' => 1, 'stocknumber' => 1, 'gender' => ''),
... ... @@ -99,7 +99,7 @@ class RecomData
),
false
);
$result['new'] = Yohobuy::yarClient(Yohobuy::SERVICE_URL . '/search/service/v1/product', 'searchBySortList', $param, 3600); // 缓存1小时
$result['new'] = Yohobuy::yarClient(SERVICE_URL . '/search/service/v1/product', 'searchBySortList', $param, 3600); // 缓存1小时
return $result;
}
... ...
... ... @@ -56,7 +56,7 @@ class SearchData
$param['method'] = 'app.search.fuzzy';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -99,7 +99,7 @@ class SearchData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ...
... ... @@ -13,58 +13,58 @@ class InfoData
{
//作者信息
if ($type == 'author') {
return Yohobuy::SERVICE_URL.'guang/service/v1/author/getAuthor';
return SERVICE_URL.'guang/service/v1/author/getAuthor';
}
//文章评论列表
elseif($type == 'commentList') {
return Yohobuy::SERVICE_URL.'guang/api/v1/comments/getList';
return SERVICE_URL.'guang/api/v1/comments/getList';
}
//热门标签
elseif ($type == 'getTagTop') {
return Yohobuy::SERVICE_URL.'guang/api/v2/article/getTagTop';
return SERVICE_URL.'guang/api/v2/article/getTagTop';
}
//精彩推荐
elseif ($type == 'getArticleByViewsNum') {
return Yohobuy::SERVICE_URL.'guang/api/v2/article/getArticleByViewsNum';
return SERVICE_URL.'guang/api/v2/article/getArticleByViewsNum';
}
elseif ($type == 'getBrand'){
return Yohobuy::SERVICE_URL.'guang/service/v2/article/getBrand';
return SERVICE_URL.'guang/service/v2/article/getBrand';
}
//相关文章
elseif ($type == 'getOtherArticle') {
return Yohobuy::SERVICE_URL.'guang/service/v2/article/getOtherArticle';
return SERVICE_URL.'guang/service/v2/article/getOtherArticle';
}
//文章标题等相关信息
elseif ($type == 'getArticle') {
return Yohobuy::SERVICE_URL.'guang/service/v2/article/getArticle';
return SERVICE_URL.'guang/service/v2/article/getArticle';
}
//文章详情
elseif ($type == 'getArticleContent') {
return Yohobuy::SERVICE_URL.'guang/service/v2/article/getArticleContent';
return SERVICE_URL.'guang/service/v2/article/getArticleContent';
}
//基本信息
elseif ($type == 'getArticleBaseInfo') {
return Yohobuy::SERVICE_URL.'guang/api/v1/article/getArticleBaseInfo';
return SERVICE_URL.'guang/api/v1/article/getArticleBaseInfo';
}
//添加评论
elseif ($type == 'addComment') {
return Yohobuy::SERVICE_URL.'guang/api/v1/comments/add';
return SERVICE_URL.'guang/api/v1/comments/add';
}
//点赞
elseif ($type == 'setPraise') {
return Yohobuy::SERVICE_URL.'guang/api/v2/praise/setPraise';
return SERVICE_URL.'guang/api/v2/praise/setPraise';
}
//取消赞
elseif ($type == 'cancelPraise') {
return Yohobuy::SERVICE_URL.'guang/api/v2/praise/cancel';
return SERVICE_URL.'guang/api/v2/praise/cancel';
}
//收藏
elseif ($type == 'setFavorite') {
return Yohobuy::SERVICE_URL.'guang/api/v1/favorite/setFavorite';
return SERVICE_URL.'guang/api/v1/favorite/setFavorite';
}
//取消收藏
elseif ($type == 'cancelFavorite') {
return Yohobuy::SERVICE_URL.'guang/api/v1/favorite/cancelFavorite';
return SERVICE_URL.'guang/api/v1/favorite/cancelFavorite';
}
}
... ...
... ... @@ -32,7 +32,7 @@ class ListData
$param = Yohobuy::param();
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_CATEGORY, $param, 3600); // 有缓存1小时
return Yohobuy::get(SERVICE_URL . self::URI_CATEGORY, $param, 3600); // 有缓存1小时
}
/**
... ... @@ -74,7 +74,7 @@ class ListData
$cache = $useCache ? 300 : false;
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_ARTICLELIST, $param, $cache); // 缓存5分钟
return Yohobuy::get(SERVICE_URL . self::URI_ARTICLELIST, $param, $cache); // 缓存5分钟
}
/**
... ... @@ -101,7 +101,7 @@ class ListData
$param['udid'] = $udid;
$param['client_secret'] = Sign::getSign($param);
$urlList[$value['id']] = Yohobuy::httpBuildQuery(Yohobuy::SERVICE_URL . self::URI_ARTICLELIST, $param);
$urlList[$value['id']] = Yohobuy::httpBuildQuery(SERVICE_URL . self::URI_ARTICLELIST, $param);
}
return Yohobuy::getMulti($urlList);
... ... @@ -117,14 +117,14 @@ class ListData
{
$result = array();
if (is_numeric($id)) {
// $result = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_AUTHOR, 'getAuthor', array($id), 3600); // 缓存1小时
// $result = Yohobuy::yarClient(SERVICE_URL . self::URI_AUTHOR, 'getAuthor', array($id), 3600); // 缓存1小时
$param = Yohobuy::param();
$param['author_id'] = $id;
$param['client_type'] = "web";
$param['private_key'] = Yohobuy::$privateKeyList['web'];
$param['client_secret'] = Sign::getSign($param);
$result = Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_GETAUTHOR, $param); // 缓存1小时
$result = Yohobuy::get(SERVICE_URL . self::URI_GETAUTHOR, $param); // 缓存1小时
}
return $result;
}
... ... @@ -145,6 +145,6 @@ class ListData
$param['private_key'] = Yohobuy::$privateKeyList['web'];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'guang/service/v2/article/getArticleByBrand', $param);
return Yohobuy::get(SERVICE_URL . 'guang/service/v2/article/getArticleByBrand', $param);
}
}
... ...
... ... @@ -22,7 +22,7 @@ class PlusstarData {
$param['client_type'] = $type;
$param['private_key'] = Yohobuy::$privateKeyList[$type];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_BRANDLIST, $param);
return Yohobuy::get(SERVICE_URL . self::URI_BRANDLIST, $param);
}
}
\ No newline at end of file
... ...
... ... @@ -20,7 +20,7 @@ class AccountData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -37,7 +37,7 @@ class AccountData
$param['password'] = $password;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -54,7 +54,7 @@ class AccountData
$param['newPassword'] = $newPwd;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -73,7 +73,7 @@ class AccountData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -92,7 +92,7 @@ class AccountData
$param['code'] = $code;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -110,7 +110,7 @@ class AccountData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -129,7 +129,7 @@ class AccountData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -146,7 +146,7 @@ class AccountData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -163,7 +163,7 @@ class AccountData
$param['callback'] = $callback;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -179,7 +179,7 @@ class AccountData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -191,7 +191,7 @@ class AccountData
$param['method'] = 'web.passport.checkCodeValid';
$param['code'] = $code;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -205,7 +205,7 @@ class AccountData
$param['method'] = 'web.passport.changeVerifyEmail';
$param['code'] = $code;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -19,7 +19,7 @@ class AddressData
$param['id'] = $parentId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -37,7 +37,7 @@ class AddressData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
... ... @@ -76,7 +76,7 @@ class AddressData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -94,7 +94,7 @@ class AddressData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -112,7 +112,7 @@ class AddressData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -48,7 +48,7 @@ class CartData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -73,7 +73,7 @@ class CartData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -95,7 +95,7 @@ class CartData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -120,7 +120,7 @@ class CartData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -139,7 +139,7 @@ class CartData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -158,7 +158,7 @@ class CartData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -176,7 +176,7 @@ class CartData
$param['promotion_id'] = $promotionId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -211,7 +211,7 @@ class CartData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -235,7 +235,7 @@ class CartData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -255,7 +255,7 @@ class CartData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -295,7 +295,7 @@ class CartData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -313,7 +313,7 @@ class CartData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -332,7 +332,7 @@ class CartData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -348,7 +348,7 @@ class CartData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -429,7 +429,9 @@ class CartData
}
$param['remark'] = $remark;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, false, false, 10, $userAgent);
return Yohobuy::get(API_URL, $param, false, false, 10, $userAgent);
}
/**
... ... @@ -451,7 +453,7 @@ class CartData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -469,7 +471,7 @@ class CartData
$param['page'] = $page;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -491,7 +493,7 @@ class CartData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -529,6 +531,10 @@ class CartData
$param['orderCode'] = $orderCode;
$param['payment'] = $payment;
$param['client_secret'] = Sign::getSign($param);
<<<<<<< HEAD
return Yohobuy::get(Yohobuy::API_URL, $param);
=======
return Yohobuy::get(API_URL, $param);
>>>>>>> master
}
}
... ...
... ... @@ -22,7 +22,7 @@ class CommentData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
... ... @@ -47,7 +47,7 @@ class CommentData
$param['parameters'] = json_encode($parameters);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
}
\ No newline at end of file
... ...
... ... @@ -25,7 +25,7 @@ class ComplaintsData
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -46,7 +46,7 @@ class ComplaintsData
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -63,7 +63,7 @@ class ComplaintsData
$param['client_type'] = $clientType;
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -22,7 +22,7 @@ class ConsultData
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -22,7 +22,7 @@ class CouponData
$param['uid'] = $uid;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL , $param);
return Yohobuy::get(API_URL , $param);
}
/**
... ... @@ -38,7 +38,7 @@ class CouponData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -23,7 +23,7 @@ class CurrencyData
$param['limit'] = 15;
$param = array_merge($param, $condition);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -37,7 +37,7 @@ class CurrencyData
$param['method'] = 'app.yoho.yohocoin';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -19,7 +19,7 @@ class HelpData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -41,7 +41,7 @@ class HelpData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -60,7 +60,7 @@ class HelpData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -28,7 +28,7 @@ class IndexData
$params['client_type'] = 'web'; // 调用web手机网站的
$params['private_key'] = '0ed29744ed318fd28d2c07985d3ba633'; // 调用Android的private_key不然会有参数验证错误的bug
$params['client_secret'] = Sign::getSign($params);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_LEFTNAV_CATEGORY, $params);
return Yohobuy::get(SERVICE_URL . self::URI_LEFTNAV_CATEGORY, $params);
}
/**
... ... @@ -48,9 +48,9 @@ class IndexData
$params['private_key'] = Yohobuy::$privateKeyList[$client_type];
$params['client_secret'] = Sign::getSign($params);
if($isOnlyUrl) {
return Yohobuy::httpBuildQuery(Yohobuy::SERVICE_URL . self::URL_OPERATIONS_RESOURCE_GET, $params);
return Yohobuy::httpBuildQuery(SERVICE_URL . self::URL_OPERATIONS_RESOURCE_GET, $params);
}
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URL_OPERATIONS_RESOURCE_GET, $params, false, false, 2);
return Yohobuy::get(SERVICE_URL . self::URL_OPERATIONS_RESOURCE_GET, $params, false, false, 2);
}
/**
... ... @@ -71,7 +71,7 @@ class IndexData
$param['client_type'] = 'web';
$param['private_key'] = Yohobuy::$privateKeyList['web'];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -95,7 +95,7 @@ class IndexData
$param['client_type'] = 'web';
$param['private_key'] = Yohobuy::$privateKeyList['web'];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -112,7 +112,7 @@ class IndexData
$param['udid'] = $udid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -127,7 +127,7 @@ class IndexData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -142,7 +142,7 @@ class IndexData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -24,7 +24,7 @@ class MessageData
$param['size'] = $size;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -41,7 +41,7 @@ class MessageData
$param['id'] = $id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -57,7 +57,7 @@ class MessageData
$param['ids'] = $ids;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -72,7 +72,7 @@ class MessageData
$param['is_read'] = 'N';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -88,7 +88,7 @@ class MessageData
$param['couponType'] = 4;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -105,7 +105,7 @@ class MessageData
$param['couponId'] = $couponId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -25,7 +25,7 @@ class OrderData
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -41,7 +41,7 @@ class OrderData
$param['uid'] = $uid;
$param['order_code'] = $orderCode;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -62,7 +62,7 @@ class OrderData
$param['reasons'] = $reason;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -78,7 +78,7 @@ class OrderData
$param['uid'] = $uid;
$param['order_code'] = $orderCode;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -92,7 +92,7 @@ class OrderData
$param['method'] = 'app.SpaceOrders.getQrByOrderCode';
$param['order_code'] = $orderCode;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -111,7 +111,7 @@ class OrderData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -128,7 +128,7 @@ class OrderData
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -150,7 +150,7 @@ class OrderData
$param['client_secret'] = Sign::getSign($param);
// 调用接口获得数据
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -165,7 +165,7 @@ class OrderData
$param['client_secret'] = Sign::getSign($param);
// 调用接口获得数据
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -191,7 +191,7 @@ class OrderData
$param['client_secret'] = Sign::getSign($param);
// 调用接口获得数据
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
... ... @@ -212,9 +212,27 @@ class OrderData
$param['session_key'] = $sessionKey;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/*
* 删除订单
*/
public static function deleteOrderData($orderCode, $uid, $gender, $channel)
{
//构建必传参数
$param = Yohobuy::param();
$param['order_code'] = $orderCode;
$param['uid'] = $uid;
$param['gender'] = $gender;
$param['yh_channel'] = $channel;
$param['method'] = 'app.SpaceOrders.delOrderByCode';
$param['client_secret'] = Sign::getSign($param);
//调用接口删除订单
return Yohobuy::get(API_URL, $param);
}
/** 再次购买
* @param type $uid
* @param type $orderCode
... ... @@ -228,6 +246,7 @@ class OrderData
$param['order_code'] = $orderCode;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -17,7 +17,7 @@ class RedenvelopesData
$param['method'] = 'app.yoho.redpacketList';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -30,6 +30,6 @@ class RedenvelopesData
$param['method'] = 'app.yoho.redpacketInfo';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -25,7 +25,7 @@ class ReturnsData
$param['page'] = $page;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
... ... @@ -44,7 +44,7 @@ class ReturnsData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -62,7 +62,7 @@ class ReturnsData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
... ... @@ -81,7 +81,7 @@ class ReturnsData
$param['id'] = $id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
... ... @@ -100,7 +100,7 @@ class ReturnsData
$param['id'] = $id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
... ... @@ -115,7 +115,7 @@ class ReturnsData
$param['method'] = 'app.express.getExpressCompany';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
... ... @@ -141,7 +141,7 @@ class ReturnsData
$param['express_company'] = $expressCompany;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
... ... @@ -160,7 +160,7 @@ class ReturnsData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
... ... @@ -179,7 +179,7 @@ class ReturnsData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -201,7 +201,7 @@ class ReturnsData
$param['payment'] = json_encode($payment);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -233,7 +233,40 @@ class ReturnsData
$param['delivery_tpye'] = $deliveryType;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
* 取消退货申请
* @param $id
* @param $uid
* @return mixed
*/
public static function cancelRefund($id, $uid)
{
$param = Yohobuy::param();
$param['method'] = 'app.refund.cancel';
$param['id'] = $id;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(API_URL, $param);
}
/**
* 取消换货申请
* @param $id
* @param $uid
* @return mixed
*/
public static function cancelChange($id, $uid)
{
$param = Yohobuy::param();
$param['method'] = 'app.change.cancel';
$param['id'] = $id;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -255,7 +288,7 @@ class ReturnsData
$param['yh_channel'] = $yhChannel;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
... ... @@ -272,7 +305,7 @@ class ReturnsData
$param['product_skn'] = $productSkn;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -288,7 +321,7 @@ class ReturnsData
$param['product_skn'] = $productSkn;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
return Yohobuy::httpBuildQuery(API_URL, $param);
}
/**
... ... @@ -316,6 +349,6 @@ class ReturnsData
$param['type'] = $type;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
}
\ No newline at end of file
... ...
... ... @@ -23,7 +23,7 @@ class UserData
$param['mobile'] = $mobile;
$param['area'] = $area;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -38,7 +38,7 @@ class UserData
$param['method'] = 'app.passport.getProfileByEmail';
$param['email'] = $email;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -54,7 +54,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -99,7 +99,7 @@ class UserData
$param['birthday'] = $params['birthday'];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -115,7 +115,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -142,7 +142,7 @@ class UserData
$param['zip_code'] = $params['zipCode'];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -158,7 +158,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -177,7 +177,7 @@ class UserData
$param['dress'] = $params['dress'];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -192,7 +192,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -209,7 +209,7 @@ class UserData
$param['brand'] = $params['brand'];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -226,7 +226,7 @@ class UserData
$param['udid'] = $udid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -252,7 +252,7 @@ class UserData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -274,7 +274,7 @@ class UserData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -294,7 +294,7 @@ class UserData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -316,7 +316,7 @@ class UserData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -335,7 +335,7 @@ class UserData
$param['fav_id'] = $fav_id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -357,7 +357,7 @@ class UserData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -375,7 +375,7 @@ class UserData
$param['skn'] = $skn;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -391,14 +391,14 @@ class UserData
// $param['uid'] = $uid;
// $param['client_secret'] = Sign::getSign($param);
//
// return Yohobuy::get(Yohobuy::API_URL, $param);
// return Yohobuy::get(API_URL, $param);
$param = Yohobuy::param();
$param['method'] = 'app.yoho.yohocoin';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -419,7 +419,7 @@ class UserData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::$type(Yohobuy::API_URL, $param);
return Yohobuy::$type(API_URL, $param);
}
/**
... ... @@ -442,7 +442,7 @@ class UserData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -458,7 +458,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -474,7 +474,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -490,7 +490,7 @@ class UserData
$param['id'] = $id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -530,7 +530,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -548,7 +548,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -566,7 +566,7 @@ class UserData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -586,7 +586,7 @@ class UserData
$param['method'] = 'app.inbox.getlist';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -607,7 +607,7 @@ class UserData
$param['giftCardCode3'] = $giftCardCode3;
$param['captchaCode'] = $captchaCode;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -624,7 +624,7 @@ class UserData
$param['client_type'] = 'web';
$param['private_key'] = Yohobuy::$privateKeyList['web'];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -645,7 +645,7 @@ class UserData
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
public static function passportGet($uid)
... ... @@ -654,7 +654,7 @@ class UserData
$param['method'] = 'open.passport.get';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -19,7 +19,7 @@ class BackData
$param['method'] = 'app.passport.getArea';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -36,7 +36,7 @@ class BackData
$param['method'] = 'app.register.backpwdByEmail';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -53,7 +53,7 @@ class BackData
$param['code'] = $code;
// 默认返回的不是json类型数据,是html
return Yohobuy::get(Yohobuy::YOHOBUY_URL . 'passport/back/update', $param, true);
return Yohobuy::get(YOHOBUY_URL . 'passport/back/update', $param, true);
}
/**
... ... @@ -72,7 +72,7 @@ class BackData
$param['method'] = 'app.register.sendBackpwdCodeToMobile';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -93,7 +93,7 @@ class BackData
$param['method'] = 'app.register.validBackpwdCode';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -115,7 +115,7 @@ class BackData
$param['method'] = 'app.register.changepwdByMobileCode';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -131,7 +131,7 @@ class BackData
$param['code'] = $code;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -149,7 +149,7 @@ class BackData
$param['newPwd'] = $password;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
}
\ No newline at end of file
... ...
... ... @@ -38,7 +38,7 @@ class BindData
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -56,7 +56,7 @@ class BindData
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -74,7 +74,7 @@ class BindData
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -106,7 +106,7 @@ class BindData
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -130,7 +130,7 @@ class BindData
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -146,7 +146,7 @@ class BindData
$param['area'] = $area;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -167,7 +167,7 @@ class BindData
$param['area'] = $area;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -42,7 +42,7 @@ class LoginData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -58,7 +58,7 @@ class LoginData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -89,7 +89,7 @@ class LoginData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -28,7 +28,7 @@ class RegData
// $param = Yohobuy::param();
// $param['method'] = 'app.passport.getArea';
// $param['client_secret'] = Sign::getSign($param);
// $data = Yohobuy::get(Yohobuy::API_URL, $param);
// $data = Yohobuy::get(API_URL, $param);
// $result = array();
// if (!empty($data['data'])) {
// $build = array();
... ... @@ -126,7 +126,7 @@ class RegData
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -146,7 +146,7 @@ class RegData
$param['code'] = $code;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -173,6 +173,6 @@ class RegData
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
}
\ No newline at end of file
... ...
... ... @@ -39,7 +39,7 @@ class BrandData
$cache = empty($uid) ? 3600 : false;
return Yohobuy::get(Yohobuy::API_URL, $param, $cache); // 有缓存1小时
return Yohobuy::get(API_URL, $param, $cache); // 有缓存1小时
}
/**
... ... @@ -55,7 +55,7 @@ class BrandData
$param['method'] = 'app.brand.banner';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 有缓存1小时
return Yohobuy::get(API_URL, $param, 3600); // 有缓存1小时
}
/**
... ... @@ -71,7 +71,7 @@ class BrandData
$param['method'] = 'web.brand.byDomain';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 600);
return Yohobuy::get(API_URL, $param, 600);
}
/**
... ... @@ -89,7 +89,7 @@ class BrandData
$param['method'] = 'web.brand.folder';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 600);
return Yohobuy::get(API_URL, $param, 600);
}
/**
... ... @@ -107,7 +107,7 @@ class BrandData
$param['method'] = 'web.brand.series';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 600);
return Yohobuy::get(API_URL, $param, 600);
}
/**
... ... @@ -124,7 +124,7 @@ class BrandData
$param['method'] = 'web.html.content';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 600);
return Yohobuy::get(API_URL, $param, 600);
}
/**
... ... @@ -140,7 +140,7 @@ class BrandData
$param['private_key'] = Yohobuy::$privateKeyList[$clientType];
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_BRAND_TOPPOS, $param);
return Yohobuy::get(SERVICE_URL . self::URI_BRAND_TOPPOS, $param);
}
/**
... ... @@ -157,7 +157,7 @@ class BrandData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -175,9 +175,9 @@ class BrandData
$param['brand_id'] = $brandId;
$param['client_secret'] = Sign::getSign($param);
if ($isOnlyUrl) {
return Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
return Yohobuy::httpBuildQuery(API_URL, $param);
}
return Yohobuy::get(Yohobuy::API_URL, $param, 600);
return Yohobuy::get(API_URL, $param, 600);
}
/**
... ... @@ -192,6 +192,6 @@ class BrandData
$param['method'] = 'web.brand.info';
$param['ids'] = is_array($ids) ? implode(',', $ids) : intval($ids);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -38,7 +38,7 @@ class DetailData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -54,7 +54,7 @@ class DetailData
$param['productskn'] = $productSkn;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -78,7 +78,7 @@ class DetailData
$param['limit'] = $pageSize;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -92,7 +92,7 @@ class DetailData
$param['method'] = 'app.consult.common';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -112,7 +112,7 @@ class DetailData
$param['limit'] = $pageSize;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -130,7 +130,7 @@ class DetailData
$param['brandId'] = $brandId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 缓存1小时
return Yohobuy::get(API_URL, $param, 3600); // 缓存1小时
}
/**
... ... @@ -149,7 +149,7 @@ class DetailData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -165,7 +165,7 @@ class DetailData
$param['product_skn'] = $productSkn;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -183,7 +183,7 @@ class DetailData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -201,7 +201,7 @@ class DetailData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -35,10 +35,10 @@ class FavoriteData
$param['client_secret'] = Sign::getSign($param);
//只是返回链接
if ($isOnlyUrl) {
return Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
return Yohobuy::httpBuildQuery(API_URL, $param);
}
return Yohobuy::get(Yohobuy::API_URL, $param);
// return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URL_PRODUCT_FAVORITE, 'getUidProductFav', array($uid, $productSkn));
return Yohobuy::get(API_URL, $param);
// return Yohobuy::yarClient(SERVICE_URL . self::URL_PRODUCT_FAVORITE, 'getUidProductFav', array($uid, $productSkn));
}
/**
... ... @@ -53,7 +53,7 @@ class FavoriteData
// $result = array();
//
// foreach ($productSknList as $skn) {
// Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URL_PRODUCT_FAVORITE, 'getUidProductFav', array($uid, $skn), function($retval) use(&$result, $skn) {
// Yohobuy::yarConcurrentCall(SERVICE_URL . self::URL_PRODUCT_FAVORITE, 'getUidProductFav', array($uid, $skn), function($retval) use(&$result, $skn) {
// $result[$skn] = empty($retval['data']) ? false : $retval['data'];
// });
// }
... ... @@ -71,7 +71,7 @@ class FavoriteData
$param['uid'] = $uid;
$param['type'] = 'product';
$param['client_secret'] = Sign::getSign($param);
$urlList[$productId] = Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
$urlList[$productId] = Yohobuy::httpBuildQuery(API_URL, $param);
}
return Yohobuy::getMulti($urlList);
... ... @@ -92,7 +92,7 @@ class FavoriteData
$param['type'] = $isBrand ? 'brand' : 'product';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -110,7 +110,7 @@ class FavoriteData
$param['type'] = $isBrand ? 'brand' : 'product';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -134,7 +134,7 @@ class FavoriteData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -149,9 +149,9 @@ class FavoriteData
$param['uid'] = $uid;
$param['brand_id'] = $brandId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL. self::URL_ARTICLE_FAVORITE_BRAND, $param);
return Yohobuy::get(SERVICE_URL. self::URL_ARTICLE_FAVORITE_BRAND, $param);
//return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URL_PRODUCT_FAVORITE, 'toggleBrandFav', array($uid, $brandId));
//return Yohobuy::yarClient(SERVICE_URL . self::URL_PRODUCT_FAVORITE, 'toggleBrandFav', array($uid, $brandId));
}
/**
... ... @@ -166,8 +166,8 @@ class FavoriteData
$param['uid'] = $uid;
$param['brandId'] = $brandId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URL_PRODUCT_FAVORITE.'getUidBrandFav', $param);
// return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URL_PRODUCT_FAVORITE, 'getUidBrandFav', array($uid, $brandId));
return Yohobuy::get(SERVICE_URL . self::URL_PRODUCT_FAVORITE.'getUidBrandFav', $param);
// return Yohobuy::yarClient(SERVICE_URL . self::URL_PRODUCT_FAVORITE, 'getUidBrandFav', array($uid, $brandId));
}
/**
... ... @@ -184,7 +184,7 @@ class FavoriteData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -204,7 +204,7 @@ class FavoriteData
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -223,7 +223,7 @@ class FavoriteData
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URL_ARTICLE_FAVORITE. 'getUserFavArticleList', $param);
return Yohobuy::get(SERVICE_URL . self::URL_ARTICLE_FAVORITE. 'getUserFavArticleList', $param);
}
/**
... ... @@ -239,7 +239,7 @@ class FavoriteData
$param['article_id'] = $article_id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URL_ARTICLE_FAVORITE. 'cancelFavorite',$param);
return Yohobuy::get(SERVICE_URL . self::URL_ARTICLE_FAVORITE. 'cancelFavorite',$param);
}
/**
... ... @@ -257,7 +257,7 @@ class FavoriteData
$param['productId'] = $productId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -271,7 +271,7 @@ class FavoriteData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -288,7 +288,7 @@ class FavoriteData
$param['productIds'] = $productId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -25,7 +25,7 @@ class HotrankData extends \LibModels\Wap\Product\SearchData
'channel' => $channel,
'is_concurrent' => $is_concurrent
);
return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_HOTRANK_TAG, 'getTag', $params);
return Yohobuy::yarClient(SERVICE_URL . self::URI_HOTRANK_TAG, 'getTag', $params);
}
/**
... ... @@ -35,7 +35,7 @@ class HotrankData extends \LibModels\Wap\Product\SearchData
*/
public static function getTagById($id, $is_concurrent = true)
{
return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_HOTRANK_TAG, 'getOneTag', array('id' => $id));
return Yohobuy::yarClient(SERVICE_URL . self::URI_HOTRANK_TAG, 'getOneTag', array('id' => $id));
}
}
... ...
... ... @@ -32,7 +32,7 @@ class ItemData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -49,9 +49,9 @@ class ItemData
$param['productskn'] = $productSkn;
$param['client_secret'] = Sign::getSign($param);
if($isOnlyUrl) {
return Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
return Yohobuy::httpBuildQuery(API_URL, $param);
}
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -77,7 +77,7 @@ class ItemData
$param['limit'] = $pageSize;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -91,7 +91,7 @@ class ItemData
$param['method'] = 'app.consult.common';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -111,7 +111,7 @@ class ItemData
$param['limit'] = $pageSize;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -129,7 +129,7 @@ class ItemData
$param['brandId'] = $brandId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 缓存1小时
return Yohobuy::get(API_URL, $param, 3600); // 缓存1小时
}
/**
... ... @@ -148,7 +148,7 @@ class ItemData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -164,7 +164,7 @@ class ItemData
$param['product_skn'] = $productSkn;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -182,7 +182,7 @@ class ItemData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -200,7 +200,7 @@ class ItemData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
* 获取详情页的活动Banner
... ... @@ -220,9 +220,9 @@ class ItemData
$param['client_secret'] = Sign::getSign($param);
//只是返回链接
if($isOnlyUrl) {
return Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
return Yohobuy::httpBuildQuery(API_URL, $param);
}
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -237,7 +237,7 @@ class ItemData
$param['method'] = 'web.productCollocation.list';
$param['product_id'] = $productId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -254,9 +254,9 @@ class ItemData
$param['product_id'] = $productId;
$param['client_secret'] = Sign::getSign($param);
if($isOnlyUrl) {
return Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
return Yohobuy::httpBuildQuery(API_URL, $param);
}
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -273,9 +273,9 @@ class ItemData
$param['product_id'] = $productId;
$param['client_secret'] = Sign::getSign($param);
if($isOnlyUrl) {
return Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
return Yohobuy::httpBuildQuery(API_URL, $param);
}
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -292,9 +292,9 @@ class ItemData
$param['product_skn'] = $productSkn;
$param['client_secret'] = Sign::getSign($param);
if($isOnlyUrl) {
return Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
return Yohobuy::httpBuildQuery(API_URL, $param);
}
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -309,7 +309,7 @@ class ItemData
$param['method'] = 'clear.productCache';
$param['product_skn'] = $productSkn;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -324,6 +324,21 @@ class ItemData
$param['method'] = 'clear.memcache';
$param['key'] = sprintf("yh_gw:queryProductIntro:%s", $productSkn);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
* 商品促销信息
* @param $skn 商品 skn
* @return mixed
*/
public static function promotion($skn)
{
$param = Yohobuy::param();
$param['method'] = 'app.product.promotion';
$param['product_skn'] = $skn;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(API_URL, $param);
}
}
\ No newline at end of file
... ...
... ... @@ -31,7 +31,7 @@ class PayData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -48,7 +48,7 @@ class PayData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -67,7 +67,7 @@ class PayData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -100,7 +100,7 @@ class PayData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
... ... @@ -128,7 +128,7 @@ class PayData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -147,7 +147,7 @@ class PayData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -170,7 +170,7 @@ class PayData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -193,7 +193,7 @@ class PayData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
... ... @@ -217,7 +217,7 @@ class PayData
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -246,7 +246,7 @@ class PayData
$param['bank_bill_no'] = $bankBillNo;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -269,7 +269,7 @@ class PayData
$param['client_secret'] = Sign::getSign($param);
// 调用接口获得数据
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
}
\ No newline at end of file
... ...
... ... @@ -26,7 +26,7 @@ class SaleData
$param['client_secret'] = Sign::getSign($param);
//TODO等待接口发布到测试环境
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -424,7 +424,7 @@ class SearchData
$param['method'] = 'app.brand.getBrandIntro';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
return Yohobuy::httpBuildQuery(API_URL, $param);
}
/**
... ... @@ -446,7 +446,7 @@ class SearchData
$param['price'] = '0';
$param['size_id'] = '0';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 600, false, 5);
return Yohobuy::get(API_URL, $param, 600, false, 5);
}
/**
... ... @@ -499,7 +499,7 @@ class SearchData
'middle_sort_id' => $misort
);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URL_INDEX_AD, $param, 600, false, 1); // 有缓存10分钟
return Yohobuy::get(SERVICE_URL . self::URL_INDEX_AD, $param, 600, false, 1); // 有缓存10分钟
}
... ... @@ -518,7 +518,7 @@ class SearchData
$param['method'] = 'app.search.fuzzy';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -561,7 +561,7 @@ class SearchData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -607,6 +607,6 @@ class SearchData
$param['brand_id'] = $brandId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
\ No newline at end of file
... ...
... ... @@ -6,7 +6,7 @@ use Api\Yohobuy;
use Api\Sign;
/**
* 品牌店铺的接口
* @info http://git.dev.yoho.cn/yoho-documents/api-interfaces/blob/master/%E5%95%86%E5%93%81%E5%88%97%E8%A1%A8/brandShops.md
* @info //git.dev.yoho.cn/yoho-documents/api-interfaces/blob/master/%E5%95%86%E5%93%81%E5%88%97%E8%A1%A8/brandShops.md
* @copyright yoho.inc
* @author xiaoxiao.hao <xiaoxiao.hao@yoho.cn>
*/
... ... @@ -24,7 +24,7 @@ class ShopData
$param['shop_id'] = intval($shopId);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
* 查询店铺介绍接口
... ... @@ -39,7 +39,7 @@ class ShopData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -54,7 +54,7 @@ class ShopData
$param['shop_id'] = intval($shopId);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -69,7 +69,7 @@ class ShopData
$param['shop'] = intval($shopId);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -88,7 +88,7 @@ class ShopData
$param['gender'] = $gender;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -107,7 +107,7 @@ class ShopData
$param['uid'] = $uid;
$param['type'] = $type;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
* 根据domain查找shop_id
... ... @@ -120,6 +120,6 @@ class ShopData
$param['method'] = 'web.brand.byDomain';
$param['domain'] = $domain;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -75,7 +75,7 @@ class SettledData
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param);
return Yohobuy::post(API_URL, $param);
}
/**
... ... @@ -88,7 +88,7 @@ class SettledData
$param['method'] = 'app.category.queryMax';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
/**
... ... @@ -103,6 +103,6 @@ class SettledData
$param['parent_id'] = intval($parentId);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get(API_URL, $param);
}
}
... ...
... ... @@ -219,7 +219,7 @@ class Images
private static function MakeBaseUrl($domain, $key) // => $baseUrl
{
$keyEsc = str_replace("%2F", "/", rawurlencode($key));
return "http://$domain/$keyEsc";
return '//' . $domain . '/' . $keyEsc;
}
private static function MakeTemplateRequest($url)
... ...
<?php
namespace WebPlugin\DataProcess\Channel;
use WebPlugin\Helpers;
abstract class AbstractChannel
{
/* * *
... ... @@ -33,10 +33,10 @@ abstract class AbstractChannel
$temp['newArrivls']['name'] = $resource[$key]['data']['text'];
//textNav模版
foreach ($resource[$key + 1]['data'] as $val) {
$temp['newArrivls']['navs'][] = array('href' => $val['url'], 'name' => $val['name']);
$temp['newArrivls']['navs'][] = array('href' => Helpers::getUrlSafe($val['url']), 'name' => $val['name']);
}
//link模版
$temp['href'] = $resource[$key + 2]['data'][0]['url'];
$temp['href'] = Helpers::getUrlSafe($resource[$key + 2]['data'][0]['url']);
unset($resource[$key], $resource[$key + 1], $resource[$key + 2]);
$result[$key] = $temp;
}
... ...
<?php
namespace WebPlugin\DataProcess\Channel;
use WebPlugin\Helpers;
class Girls extends AbstractChannel
{
... ... @@ -20,10 +20,10 @@ class Girls extends AbstractChannel
$temp['newArrivls']['name'] = $resource[$key]['data']['text'];
//title模版
foreach ($resource[$key + 1]['data']['nav'] as $val) {
$temp['newArrivls']['navs'][] = array('href' => $val['url'], 'name' => $val['name']);
$temp['newArrivls']['navs'][] = array('href' => Helpers::getUrlSafe($val['url']), 'name' => $val['name']);
}
$link = $resource[$key + 2]['data'][0];
$temp['newArrivls']['href'] = $link['url'];
$temp['newArrivls']['href'] = Helpers::getUrlSafe($link['url']);
unset($resource[$key], $resource[$key + 1]);
$result[$key] = $temp;
}
... ...
<?php
namespace WebPlugin\DataProcess\Channel;
use WebPlugin\Helpers;
class Kids extends AbstractChannel
{
... ... @@ -24,7 +24,7 @@ class Kids extends AbstractChannel
$temp['newArrivls']['name'] = $resource[$key]['data']['text'];
//textNav模版
foreach ($resource[$key + 1]['data'] as $val) {
$temp['newArrivls']['navs'][] = array('href' => $val['url'], 'name' => $val['name']);
$temp['newArrivls']['navs'][] = array('href' => Helpers::getUrlSafe($val['url']), 'name' => $val['name']);
}
unset($resource[$key], $resource[$key + 1]);
$result[$key] = $temp;
... ...
<?php
namespace WebPlugin\DataProcess\Channel;
use WebPlugin\Helpers;
class Lifestyle extends AbstractChannel
{
... ... @@ -24,7 +24,7 @@ class Lifestyle extends AbstractChannel
$temp['newArrivls']['name'] = '最新上架 NEW ARRIVALS';
//textNav模版
foreach ($resource[$key]['data'] as $val) {
$temp['newArrivls']['navs'][] = array('href' => $val['url'], 'name' => $val['name']);
$temp['newArrivls']['navs'][] = array('href' => Helpers::getUrlSafe($val['url']), 'name' => $val['name']);
}
unset($resource[$key], $resource[$key + 1]);
$result[$key] = $temp;
... ...
<?php
namespace WebPlugin\DataProcess\Channel;
use WebPlugin\Images;
use WebPlugin\Helpers;
class PlusstarIndex extends AbstractChannel
{
... ... @@ -27,7 +28,7 @@ class PlusstarIndex extends AbstractChannel
if($key == 5 && $resource['template_name'] == 'floor') {//单品列表
foreach($resource['data'] as $pos => $val) {
$val['src'] = Images::getImageUrl($val['src'], 280, 374, 1);
$singleGoods['list'][] = array('href' => $val['url'],'name'=> $val['title'],'img' => $val['src']);
$singleGoods['list'][] = array('href' => Helpers::getUrlSafe($val['url']),'name'=> $val['title'],'img' => $val['src']);
}
$result[$key] = array('singlegoods' => $singleGoods);
}
... ... @@ -39,7 +40,7 @@ class PlusstarIndex extends AbstractChannel
if($key == 7 && $resource['template_name'] == 'floor') { //视频名称
foreach($resource['data'] as $pos => $val) {
$val['src'] = Images::getImageUrl($val['src'], 378, 241, 1);
$video['list'][] = array('href' => $val['url'],'name'=> $val['title'],'img' => $val['src']);
$video['list'][] = array('href' => Helpers::getUrlSafe($val['url']),'name'=> $val['title'],'img' => $val['src']);
}
$result[$key] = array('video' => $video);
}
... ... @@ -54,7 +55,7 @@ class PlusstarIndex extends AbstractChannel
foreach($resource['data'] as $val) {
if(is_numeric($val['name'])) {
$id = $val['name'];
$news['pics']['list'][$id] = array('id' => $id,'href' => $val['url'], 'img'=>'','tips'=>'');
$news['pics']['list'][$id] = array('id' => $id,'href' => Helpers::getUrlSafe($val['url']), 'img'=>'','tips'=>'');
}
}
$result[$key] = array('news' => $news);
... ... @@ -65,7 +66,7 @@ class PlusstarIndex extends AbstractChannel
foreach($resource['data'] as $pos => $val) {
if(is_numeric($val['name'])) {
$id = $val['name'];
$ads['list'][$id] = array('id' => $id,'href' => $val['url'],'img'=>'',);
$ads['list'][$id] = array('id' => $id,'href' => Helpers::getUrlSafe($val['url']),'img'=>'',);
}
}
$result[$key] = array('ads' => $ads);
... ...
... ... @@ -59,19 +59,16 @@ class Process
foreach ($data['navs']['list'] as $val) {
$temp['navs'][] = array(
'id' => '',
'href' => $val['url'],
'href' => Helpers::getUrlSafe($val['url']),
'name' => $val['name']
);
}
$len = count($data['menuNav']['blocks']);
foreach ($data['menuNav']['blocks'] as $key => $val) {
if ($len <= 2 && $key == 0) {
$val['img'] = Images::getImageUrl($val['img'], 185, 152, 1);
}
$val['img'] = Images::getImageUrl($val['img'], 185, 76, 1);
$val['img'] = Images::getImageUrl($val['img'], 185, 152, 1);
$val['url'] = Helpers::transUrl($val['url'], $type);
$temp['tplrecommend']['keyword'][] = array(
'href' => $val['url'],
'href' => Helpers::getUrlSafe($val['url']),
'name' => $val['title'],
'img' => $val['img']
);
... ... @@ -84,7 +81,7 @@ class Process
$val['url'] = Helpers::transUrl($val['url'], $type);
$temp['tplrecommend']['category'][] = array(
'name' => $val['name'],
'href' => $val['url']
'href' => Helpers::getUrlSafe($val['url'])
);
}
... ... @@ -93,7 +90,7 @@ class Process
if ($key == 0) {
$val['img'] = Images::getImageUrl($val['img'], 377, 504, 1); // 大图
$temp['tplrecommend']['brands'][] = array(
'href' => $val['url'],
'href' => Helpers::getUrlSafe($val['url']),
'name' => $val['title'],
'img' => $val['img']
);
... ... @@ -101,7 +98,7 @@ class Process
else {
$val['img'] = Images::getImageUrl($val['img'], 185, 504, 1); // 小图
$temp['tplrecommend']['types'][] = array(
'href' => $val['url'],
'href' => Helpers::getUrlSafe($val['url']),
'name' => $val['title'],
'img' => $val['img']
);
... ... @@ -195,7 +192,7 @@ class Process
if (isset($data['data'][0])) {
$val = $data['data'][0];
$temp['img'] = Images::getImageUrl($val['src'], 1150, 129, 1);
$temp['href'] = $val['url'];
$temp['href'] = Helpers::getUrlSafe($val['url']);
$temp['name'] = $val['title'];
$result['adbanner'] = $temp;
}
... ... @@ -220,26 +217,23 @@ class Process
)
);
foreach ($data['left'] as $val) {
$val['img'] = Images::getImageUrl($val['img'], 280, 265, 1);
$result['debrisSlider']['left'][] = array(
'img' => $val['img'],
'href' => $val['url'],
'img' => Images::getImageUrl($val['img'], 280, 265, 1),
'href' => Helpers::getUrlSafe($val['url']),
'name' => $val['title']
);
}
foreach ($data['center'] as $val) {
$val['img'] = Images::getImageUrl($val['img'], 570, 633, 1);
$result['debrisSlider']['center'][] = array(
'img' => $val['img'],
'href' => $val['url'],
'img' => Images::getImageUrl($val['img'], 570, 633, 1),
'href' => Helpers::getUrlSafe($val['url']),
'name' => $val['title']
);
}
foreach ($data['right'] as $val) {
$val['img'] = Images::getImageUrl($val['img'], 280, 449, 1);
$result['debrisSlider']['right'][] = array(
'img' => $val['img'],
'href' => $val['url'],
'img' => Images::getImageUrl($val['img'], 280, 449, 1),
'href' => Helpers::getUrlSafe($val['url']),
'name' => $val['title']
);
}
... ... @@ -393,7 +387,7 @@ class Process
}
$result['singlehot']['imgHot'][] = array(
'href' => $val['url'],
'href' => Helpers::getUrlSafe($val['url']),
'img' => $val['src'],
'name' => $val['alt']
);
... ... @@ -541,7 +535,7 @@ class Process
foreach ($data[$key + 2]['data'] as $val) {
$val['src'] = Images::getImageUrl($val['src'], 650, 400, 1);
$result['accordion']['slide'][] = array(
'href' => $val['url'],
'href' => Helpers::getUrlSafe($val['url']),
'img' => $val['src'],
'name' => $val['title']
);
... ... @@ -581,14 +575,14 @@ class Process
if ($listKey == 0 || $listKey == 7) {
$val['src'] = Images::getImageUrl($val['src'], 377, 504, 1);
$result['newReport']['list'][] = array(
'href' => $val['url'],
'href' => Helpers::getUrlSafe($val['url']),
'img' => $val['src']
);
}
else {
$val['src'] = Images::getImageUrl($val['src'], 185, 248, 1);
$result['newReport']['list'][] = array(
'href' => $val['url'],
'href' => Helpers::getUrlSafe($val['url']),
'img' => $val['src']
);
}
... ... @@ -686,7 +680,7 @@ class Process
if ($key2 == 0 || $key2 == 4) { // 两个大图
$val['img'] = Images::getImageUrl($val['img'], 378, 248, 1); // 大图
$result['tplrecommend']['brands'][] = array(
'href' => $val['url'],
'href' => Helpers::getUrlSafe($val['url']),
'name' => $val['title'],
'img' => $val['img']
);
... ... @@ -694,7 +688,7 @@ class Process
else {
$val['img'] = Images::getImageUrl($val['img'], 185, 248, 1); // 小图
$result['tplrecommend']['types'][] = array(
'href' => $val['url'],
'href' => Helpers::getUrlSafe($val['url']),
'name' => $val['title'],
'img' => $val['img']
);
... ... @@ -705,7 +699,7 @@ class Process
foreach ($data[$key + 1]['data'] as $val) {
$val['src'] = Images::getImageUrl($val['src'], 222, 298, 1); // 小图
$result['tplrecommend']['products'][] = array(
'href' => $val['url'],
'href' => Helpers::getUrlSafe($val['url']),
'name' => $val['title'],
'img' => $val['src']
);
... ... @@ -735,7 +729,7 @@ class Process
continue;
}
$result[] = array(
'href' => $val['url'],
'href' => Helpers::getUrlSafe($val['url']),
'name' => $val['name']
);
}
... ...
<?php
/**
* AES, 128 ECB模式加密数据
*/
namespace WebPlugin;
class Encryption {
//密钥
private static $_secretKey = 'yoho9646abcdefgh';
//前面补8位0
private static $_preString = '00000000';
/**
* 加密方法
* @param string $str
* @return string
*/
public static function encrypt($str){
$str = self::$_preString.$str;
//AES, 128 ECB模式加密数据
$secretKey = self::$_secretKey;
$str = trim($str);
$str = self::addPKCS7Padding($str);
$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128,MCRYPT_MODE_ECB),MCRYPT_RAND);
$encrypt_str = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $secretKey, $str, MCRYPT_MODE_ECB, $iv);
return base64_encode($encrypt_str);
}
/**
* 解密方法
* @param string $str
* @return string
*/
public static function decrypt($str){
//AES, 128 ECB模式加密数据
$secretKey = self::$_secretKey;
$str = base64_decode($str);
$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128,MCRYPT_MODE_ECB),MCRYPT_RAND);
$encrypt_str = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $secretKey, $str, MCRYPT_MODE_ECB, $iv);
$encrypt_str = trim($encrypt_str);
$encrypt_str = self::stripPKSC7Padding($encrypt_str);
$encrypt_str = ltrim($encrypt_str, self::$_preString);
return $encrypt_str;
}
/**
* 填充算法
* @param string $source
* @return string
*/
private static function addPKCS7Padding($source){
$source = trim($source);
$block = mcrypt_get_block_size('rijndael-128', 'ecb');
$pad = $block - (strlen($source) % $block);
if ($pad <= $block) {
$char = chr($pad);
$source .= str_repeat($char, $pad);
}
return $source;
}
/**
* 移去填充算法
* @param string $source
* @return string
*/
private static function stripPKSC7Padding($source){
$source = trim($source);
$char = substr($source, -1);
$num = ord($char);
if($num==62)return $source;
$source = substr($source,0,-$num);
return $source;
}
}
\ No newline at end of file
... ...
... ... @@ -808,6 +808,8 @@ class HelperSearch
$color = $filter['color'];
if (isset($color['color_id'])) {
$checked = isset(self::$params['color']) && self::$params['color'] ==$color['color_id'] ? true : false;
$color['color_value'] = empty($color['color_value']) ? '' : Helpers::getUrlSafe($color['color_value']);
$result[] = array(
'name' => $color['color_name'],
'rgb' => empty($color['color_value']) ? '#' . $color['color_code'] : "url({$color['color_value']})",
... ... @@ -821,6 +823,7 @@ class HelperSearch
else {
foreach ($color as $v) {
$checked = false;
$v['color_value'] = empty($v['color_value']) ? '' : Helpers::getUrlSafe($v['color_value']);
//设置已选中
if ($v['color_id'] == $colorId) {
$background = empty($v['color_value']) ? '#' . $v['color_code'] : "url(" . $v['color_value'] . ")";
... ... @@ -1269,7 +1272,7 @@ class HelperSearch
if (empty($params)) {
return self::current();
}
$queryPath = explode('?', $_SERVER['REQUEST_URI']);
$queryPath = explode('?', Helpers::getUrlSafe($_SERVER['REQUEST_URI']));
$params_arr = array();
//店铺装修,添加额外参数
if (empty($params['shopId']) && isset($_REQUEST['shopId'])) {
... ... @@ -1406,7 +1409,7 @@ class HelperSearch
public static function current()
{
$urlParam = array();
$url = explode('?', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
$url = explode('?', '//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
if (!empty(self::$specialsaleParam)) {
$url[0] .= '?' . http_build_query(self::$specialsaleParam);
}
... ... @@ -1420,7 +1423,7 @@ class HelperSearch
if (!empty($urlParam)) {
$url[0] .= '?' . http_build_query($urlParam);
}
return $url[0];
return Helpers::getUrlSafe($url[0]);
}
/**
... ... @@ -1437,7 +1440,7 @@ class HelperSearch
$nextUrl = self::buildUrl($param);
$next = array(
'href' => $nextUrl,
'src' => 'http://img10.static.yhbimg.com/product/2014/01/15/11/01fa01614784f6239760f1b749663016f1.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
'src' => '//img10.static.yhbimg.com/product/2014/01/15/11/01fa01614784f6239760f1b749663016f1.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
);
}
return $next;
... ... @@ -1796,7 +1799,7 @@ class HelperSearch
if (isset(self::$params['query']) && !empty(self::$params['query'])) {
$data['keyWord'] = self::$params['query'];
}
$data['searchActionUrl'] = 'http://search.yohobuy.com';
$data['searchActionUrl'] = '//search.yohobuy.com';
return $data;
}
... ... @@ -1822,14 +1825,17 @@ class HelperSearch
*/
public static function pinYin($zh){
$ret = "";
if(mb_detect_encoding($zh, array('GB2312','GBK','UTF-8'))!='UTF-8'){
$zh = '';
}
@$s1 = iconv("UTF-8","gbk//ignore", $zh);
@$s2 = iconv("gbk//ignore","UTF-8", $s1);
if($s2 == $zh){$zh = $s1;}
for($i = 0; $i < strlen($zh); $i++){
$s1 = substr($zh,$i,1);
$s1 = mb_substr($zh,$i,1);
$p = ord($s1);
if($p > 160){
$s2 = substr($zh,$i++,2);
$s2 = mb_substr($zh,$i++,2);
$ret .= self::getfirstchar($s2);
}else{
$ret .= $s1;
... ... @@ -1849,6 +1855,10 @@ class HelperSearch
if ($fchar >= ord("A") and $fchar <= ord("z") ) {
return strtoupper($s0{0});
}
if(mb_detect_encoding($s0, array('GB2312','GBK','UTF-8'))!='UTF-8') {
return '';
}
$s1 = @iconv("UTF-8","gbk//ignore", $s0);
$s2 = @iconv("gbk//ignore","UTF-8", $s1);
if ($s2 == $s0) {
... ...
... ... @@ -24,16 +24,16 @@ class Helpers
switch ($module) {
case 'default':
$url = 'http://www.yohobuy.com';
$url = '//www.yohobuy.com';
break;
case 'guang': // 逛
$url = 'http://guang' . SUB_DOMAIN;
$url = '//guang' . SUB_DOMAIN;
break;
case 'list': // 商品列表
$url = 'http://list' . SUB_DOMAIN;
$url = '//list' . SUB_DOMAIN;
break;
case 'search': // 搜索
$url = 'http://search' . SUB_DOMAIN;
$url = '//search' . SUB_DOMAIN;
break;
case 'index': // 默认
$url = SITE_MAIN;
... ... @@ -41,7 +41,7 @@ class Helpers
case '': // 相对地址
break;
default: // 其它子域名
$url = 'http://' . $module . SUB_DOMAIN;
$url = '//' . $module . SUB_DOMAIN;
}
$url .= $uri;
if (!empty($param)) {
... ... @@ -62,7 +62,7 @@ class Helpers
*/
public static function getImageUrl($url, $width, $height, $mode = 2)
{
return strtr($url, array('{width}' => $width, '{height}' => $height, '{mode}' => $mode));
return self::getUrlSafe(strtr($url, array('{width}' => $width, '{height}' => $height, '{mode}' => $mode)));
}
/**
... ... @@ -73,7 +73,7 @@ class Helpers
*/
public static function getFilterUrl($url)
{
$url = strtr($url, array('.m.yohobuy.com' => SUB_DOMAIN, OLD_MAIN => SITE_MAIN, 'www.yohobuy.com' => SITE_MAIN));
$url = self::getUrlSafe(strtr($url, array('.m.yohobuy.com' => SUB_DOMAIN, OLD_MAIN => SITE_MAIN, 'www.yohobuy.com' => SITE_MAIN)));
$filter = strstr($url, 'openby:yohobuy=', true);
if ($filter) {
return rtrim(rtrim($filter, '?'), '&');
... ... @@ -581,7 +581,7 @@ class Helpers
if(!empty($url) && stripos($url, '?') !== false){
$extra = '&channel='.$channel;
}
return $url . $extra;
return self::getUrlSafe($url . $extra);
}
... ... @@ -1003,7 +1003,7 @@ class Helpers
if (empty($cn_alphabet)) {
$cn_alphabet = 'goods.html';
}
return 'http://item.yohobuy.com/product/pro_' . $product_id . '_' . $goods_id . '/' . $cn_alphabet. '.html';
return '//item.yohobuy.com/product/pro_' . $product_id . '_' . $goods_id . '/' . $cn_alphabet. '.html';
}
/**
... ... @@ -1090,7 +1090,11 @@ class Helpers
{
return preg_match("/[\x7f-\xff]/", $str);
}
<<<<<<< HEAD
=======
>>>>>>> master
/**
* 将首字符为//的url转换为http://
*
... ... @@ -1105,7 +1109,7 @@ class Helpers
/**
* http和https转换成//
* @param type $url 地址
* @return type string
* @return type string
*/
public static function getUrlSafe($url)
{
... ...
... ... @@ -7,13 +7,13 @@
*/
namespace WebPlugin;
use WebPlugin\Helpers;
class Images
{
private static $domain = '.static.yhbimg.com';
private static $default_image = '/2015/08/25/02/01dd632a6e07bfef457ce4beda21dd6413.png';
private static $defaultHeadIco = 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif';
private static $defaultHeadIco = '//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif';
private static $domainList = array(
'01' => array(
'img10.static.yhbimg.com',
... ... @@ -52,7 +52,7 @@ class Images
return $fileName;
}
$domain = self::getDomain($bucket, $fileName);
return 'http://' . $domain . '/' . $bucket . $fileName;
return '//' . $domain . '/' . $bucket . $fileName;
}
/**
... ... @@ -66,13 +66,18 @@ class Images
*/
public static function getImageUrl($fileName, $width, $height, $mode = 2, $bucket = 'goodsimg')
{
if (substr($fileName, 0, 2) === '//') {
//防止多次调用getImageUrl
$fileName = 'http:' . $fileName;
}
if (!is_string($fileName)) {
return self::template(self::$default_image, $bucket, $mode);
}
if (stripos($fileName, 'http://') !== 0) {
$fileName = self::template($fileName, $bucket, $mode);
}
return strtr($fileName, array('{width}' => $width, '{height}' => $height, '{mode}' => $mode));
return Helpers::getUrlSafe(strtr($fileName, array('{width}' => $width, '{height}' => $height, '{mode}' => $mode)));
}
/**
... ... @@ -155,6 +160,7 @@ class Images
$images[$files['name']] = $files['tmp_name'];
}
//return self::uploadStreamImage($images);
return self::uploadStreamImage($images, $path);
}
... ... @@ -216,7 +222,7 @@ class Images
$imgRelUrl = current($result['data']['imagesList']);
$imgList['imgList'][] = array(
//'imgUrl' => self::getSourceUrl($imgRelUrl, 'suggest') . $imgExtra,
'imgUrl' => self::getSourceUrl($imgRelUrl, $path) . $imgExtra,
$img['imgUrl'] = self::getSourceUrl($imgRelUrl, $path) . $imgExtra,
'imgRelUrl' => $imgRelUrl
);
}
... ... @@ -256,7 +262,7 @@ class Images
$imageUrl = preg_replace('@\?imageMogr2.+@is', '', $imageUrl);
}
}
return $imageUrl;
return Helpers::getUrlSafe($imageUrl);
}
/**
... ... @@ -280,7 +286,7 @@ class Images
private static function MakeBaseUrl($domain, $key) // => $baseUrl
{
$keyEsc = str_replace("%2F", "/", rawurlencode($key));
return "http://$domain/$keyEsc";
return "//$domain/$keyEsc";
}
private static function MakeTemplateRequest($url)
... ...
... ... @@ -123,7 +123,7 @@ class Mobile
{
if (empty($_COOKIE['m2w']) && self::isMobile()) {
header("HTTP/1.1 301 Moved Permanently");
header('Location:http://'.self::getNewUrl());
header('Location://'.self::getNewUrl());
exit();
}
return true;
... ...
... ... @@ -14,6 +14,6 @@ return array(
'cacert' => dirname(__FILE__) .'/cacert.pem',
// 访问模式,根据自己的服务器是否支持ssl访问,若支持请选择https;若不支持请选择http
'transport' => 'http',
// 页面跳转同步通知页面路径 (需http://格式的完整路径,不允许加?id=123这类自定义参数)
'return_url' => SITE_MAIN . '/passport/autosign/alipaycallback',
// 页面跳转同步通知页面路径 (需//格式的完整路径,不允许加?id=123这类自定义参数)
'return_url' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN) . '/passport/autosign/alipaycallback',
);
... ...
... ... @@ -4,6 +4,6 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']);
return array(
'appId' => '03b4e36bf13dc75a0b1eaa43d3b9560e',
'appKey' => 'f16d5913e8610672',
'callback' => SITE_MAIN . '/passport/autosign/doubanback',
'callback' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN). '/passport/autosign/doubanback',
'scope' => 'douban_basic_common',
);
\ No newline at end of file
... ...
... ... @@ -89,7 +89,7 @@ class Call extends Factory
/**
* 获取当前用户的偶像(关注)列表
*
* @see http://wiki.connect.qq.com/get_idollist
* @see //wiki.connect.qq.com/get_idollist
* @param string $access_token 访问令牌
* @param string $openid 腾讯唯一的对应QQ号
* @param array $params 参数列表
... ...
... ... @@ -4,7 +4,7 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']);
return array(
'appid' => '100229394',
'appkey' => 'c0af9c29e0900813028c2ccb42021792',
'callback' => SITE_MAIN . '/passport/autosign/qqcallback',
'callback' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN) . '/passport/autosign/qqcallback',
'scope' => 'get_user_info,add_share,upload_pic,get_idollist,get_fanslist',
'errorReport' => true,
);
\ No newline at end of file
... ...
... ... @@ -72,7 +72,7 @@ class Call extends Factory
/**
* 获取当前用户的基本资料
*
* @see http://open.renren.com/wiki/API/v2/user/get
* @see //open.renren.com/wiki/API/v2/user/get
* @param object $token 授权成功的TOKEN, 默认为NULL
* @return array
*/
... ... @@ -114,7 +114,7 @@ class Call extends Factory
/**
* 获取当前用户的偶像(关注)列表
*
* @see http://open.renren.com/wiki/V2/friend/list
* @see //open.renren.com/wiki/V2/friend/list
* @param object $token 访问令牌
* @param array $params 参数列表
* Long $userId 用户ID。该字段默认为当前用户
... ... @@ -163,7 +163,7 @@ class Call extends Factory
*
* 发送自定义新鲜事。新鲜事会发布用户的个人动态信息到用户人人网主页,同时会出现在好友的新鲜事中
*
* @see http://open.renren.com/wiki/API/v2/feed/put
* @see //open.renren.com/wiki/API/v2/feed/put
* @param object $token 访问令牌
* @param String $image 新鲜事图片地址
* @param String $content 新鲜事主体内容 注意:最多200个字符。
... ...
... ... @@ -4,6 +4,6 @@ defined('SITE_MAIN') || define('SITE_MAIN', $_SERVER['HTTP_HOST']);
return array(
'appId' => '783130c654c94a77ace97054ae266019',
'appKey' => '05e430de8c1e40d3a1f39ca8d3f8252c',
'callback' => SITE_MAIN . '/passport/autosign/renrenback',
'callback' => WebPlugin\Helpers::transHttpsUrl(SITE_MAIN). '/passport/autosign/renrenback',
'scope' => 'publish_feed,photo_upload',
);
\ No newline at end of file
... ...
... ... @@ -11,11 +11,11 @@ class RennClientBase {
/**
* token终端
*/
const TOKEN_ENDPOINT = 'http://graph.renren.com/oauth/token';
const TOKEN_ENDPOINT = '//graph.renren.com/oauth/token';
/**
* 授权终端
*/
const AUTHORIZATION_ENDPOINT = 'http://graph.renren.com/oauth/grant';
const AUTHORIZATION_ENDPOINT = '//graph.renren.com/oauth/grant';
/**
* API host
*/
... ...
... ... @@ -3,7 +3,7 @@
class AlbumService extends RennServiceBase {
/**
* 以分页的方式获取某个用户的相册列表
* <br />对应API:{$link http://dev.renren.com/API/v2/album/list }
* <br />对应API:{$link //dev.renren.com/API/v2/album/list }
* @param Long $ownerId 相册所有者的ID
* @param Integer $pageSize 页面大小。取值范围1-100,默认大小20
* @param Integer $pageNumber 页码。取值大于零,默认值为1
... ... @@ -26,7 +26,7 @@ class AlbumService extends RennServiceBase {
}
/**
* 获取某个用户的某个相册
* <br />对应API:{$link http://dev.renren.com/API/v2/album/get }
* <br />对应API:{$link //dev.renren.com/API/v2/album/get }
* @param Long $albumId 相册的ID
* @param Long $ownerId 相册所有者的ID
* @return Album 相册
... ... @@ -45,7 +45,7 @@ class AlbumService extends RennServiceBase {
}
/**
* 创建一个相册
* <br />对应API:{$link http://dev.renren.com/API/v2/album/put }
* <br />对应API:{$link //dev.renren.com/API/v2/album/put }
* @param String $location 相册拍摄的地点。不能超过60个字符。
* @param String $description 相册的描述。不能超过200个字符。
* @param String $name 相册的名字。不能超过30个字符
... ...
... ... @@ -3,7 +3,7 @@
class AppService extends RennServiceBase {
/**
* 获取某个应用的信息,部分信息取自缓存,不能立即生效
* <br />对应API:{$link http://dev.renren.com/API/v2/app/get }
* <br />对应API:{$link //dev.renren.com/API/v2/app/get }
* @return App App
*/
function getApp() {
... ...