...
|
...
|
@@ -72,6 +72,12 @@ class Bootstrap extends Bootstrap_Abstract |
|
|
$action = 'Index';
|
|
|
// 二级域名
|
|
|
if (2 === $level) {
|
|
|
$url = strtolower($dispatcher->getRequest()->getRequestUri());
|
|
|
if(empty($url) || $url == '/index' || $url == '/') {
|
|
|
$urlAction = '/index';
|
|
|
} else {
|
|
|
$urlAction = $url;
|
|
|
}
|
|
|
$subDomain = strval($hostParts[0]);
|
|
|
switch (strtolower($subDomain)) {
|
|
|
case 'www': // 主站
|
...
|
...
|
@@ -80,17 +86,18 @@ class Bootstrap extends Bootstrap_Abstract |
|
|
case 'web':
|
|
|
break;
|
|
|
case 'search': // 搜索
|
|
|
$searchRequest = new Yaf\Request\Http('/product/search/index');
|
|
|
$dispatcher->setRequest($searchRequest);
|
|
|
if($urlAction == '/index') {
|
|
|
$searchRequest = new Yaf\Request\Http('/product/search/index');
|
|
|
$dispatcher->setRequest($searchRequest);
|
|
|
}
|
|
|
break;
|
|
|
case 'guang': // 逛
|
|
|
$module = 'Guang';
|
|
|
break;
|
|
|
case 'list': // 商品列表
|
|
|
$module = 'Product';
|
|
|
$url = strtolower($dispatcher->getRequest()->getRequestUri());
|
|
|
//list列表的index
|
|
|
if(empty($url) || $url == '/index' || $url == '/') {
|
|
|
if($urlAction == '/index') {
|
|
|
$listRequest = new Yaf\Request\Http('/product/list/index');
|
|
|
$dispatcher->setRequest($listRequest);
|
|
|
}
|
...
|
...
|
|