...
|
...
|
@@ -2,6 +2,8 @@ |
|
|
|
|
|
use Action\AbstractAction;
|
|
|
use Plugin\Helpers;
|
|
|
use LibModels\Wap\Product\ShopData;
|
|
|
use Product\ListModel;
|
|
|
|
|
|
/**
|
|
|
* 商品列表相关的控制器
|
...
|
...
|
@@ -13,13 +15,13 @@ class IndexController extends AbstractAction |
|
|
/**
|
|
|
* 品类商品列表页
|
|
|
*
|
|
|
* @param string $gender "1,3"表示男, "2,3"表示女, "1,2,3"表示全部
|
|
|
* @param integer $brand 品牌Id
|
|
|
* @param integer $sort 品类查询sort参数
|
|
|
* @param integer $color 颜色Id
|
|
|
* @param integer $size 尺码Id
|
|
|
* @param string $price 价格
|
|
|
* @param string $p_d 折扣
|
|
|
* @param string $gender "1,3"表示男, "2,3"表示女, "1,2,3"表示全部
|
|
|
* @param integer $brand 品牌Id
|
|
|
* @param integer $sort 品类查询sort参数
|
|
|
* @param integer $color 颜色Id
|
|
|
* @param integer $size 尺码Id
|
|
|
* @param string $price 价格
|
|
|
* @param string $p_d 折扣
|
|
|
*/
|
|
|
public function indexAction()
|
|
|
{
|
...
|
...
|
@@ -109,12 +111,12 @@ class IndexController extends AbstractAction |
|
|
/**
|
|
|
* 品牌商品列表页
|
|
|
*
|
|
|
* @param string $gender "1,3"表示男, "2,3"表示女, "1,2,3"表示全部
|
|
|
* @param integer $sort 品类查询sort参数
|
|
|
* @param integer $color 颜色Id
|
|
|
* @param integer $size 尺码Id
|
|
|
* @param string $price 价格
|
|
|
* @param string $p_d 折扣
|
|
|
* @param string $gender "1,3"表示男, "2,3"表示女, "1,2,3"表示全部
|
|
|
* @param integer $sort 品类查询sort参数
|
|
|
* @param integer $color 颜色Id
|
|
|
* @param integer $size 尺码Id
|
|
|
* @param string $price 价格
|
|
|
* @param string $p_d 折扣
|
|
|
*/
|
|
|
public function brandAction()
|
|
|
{
|
...
|
...
|
@@ -208,8 +210,7 @@ class IndexController extends AbstractAction |
|
|
$data['goodList']['brandWay'] = $brandLogo;
|
|
|
$data['goodList']['search']['default'] = $query;
|
|
|
$data['goodList']['search']['url'] = Helpers::url('', null, 'search');
|
|
|
}
|
|
|
// 品牌一览过来的展示品牌介绍和LOGO
|
|
|
} // 品牌一览过来的展示品牌介绍和LOGO
|
|
|
elseif ($brandId !== 0) {
|
|
|
$data['brandHome'] = \Product\ListModel::getBrandIntro($brandId, $uid, $title);
|
|
|
$data['goodList'] = array();
|
...
|
...
|
@@ -228,4 +229,193 @@ class IndexController extends AbstractAction |
|
|
|
|
|
$this->_view->display('index', $data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 店铺券全部品牌页面
|
|
|
* @author chengyao.guo
|
|
|
* @return mixed
|
|
|
*/
|
|
|
public function allBrandAction()
|
|
|
{
|
|
|
$requestData = filter_input_array(INPUT_GET, array(
|
|
|
'shop_id' => FILTER_DEFAULT,
|
|
|
));
|
|
|
if (empty($requestData['shop_id'])) {
|
|
|
$this->go(SITE_MAIN);
|
|
|
}
|
|
|
$result = array();
|
|
|
$resource = ShopData::getShopBrands($requestData['shop_id']);
|
|
|
if($resource['code'] === 200){
|
|
|
$result = ListModel::brandData($resource['data']);
|
|
|
}
|
|
|
return $this->_view->display('brand', array(
|
|
|
'content' => $result,
|
|
|
));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
* 店铺品类页面
|
|
|
* @author chengyao.guo
|
|
|
* @return mixed
|
|
|
*/
|
|
|
public function categoryAction()
|
|
|
{
|
|
|
$requestData = filter_input_array(INPUT_GET, array(
|
|
|
'shop_id' => FILTER_DEFAULT,
|
|
|
));
|
|
|
if (empty($requestData['shop_id'])) {
|
|
|
$this->go(SITE_MAIN);
|
|
|
}
|
|
|
$result = array();
|
|
|
$resource = ShopData::getShopCategory($requestData['shop_id'], Helpers::getChannelByCookie(), Helpers::getGenderByCookie());
|
|
|
if ($resource['code'] === 200) {
|
|
|
$result = ListModel::categoryData($resource['data']);
|
|
|
}
|
|
|
return $this->_view->display('category', array(
|
|
|
'productCategoryPage' => true,
|
|
|
'content' => $result,
|
|
|
));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 店铺简介页面
|
|
|
* @author chengyao.guo
|
|
|
* @return mixed
|
|
|
*/
|
|
|
public function introAction()
|
|
|
{
|
|
|
$requestData = filter_input_array(INPUT_GET, array(
|
|
|
'shop_id' => FILTER_DEFAULT,
|
|
|
));
|
|
|
if (empty($requestData['shop_id'])) {
|
|
|
$this->go(SITE_MAIN);
|
|
|
}
|
|
|
$result = array();
|
|
|
$resource = ShopData::getShopIntro($requestData['shop_id']);
|
|
|
if ($resource['code'] === 200) {
|
|
|
$result = $resource['data'];
|
|
|
}
|
|
|
return $this->_view->display('intro', array(
|
|
|
'content' => $result,
|
|
|
));
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 店铺内全部商品页面
|
|
|
* @author chengyao.guo
|
|
|
* @return mixed
|
|
|
*/
|
|
|
public function allProductAction()
|
|
|
{
|
|
|
$result = array();
|
|
|
return $this->_view->display('allproduct', array(
|
|
|
'content' => $result,
|
|
|
));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 店铺分类品类页数据模拟
|
|
|
*
|
|
|
* @return array
|
|
|
*/
|
|
|
public function getCategoryContent()
|
|
|
{
|
|
|
return array(// 数据模拟
|
|
|
'class' => array(
|
|
|
array(
|
|
|
'name' => '上衣',
|
|
|
),
|
|
|
array(
|
|
|
'name' => '裤装',
|
|
|
),
|
|
|
array(
|
|
|
'name' => '鞋靴',
|
|
|
),
|
|
|
array(
|
|
|
'name' => '包类',
|
|
|
)
|
|
|
),
|
|
|
'category' => array(
|
|
|
array(
|
|
|
'subcategory' => array(
|
|
|
array(
|
|
|
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
|
|
|
'name' => '上衣衣1'
|
|
|
),
|
|
|
array(
|
|
|
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
|
|
|
'name' => '上衣衣2'
|
|
|
),
|
|
|
array(
|
|
|
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
|
|
|
'name' => '上衣衣3'
|
|
|
),
|
|
|
|
|
|
)
|
|
|
),
|
|
|
array(
|
|
|
'subcategory' => array(
|
|
|
array(
|
|
|
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
|
|
|
'name' => '裤装1'
|
|
|
),
|
|
|
array(
|
|
|
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
|
|
|
'name' => '裤装2'
|
|
|
),
|
|
|
array(
|
|
|
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
|
|
|
'name' => '裤装3'
|
|
|
),
|
|
|
)
|
|
|
),
|
|
|
array(
|
|
|
'subcategory' => array(
|
|
|
array(
|
|
|
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
|
|
|
'name' => '鞋靴1'
|
|
|
),
|
|
|
array(
|
|
|
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
|
|
|
'name' => '鞋靴2'
|
|
|
),
|
|
|
array(
|
|
|
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
|
|
|
'name' => '鞋靴3'
|
|
|
)
|
|
|
)
|
|
|
),
|
|
|
array(
|
|
|
'subcategory' => array(
|
|
|
array(
|
|
|
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
|
|
|
'name' => '包类1'
|
|
|
),
|
|
|
array(
|
|
|
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
|
|
|
'name' => '包类2'
|
|
|
),
|
|
|
array(
|
|
|
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
|
|
|
'name' => '包类3'
|
|
|
)
|
|
|
)
|
|
|
)
|
|
|
|
|
|
)
|
|
|
);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 店铺简介数据模拟
|
|
|
*
|
|
|
* @return array
|
|
|
*/
|
|
|
public function getIntroContent()
|
|
|
{
|
|
|
return array(// 数据模拟
|
|
|
);
|
|
|
}
|
|
|
} |
...
|
...
|
|