Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
1a1c70222e8be276ec00e615400fd02b426d9ace
1 parent
a1de21d7
code review by fei.hong : fixes bugs to go boys
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
18 deletions
yohobuy/www.yohobuy.com/application/Bootstrap.php
yohobuy/www.yohobuy.com/application/Bootstrap.php
View file @
1a1c702
...
...
@@ -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'
;
...
...
Please
register
or
login
to post a comment