...
|
...
|
@@ -131,17 +131,23 @@ class IndexController extends AbstractAction |
|
|
if (empty($domain)) {
|
|
|
$this->go(SITE_MAIN);
|
|
|
}
|
|
|
|
|
|
// 当前的登录用户UID
|
|
|
$uid = $this->getUid();
|
|
|
// 存标题信息
|
|
|
$title = '';
|
|
|
//TODO 通过品牌域名获取店铺shopId 先固定shopId = 672
|
|
|
$brandLogo = Product\ListModel::getBrandLogoByDomain($domain, $title);
|
|
|
$brandLogo['shopId'] = 672;
|
|
|
if (isset($brandLogo['shopId']) && !empty($brandLogo['shopId'])) {
|
|
|
$this->shopAction($brandLogo['shopId'], $uid);
|
|
|
exit;
|
|
|
}
|
|
|
$brandId = 0;
|
|
|
if ($brandLogo && isset($brandLogo['id'])) {
|
|
|
$brandId = $brandLogo['id'];
|
|
|
}
|
|
|
|
|
|
// 当前的登录用户UID
|
|
|
$uid = $this->getUid();
|
|
|
|
|
|
|
|
|
/* 搜索框相关 */
|
|
|
$from = $this->get('from');
|
...
|
...
|
@@ -446,19 +452,14 @@ class IndexController extends AbstractAction |
|
|
|
|
|
/**
|
|
|
* 店铺首页
|
|
|
* @param int $shopId
|
|
|
* @param int $uid
|
|
|
* @author sefon 2016-4-26 20:50:58
|
|
|
*/
|
|
|
public function shopAction()
|
|
|
public function shopAction($shopId, $uid = 0)
|
|
|
{
|
|
|
$title = '';
|
|
|
$domain = 'vans';
|
|
|
//TODO
|
|
|
$brandLogo = ListModel::getBrandLogoByDomain($domain, $title);
|
|
|
$brandId = $brandLogo['id'];
|
|
|
$shop = ListModel::brandShop($brandId);
|
|
|
$shopId = 0;
|
|
|
$shopId = 672;
|
|
|
$uid = $this->getUid(true);
|
|
|
$title = '';
|
|
|
$data = ListModel::shopData($shopId, $uid);
|
|
|
$this->setTitle($title);
|
|
|
$this->setNavHeader($title, true, SITE_MAIN);
|
...
|
...
|
@@ -479,21 +480,45 @@ class IndexController extends AbstractAction |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 店铺上新
|
|
|
* 店铺收藏
|
|
|
* @author sefon 2016-4-28 23:00:11
|
|
|
*/
|
|
|
public function shopNewPro()
|
|
|
public function shopFav()
|
|
|
{
|
|
|
|
|
|
$data = array();
|
|
|
$shopId = $this->get('shopId', 0);
|
|
|
$uid = $this->getUid();
|
|
|
do {
|
|
|
if (!IS_AJAX) {
|
|
|
break;
|
|
|
}
|
|
|
if (!empty($shopId) && !empty($uid)) {
|
|
|
$data = ShopData::shopFav($uid, $shopId);
|
|
|
}
|
|
|
} while(false);
|
|
|
$this->echoJson($data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 店铺人气
|
|
|
* 取消店铺收藏
|
|
|
* @author sefon 2016-4-28 23:01:43
|
|
|
*/
|
|
|
public function shopTops()
|
|
|
public function cancelShopFav()
|
|
|
{
|
|
|
|
|
|
$data = array();
|
|
|
$shopId = $this->get('shopId', 0);
|
|
|
$uid = $this->getUid();
|
|
|
do {
|
|
|
if (!IS_AJAX) {
|
|
|
break;
|
|
|
}
|
|
|
if (!empty($shopId) && !empty($uid)) {
|
|
|
$data = ShopData::cancelShopFav($uid, $shopId);
|
|
|
}
|
|
|
} while(false);
|
|
|
$this->echoJson($data);
|
|
|
}
|
|
|
/**
|
|
|
/**
|
|
|
* 店铺品牌首页
|
|
|
*
|
|
|
* @return mixed
|
...
|
...
|
|