...
|
...
|
@@ -71,13 +71,7 @@ class Bootstrap extends Bootstrap_Abstract |
|
|
$controller = 'Index';
|
|
|
$action = 'Index';
|
|
|
// 二级域名
|
|
|
if (3 === $level) {
|
|
|
$url = strtolower($dispatcher->getRequest()->getRequestUri());
|
|
|
if(empty($url) || $url == '/index' || $url == '/') {
|
|
|
$urlAction = '/index';
|
|
|
} else {
|
|
|
$urlAction = $url;
|
|
|
}
|
|
|
if (2 === $level) {
|
|
|
$subDomain = strval($hostParts[0]);
|
|
|
switch (strtolower($subDomain)) {
|
|
|
case 'www': // 主站
|
...
|
...
|
@@ -87,27 +81,16 @@ class Bootstrap extends Bootstrap_Abstract |
|
|
break;
|
|
|
case 'search': // 搜索
|
|
|
$module = 'Product';
|
|
|
if($urlAction == '/index') {
|
|
|
$searchRequest = new Yaf\Request\Http('/product/search/index');
|
|
|
$dispatcher->setRequest($searchRequest);
|
|
|
}
|
|
|
break;
|
|
|
case 'guang': // 逛
|
|
|
$module = 'Guang';
|
|
|
break;
|
|
|
case 'list': // 商品列表
|
|
|
$module = 'Product';
|
|
|
//list列表的index
|
|
|
if($urlAction == '/index') {
|
|
|
$listRequest = new Yaf\Request\Http('/product/list/index');
|
|
|
$dispatcher->setRequest($listRequest);
|
|
|
}
|
|
|
break;
|
|
|
case 'sale'://促销
|
|
|
$module = 'Product';
|
|
|
$controller = 'sale';
|
|
|
$saleRequest = new Yaf\Request\Http('/product/sale/index');
|
|
|
$dispatcher->setRequest($saleRequest);
|
|
|
break;
|
|
|
default: // 其它(识别为品牌)
|
|
|
$module = 'Product';
|
...
|
...
|
|