...
|
...
|
@@ -9,6 +9,7 @@ |
|
|
|
|
|
use Action\AbstractAction;
|
|
|
use LibModels\Wap\Shop\ShopData;
|
|
|
use Plugin\Helpers;
|
|
|
|
|
|
class IndexController extends AbstractAction
|
|
|
{
|
...
|
...
|
@@ -36,11 +37,23 @@ class IndexController extends AbstractAction |
|
|
*/
|
|
|
public function categoryAction()
|
|
|
{
|
|
|
$requestData = filter_input_array(INPUT_GET, array(
|
|
|
'shopId' => FILTER_DEFAULT,
|
|
|
));
|
|
|
if (empty($requestData['shopId'])) {
|
|
|
$this->go(SITE_MAIN);
|
|
|
}
|
|
|
$result = array();
|
|
|
// 假数据
|
|
|
$result = $this->getCategoryContent();
|
|
|
$result2 = ShopData::getShopIntro(356);
|
|
|
|
|
|
$resource = array();
|
|
|
$resource['category'] = ShopData::getShopCategory($requestData['shopId'], Helpers::getChannelByCookie(), Helpers::getGenderByCookie());
|
|
|
$resource['brands'] = ShopData::getShopBrands($requestData['shopId']);
|
|
|
if($resource['category']['code'] === 200){
|
|
|
$result['category'] = $resource['category']['data'];
|
|
|
}
|
|
|
if($resource['brands']['code'] === 200){
|
|
|
$result['brands'] = $resource['brands']['data'];
|
|
|
}
|
|
|
ShopData::debugOut($result);
|
|
|
return $this->_view->display('category', array(
|
|
|
'content' => $result,
|
|
|
));
|
...
|
...
|
@@ -61,7 +74,7 @@ class IndexController extends AbstractAction |
|
|
}
|
|
|
$result = array();
|
|
|
$resource = ShopData::getShopIntro($requestData['shopId']);
|
|
|
if($resource['code'] === 200){
|
|
|
if ($resource['code'] === 200) {
|
|
|
$result = $resource['data'];
|
|
|
}
|
|
|
return $this->_view->display('intro', array(
|
...
|
...
|
@@ -78,8 +91,7 @@ class IndexController extends AbstractAction |
|
|
*/
|
|
|
public function getCategoryContent()
|
|
|
{
|
|
|
return array(
|
|
|
// 数据模拟
|
|
|
return array(// 数据模拟
|
|
|
);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -90,8 +102,7 @@ class IndexController extends AbstractAction |
|
|
*/
|
|
|
public function getIntroContent()
|
|
|
{
|
|
|
return array(
|
|
|
// 数据模拟
|
|
|
return array(// 数据模拟
|
|
|
);
|
|
|
}
|
|
|
|
...
|
...
|
|