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
Rock Zhang
9 years ago
Commit
7a38a953c3a5bd6fad2d482ece32251ece0c744d
1 parent
6144a4fe
修复频道选择页,男首,女首报错的bug
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
yohobuy/m.yohobuy.com/application/models/Index/Home.php
yohobuy/m.yohobuy.com/application/models/Product/Newsale.php
yohobuy/m.yohobuy.com/application/models/Index/Home.php
View file @
7a38a95
...
...
@@ -98,8 +98,8 @@ class HomeModel
// 调用接口获取数据
$banner
=
IndexData
::
getBannerStart
(
self
::
CODE_BG
);
if
(
isset
(
$banner
[
'code'
])
&&
$banner
[
'code'
]
==
200
&&
$banner
[
'data'
][
'total'
]
>
0
)
{
$result
=
Helpers
::
getImageUrl
(
$banner
[
'data'
][
'list'
][
0
][
'data'
][
'list'
][
0
][
'src'
],
640
,
800
,
2
);
if
(
isset
(
$banner
[
'code'
])
&&
$banner
[
'code'
]
==
200
&&
!
empty
(
$banner
[
'data'
]))
{
$result
=
Helpers
::
getImageUrl
(
$banner
[
'data'
][
0
][
'data'
][
'list'
][
0
][
'src'
],
640
,
800
,
2
);
}
if
(
USE_CACHE
)
{
...
...
yohobuy/m.yohobuy.com/application/models/Product/Newsale.php
View file @
7a38a95
...
...
@@ -183,11 +183,11 @@ class NewsaleModel
$newsale
=
NewsaleData
::
getNewsaleFocus
(
$codeKey
);
// 调用接口获取数据并封装
if
(
isset
(
$newsale
[
'code'
])
&&
!
empty
(
$newsale
[
'data'
][
'list'
]))
{
if
(
count
(
$newsale
[
'data'
][
'list'
][
0
][
'data'
])
===
1
)
{
$result
=
Helpers
::
formatBanner
(
$newsale
[
'data'
][
'list'
][
0
][
'data'
][
0
],
640
,
240
);
if
(
isset
(
$newsale
[
'code'
])
&&
!
empty
(
$newsale
[
'data'
]))
{
if
(
count
(
$newsale
[
'data'
][
0
][
'data'
])
===
1
)
{
$result
=
Helpers
::
formatBanner
(
$newsale
[
'data'
][
0
][
'data'
][
0
],
640
,
240
);
}
else
{
foreach
(
$newsale
[
'data'
][
'list'
][
0
][
'data'
]
as
$one
)
{
foreach
(
$newsale
[
'data'
][
0
][
'data'
]
as
$one
)
{
$result
[
'list'
][]
=
Helpers
::
formatBanner
(
$one
,
640
,
240
);
}
}
...
...
Please
register
or
login
to post a comment