Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
620f63de3c4b47a35b6a3ab815e37eb51afdeffe
1 parent
99cce7ba
change to add browser cache expires to 5mins
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
16 deletions
yohobuy/m.yohobuy.com/application/controllers/Boys.php
yohobuy/m.yohobuy.com/application/controllers/Download.php
yohobuy/m.yohobuy.com/application/controllers/Girls.php
yohobuy/m.yohobuy.com/application/controllers/Index.php
yohobuy/m.yohobuy.com/application/controllers/Kids.php
yohobuy/m.yohobuy.com/application/controllers/Lifestyle.php
yohobuy/m.yohobuy.com/application/controllers/Search.php
yohobuy/m.yohobuy.com/application/controllers/Boys.php
View file @
620f63d
...
...
@@ -18,8 +18,8 @@ class BoysController extends AbstractAction
// 先检查COOKIE是否有访问过, 有则跳转到相应的频道页
Index\HomeModel
::
goSwitchChannel
();
}
else
{
// 设置客户端浏览器1分钟内不改变
$this
->
setLastModified
(
mktime
(
date
(
'H'
),
date
(
'i'
),
0
,
date
(
'n'
),
date
(
'j'
),
date
(
'Y'
)));
// 设置浏览器缓存5分钟
$this
->
setExpires
(
300
);
// 缓存5分钟
}
// 设置COOKIE标识用户访问过该页面了
...
...
yohobuy/m.yohobuy.com/application/controllers/Download.php
View file @
620f63d
...
...
@@ -20,7 +20,7 @@ class DownloadController extends AbstractAction
public
function
mkappAction
()
{
// 跳转到老站s
$this
->
go
(
OLD_MAIN
.
'/download/mkapp'
);
//
$this->go(OLD_MAIN . '/download/mkapp');
}
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Girls.php
View file @
620f63d
...
...
@@ -14,9 +14,9 @@ class GirlsController extends AbstractAction
*/
public
function
indexAction
()
{
// 设置客户端浏览器1分钟内不改变
$this
->
setLastModified
(
mktime
(
date
(
'H'
),
date
(
'i'
),
0
,
date
(
'n'
),
date
(
'j'
),
date
(
'Y'
)));
// 设置浏览器缓存5分钟
$this
->
setExpires
(
300
);
// 缓存5分钟
// 设置COOKIE标识用户访问过该页面了
Index\HomeModel
::
setSwitchToCookie
(
Index\HomeModel
::
COOKIE_NAME_GIRLS
);
...
...
yohobuy/m.yohobuy.com/application/controllers/Index.php
View file @
620f63d
...
...
@@ -18,8 +18,10 @@ class IndexController extends AbstractAction
// 先检查COOKIE是否有访问过, 有则跳转到相应的频道页
Index\HomeModel
::
goSwitchChannel
();
}
else
{
// 设置客户端浏览器1小时内不改变
// 设置客户端浏览器1小时内不改变
,
$this
->
setLastModified
(
mktime
(
date
(
'H'
),
0
,
0
,
date
(
'n'
),
date
(
'j'
),
date
(
'Y'
)));
// 设置浏览器缓存5分钟
$this
->
setExpires
(
300
);
}
// 渲染模板
...
...
yohobuy/m.yohobuy.com/application/controllers/Kids.php
View file @
620f63d
...
...
@@ -14,9 +14,9 @@ class KidsController extends AbstractAction
*/
public
function
indexAction
()
{
// 设置客户端浏览器1分钟内不改变
$this
->
setLastModified
(
mktime
(
date
(
'H'
),
date
(
'i'
),
0
,
date
(
'n'
),
date
(
'j'
),
date
(
'Y'
)));
// 设置浏览器缓存5分钟
$this
->
setExpires
(
300
);
// 缓存5分钟
// 设置COOKIE标识用户访问过该页面了
Index\HomeModel
::
setSwitchToCookie
(
Index\HomeModel
::
COOKIE_NAME_KIDS
);
...
...
yohobuy/m.yohobuy.com/application/controllers/Lifestyle.php
View file @
620f63d
...
...
@@ -14,8 +14,8 @@ class LifestyleController extends AbstractAction
*/
public
function
indexAction
()
{
// 设置客户端浏览器1分钟内不改变
$this
->
setLastModified
(
mktime
(
date
(
'H'
),
date
(
'i'
),
0
,
date
(
'n'
),
date
(
'j'
),
date
(
'Y'
)));
// 设置浏览器缓存5分钟
$this
->
setExpires
(
300
);
// 缓存5分钟
// 设置COOKIE标识用户访问过该页面了
Index\HomeModel
::
setSwitchToCookie
(
Index\HomeModel
::
COOKIE_NAME_LIFESTYLE
);
...
...
yohobuy/m.yohobuy.com/application/controllers/Search.php
View file @
620f63d
...
...
@@ -18,7 +18,9 @@ class SearchController extends AbstractAction
{
// 设置客户端浏览器1小时内不改变
$this
->
setLastModified
(
mktime
(
date
(
'H'
),
0
,
0
,
date
(
'n'
),
date
(
'j'
),
date
(
'Y'
)));
// 设置浏览器缓存5分钟
$this
->
setExpires
(
300
);
// 缓存5分钟
$this
->
setNavHeader
(
'搜索'
,
true
,
SITE_MAIN
);
//$this->_view->html('search');
...
...
@@ -144,14 +146,14 @@ class SearchController extends AbstractAction
}
// 搜索其它内容
else
{
if
(
$haveQuery
)
{
$data
[
'goodList'
][
'search'
][
'default'
]
=
$query
;
$from
=
$this
->
get
(
'from'
);
if
(
$haveQuery
||
$from
)
{
$data
[
'goodList'
][
'search'
][
'default'
]
=
empty
(
$query
)
?
false
:
$query
;
$data
[
'goodList'
][
'search'
][
'url'
]
=
Helpers
::
url
(
''
,
null
,
'search'
);
}
$this
->
setTitle
(
'搜索'
);
$this
->
setNavHeader
(
'搜索'
,
true
,
SITE_MAIN
);
}
// 右下角的购物车链接
$data
[
'goodList'
][
'cartUrl'
]
=
Helpers
::
url
(
'/cart/index/index'
,
null
);
...
...
Please
register
or
login
to post a comment