Authored by 郝肖肖

店铺装修 商品列表 shopId参数

... ... @@ -1187,6 +1187,10 @@ class HelperSearch
}
$queryPath = explode('?', $_SERVER['REQUEST_URI']);
$params_arr = array();
//店铺装修,添加额外参数
if (empty($params['shopId']) && isset($_REQUEST['shopId'])) {
$params['shopId'] = $_REQUEST['shopId'];
}
foreach ($params as $key => $val) {
if (is_array($val) || $val === '') {
continue;
... ... @@ -1322,6 +1326,10 @@ class HelperSearch
if (!empty(self::$specialsaleParam)) {
$url[0] .= '?' . http_build_query(self::$specialsaleParam);
}
//店铺装修,添加额外参数
if (empty($urlParam['shopId']) && isset($_REQUEST['shopId'])) {
$urlParam['shopId'] = $_REQUEST['shopId'];
}
if (isset(self::$params['query'])) {
$urlParam['query'] = self::$params['query'];
}
... ... @@ -1441,7 +1449,7 @@ class HelperSearch
if (self::$total == 0 || empty($shopSort)) {
return $shopEntry;
}
$url = Helpers::url('', '', $shop['brand_domain']);
$url = Helpers::url('', array('shopId' => $shop['shop_id']), $shop['brand_domain']);
$sort = array();
$sortInfo = array();
foreach ($shopSort as $msort) {
... ...
... ... @@ -445,11 +445,11 @@ class ShopModel
* @param type $data
* @return type []
*/
public static function goodsTabBar($data)
public static function goodsTabBar($data, $parameters)
{
$more = array(
'name' => 'MORE',
'href' => self::$shopListUrl
'href' => self::$shopListUrl . '?shopId=' . $parameters['shopId']
);
$result = array(
'hot' => array(),
... ...
... ... @@ -349,7 +349,13 @@ class IndexController extends WebAction
$this->go(SITE_MAIN);
}
$shopId = $this->get('shopId', 0);
//根据品牌域名获取品牌id(同时判断品牌域名是否有效),无效跳转首页
$result = BrandsModel::getBrandByDomain($domain);
if (!$result) {
$this->go(SITE_MAIN);
}
$shopId = isset($result['shopId']) ? $result['shopId'] : $this->get('shopId', 0);
//获取uid
$uid = $this->getUid();
... ... @@ -366,7 +372,7 @@ class IndexController extends WebAction
),
'uid' => $uid,
'navBar' => $this->get('navBar', 1),
'shopId' => $this->get('shopId', 0),
'shopId' => $shopId,
'brand' => $this->get('brand', 0)
);
... ...