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
周少峰
9 years ago
Commit
3f1c4720bf0f5fdca33f84538e6c5bb2efbbe463
1 parent
56d9f8f2
modify 4.8 detail comment
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
15 deletions
yohobuy/www.yohobuy.com/application/models/Product/Item.php
yohobuy/www.yohobuy.com/application/models/Product/Item.php
View file @
3f1c472
...
...
@@ -498,23 +498,17 @@ class ItemModel
$result
=
array
();
if
(
is_numeric
(
$productId
)
&&
is_numeric
(
$pageNum
)
&&
is_numeric
(
$pageSize
))
{
$commentList
=
ItemData
::
commentList
(
$productId
,
$pageNum
,
$pageSize
);
if
(
isset
(
$commentList
[
'code'
])
&&
$commentList
[
'code'
]
===
200
)
{
if
(
isset
(
$commentList
[
'code'
])
&&
$commentList
[
'code'
]
===
200
&&
!
empty
(
$commentList
[
'data'
][
'pageResponse'
][
'list'
])
)
{
$build
=
array
();
foreach
(
$commentList
[
'data'
]
as
$value
)
{
$headIco
=
ChannelConfig
::
$itemHeadDefaultImgIco
;
if
(
!
empty
(
$value
[
'head_ico'
]))
{
if
(
preg_match
(
'@http://@'
,
$value
[
'head_ico'
]))
{
$headIco
=
preg_replace
(
'@http:\/\/img(.+)\.static\.yhbimg\.com\/headimg@'
,
'http://head.static.yhbimg.com/yhb-head/'
,
$value
[
'head_ico'
]);
$headIco
=
Images
::
getImageUrl
(
$headIco
,
30
,
30
);
}
}
$build
[
'avatar'
]
=
$headIco
;
$build
[
'userName'
]
=
$value
[
'nickname'
];
$build
[
'color'
]
=
$value
[
'color_name'
];
$build
[
'size'
]
=
$value
[
'size_name'
];
foreach
(
$commentList
[
'data'
][
'pageResponse'
][
'list'
]
as
$value
)
{
$headIco
=
$value
[
'userInfo'
][
'headIco'
]
?
$value
[
'userInfo'
][
'headIco'
]
:
ChannelConfig
::
$itemHeadDefaultImgIco
;
$build
[
'avatar'
]
=
Images
::
getImageUrl
(
$headIco
,
30
,
30
);;
$build
[
'userName'
]
=
$value
[
'userInfo'
][
'nickName'
];
$build
[
'color'
]
=
$value
[
'goods'
][
'color_name'
];
$build
[
'size'
]
=
$value
[
'goods'
][
'size_name'
];
$build
[
'comment'
]
=
isset
(
$value
[
'content'
])
?
$value
[
'content'
]
:
''
;
$build
[
'date'
]
=
$value
[
'create_time'
];
$build
[
'total'
]
=
$value
[
'total'
];
$build
[
'date'
]
=
$value
[
'createTime'
];
$build
[
'total'
]
=
$commentList
[
'data'
][
'pageResponse'
][
'totalCount'
];
$result
[]
=
$build
;
}
}
...
...
Please
register
or
login
to post a comment