Authored by htoooth

增加了搜索商品池的接口

@@ -550,7 +550,7 @@ class ShopModel @@ -550,7 +550,7 @@ class ShopModel
550 * @param type $data 550 * @param type $data
551 * @return type [] 551 * @return type []
552 */ 552 */
553 - public static function newProducts($data) 553 + public static function newProducts($data, $opts)
554 { 554 {
555 $result = array(); 555 $result = array();
556 556
@@ -572,7 +572,7 @@ class ShopModel @@ -572,7 +572,7 @@ class ShopModel
572 * @param type $data 572 * @param type $data
573 * @return type [] 573 * @return type []
574 */ 574 */
575 - public static function hotProducts($data) 575 + public static function hotProducts($data,$opts)
576 { 576 {
577 $result = array(); 577 $result = array();
578 578
@@ -18,14 +18,19 @@ class IndexController extends WebAction @@ -18,14 +18,19 @@ class IndexController extends WebAction
18 */ 18 */
19 public function brandAction() 19 public function brandAction()
20 { 20 {
  21 + $this->shopHome('20');
  22 + exit();
21 //品牌域名,没有获取到品牌域名的跳转首页 23 //品牌域名,没有获取到品牌域名的跳转首页
22 $domain = $this->param('named'); 24 $domain = $this->param('named');
  25 + $domain = 'colormad';
23 26
24 if (empty($domain)) { 27 if (empty($domain)) {
25 $this->go(SITE_MAIN); 28 $this->go(SITE_MAIN);
26 } 29 }
27 //根据品牌域名获取品牌id(同时判断品牌域名是否有效),无效跳转首页 30 //根据品牌域名获取品牌id(同时判断品牌域名是否有效),无效跳转首页
28 $result = BrandsModel::getBrandByDomain($domain); 31 $result = BrandsModel::getBrandByDomain($domain);
  32 + print_r($result);
  33 + exit();
29 if (!$result) { 34 if (!$result) {
30 $this->go(SITE_MAIN); 35 $this->go(SITE_MAIN);
31 } 36 }
@@ -504,7 +509,9 @@ class IndexController extends WebAction @@ -504,7 +509,9 @@ class IndexController extends WebAction
504 public function shopListAction() 509 public function shopListAction()
505 { 510 {
506 $shopId = $this->get('shopId', 0); 511 $shopId = $this->get('shopId', 0);
507 - if (empty($shopId)) { 512 + $poolId = $this->get('poolId', 0);
  513 +
  514 + if (empty($shopId) && empty($poolId)) {
508 $this->go(SITE_MAIN); 515 $this->go(SITE_MAIN);
509 } 516 }
510 517
@@ -514,10 +521,17 @@ class IndexController extends WebAction @@ -514,10 +521,17 @@ class IndexController extends WebAction
514 // 设置头部数据 521 // 设置头部数据
515 $this->setWebNavHeader(); 522 $this->setWebNavHeader();
516 523
  524 + // condition
  525 + $condition = array();
  526 +
  527 + if (!empty($poolId)) {
  528 + $condition['filter_poolId'] = $poolId;
  529 + } else {
  530 + $condition['shop'] = $shopId;
  531 + }
  532 +
517 $parameters = array( 533 $parameters = array(
518 - 'condition' => array(  
519 - 'shop' => $shopId  
520 - ), 534 + 'condition' => $condition,
521 'options' => array( 535 'options' => array(
522 'controller' => 'Index', 536 'controller' => 'Index',
523 'action' => 'index', 537 'action' => 'index',
@@ -12,18 +12,18 @@ defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'developer'); @@ -12,18 +12,18 @@ defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'developer');
12 define('EXHIBITION_TICKET', 51335912);//展览票skn 12 define('EXHIBITION_TICKET', 51335912);//展览票skn
13 13
14 #test环境 14 #test环境
15 -define('API_URL', 'http://testapi.yoho.cn:28078/');  
16 -define('SERVICE_URL', 'http://testservice.yoho.cn:28077/');  
17 -define('YOHOBUY_URL', 'http://www.yohobuy.com/');  
18 -define('SERVICE_NOTIFY', 'http://testservice.yoho.cn:28077/');  
19 -define('API_OLD', 'http://test2.open.yohobuy.com/'); 15 +//define('API_URL', 'http://testapi.yoho.cn:28078/');
  16 +//define('SERVICE_URL', 'http://testservice.yoho.cn:28077/');
  17 +//define('YOHOBUY_URL', 'http://www.yohobuy.com/');
  18 +//define('SERVICE_NOTIFY', 'http://testservice.yoho.cn:28077/');
  19 +//define('API_OLD', 'http://test2.open.yohobuy.com/');
20 20
21 #dev环境 21 #dev环境
22 -// define('API_URL', 'http://devapi.yoho.cn:58078/');  
23 -// define('SERVICE_URL', 'http://devservice.yoho.cn:58077/');  
24 -// define('YOHOBUY_URL', 'http://www.yohobuy.com/');  
25 -// define('SERVICE_NOTIFY', 'http://test2.open.yohobuy.com/');  
26 -// define('API_OLD', 'http://devservice.yoho.cn:58077/'); 22 + define('API_URL', 'http://dev-api.yohops.com:9999/');
  23 + define('SERVICE_URL', 'http://dev-service.yohops.com:9999/');
  24 + define('YOHOBUY_URL', 'http://www.yohobuy.com/');
  25 + define('SERVICE_NOTIFY', 'http://test2.open.yohobuy.com/');
  26 + define('API_OLD', 'http://devservice.yoho.cn:58077/');
27 27
28 $application = new Application(APPLICATION_PATH . '/configs/application.developer.ini'); 28 $application = new Application(APPLICATION_PATH . '/configs/application.developer.ini');
29 $application->bootstrap()->run(); 29 $application->bootstrap()->run();