Authored by htoooth

增加了搜索商品池的接口

... ... @@ -550,7 +550,7 @@ class ShopModel
* @param type $data
* @return type []
*/
public static function newProducts($data)
public static function newProducts($data, $opts)
{
$result = array();
... ... @@ -572,7 +572,7 @@ class ShopModel
* @param type $data
* @return type []
*/
public static function hotProducts($data)
public static function hotProducts($data,$opts)
{
$result = array();
... ...
... ... @@ -18,14 +18,19 @@ class IndexController extends WebAction
*/
public function brandAction()
{
$this->shopHome('20');
exit();
//品牌域名,没有获取到品牌域名的跳转首页
$domain = $this->param('named');
$domain = 'colormad';
if (empty($domain)) {
$this->go(SITE_MAIN);
}
//根据品牌域名获取品牌id(同时判断品牌域名是否有效),无效跳转首页
$result = BrandsModel::getBrandByDomain($domain);
print_r($result);
exit();
if (!$result) {
$this->go(SITE_MAIN);
}
... ... @@ -504,7 +509,9 @@ class IndexController extends WebAction
public function shopListAction()
{
$shopId = $this->get('shopId', 0);
if (empty($shopId)) {
$poolId = $this->get('poolId', 0);
if (empty($shopId) && empty($poolId)) {
$this->go(SITE_MAIN);
}
... ... @@ -514,10 +521,17 @@ class IndexController extends WebAction
// 设置头部数据
$this->setWebNavHeader();
// condition
$condition = array();
if (!empty($poolId)) {
$condition['filter_poolId'] = $poolId;
} else {
$condition['shop'] = $shopId;
}
$parameters = array(
'condition' => array(
'shop' => $shopId
),
'condition' => $condition,
'options' => array(
'controller' => 'Index',
'action' => 'index',
... ...
... ... @@ -12,18 +12,18 @@ defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'developer');
define('EXHIBITION_TICKET', 51335912);//展览票skn
#test环境
define('API_URL', 'http://testapi.yoho.cn:28078/');
define('SERVICE_URL', 'http://testservice.yoho.cn:28077/');
define('YOHOBUY_URL', 'http://www.yohobuy.com/');
define('SERVICE_NOTIFY', 'http://testservice.yoho.cn:28077/');
define('API_OLD', 'http://test2.open.yohobuy.com/');
//define('API_URL', 'http://testapi.yoho.cn:28078/');
//define('SERVICE_URL', 'http://testservice.yoho.cn:28077/');
//define('YOHOBUY_URL', 'http://www.yohobuy.com/');
//define('SERVICE_NOTIFY', 'http://testservice.yoho.cn:28077/');
//define('API_OLD', 'http://test2.open.yohobuy.com/');
#dev环境
// define('API_URL', 'http://devapi.yoho.cn:58078/');
// define('SERVICE_URL', 'http://devservice.yoho.cn:58077/');
// define('YOHOBUY_URL', 'http://www.yohobuy.com/');
// define('SERVICE_NOTIFY', 'http://test2.open.yohobuy.com/');
// define('API_OLD', 'http://devservice.yoho.cn:58077/');
define('API_URL', 'http://dev-api.yohops.com:9999/');
define('SERVICE_URL', 'http://dev-service.yohops.com:9999/');
define('YOHOBUY_URL', 'http://www.yohobuy.com/');
define('SERVICE_NOTIFY', 'http://test2.open.yohobuy.com/');
define('API_OLD', 'http://devservice.yoho.cn:58077/');
$application = new Application(APPLICATION_PATH . '/configs/application.developer.ini');
$application->bootstrap()->run();
\ No newline at end of file
... ...