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
72607438892b6c678e7d3993b4229986655e32df
1 parent
1f6e19d7
code review by hf: do format channel code add exception handle
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletions
yohobuy/m.yohobuy.com/application/models/Index/Home.php
yohobuy/m.yohobuy.com/application/models/Index/Home.php
View file @
7260743
...
...
@@ -374,7 +374,7 @@ class HomeModel
}
$result
[
'channelList'
][]
=
$build
;
}
}
}
if
(
USE_CACHE
)
{
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
...
...
@@ -386,6 +386,34 @@ class HomeModel
Cache
::
set
(
$key
,
$result
);
}
}
// 当接口和缓存都挂了时候,返回静态的数据
if
(
empty
(
$result
))
{
$result
=
array
(
'channelList'
=>
array
(
array
(
'href'
=>
'/boys'
,
'title'
=>
'男生'
,
'entitle'
=>
'BOYS'
,
),
array
(
'href'
=>
'/girls'
,
'title'
=>
'女生'
,
'entitle'
=>
'GIRLS'
,
),
array
(
'href'
=>
'/kids'
,
'title'
=>
'潮童'
,
'entitle'
=>
'KIDS'
,
),
array
(
'href'
=>
'/lifestyle'
,
'title'
=>
'创意生活'
,
'entitle'
=>
'LIFESTYLE'
,
),
)
);
}
return
$result
;
}
...
...
Please
register
or
login
to post a comment