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
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
cf6e3c461f9f8afe1af04f2b0e7b35951baf4d48
2 parents
8f998598
3685204a
Merge remote-tracking branch 'remotes/origin/feature/order-show' into release/4.8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
library/LibModels/Web/Product/ItemData.php
yohobuy/www.yohobuy.com/application/models/Product/Item.php
library/LibModels/Web/Product/ItemData.php
View file @
cf6e3c4
...
...
@@ -105,7 +105,7 @@ class ItemData
public
static
function
commentList
(
$productId
,
$pageNum
,
$pageSize
)
{
$param
=
Yohobuy
::
param
();
$param
[
'method'
]
=
'
app.comment.li
'
;
$param
[
'method'
]
=
'
show.productShareOrderList
'
;
$param
[
'product_id'
]
=
$productId
;
$param
[
'page'
]
=
$pageNum
;
$param
[
'limit'
]
=
$pageSize
;
...
...
yohobuy/www.yohobuy.com/application/models/Product/Item.php
View file @
cf6e3c4
...
...
@@ -482,21 +482,24 @@ class ItemModel
$commentList
=
ItemData
::
commentList
(
$productId
,
$pageNum
,
$pageSize
);
if
(
isset
(
$commentList
[
'code'
])
&&
$commentList
[
'code'
]
===
200
)
{
$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'
]);
foreach
(
$commentList
[
'data'
][
'pageResponse'
][
'list'
]
as
$value
)
{
$userInfo
=
$value
[
'userInfo'
];
$goods
=
$value
[
'goods'
];
$headIco
=
ChannelConfig
::
$itemHeadDefaultImgIco
;
//默认用户头像
if
(
!
empty
(
$userInfo
[
'headIco'
]))
{
if
(
preg_match
(
'@http://@'
,
$userInfo
[
'headIco'
]))
{
$headIco
=
preg_replace
(
'@http:\/\/img(.+)\.static\.yhbimg\.com\/headimg@'
,
'http://head.static.yhbimg.com/yhb-head/'
,
$userInfo
[
'headIco'
]);
$headIco
=
Images
::
getImageUrl
(
$headIco
,
30
,
30
);
}
}
$build
[
'avatar'
]
=
$headIco
;
$build
[
'userName'
]
=
$value
[
'nickname'
];
$build
[
'color'
]
=
$value
[
'color_name'
];
$build
[
'size'
]
=
$value
[
'size_name'
];
$build
[
'userName'
]
=
$userInfo
[
'nickname'
];
$build
[
'color'
]
=
$goods
[
'color_name'
];
$build
[
'size'
]
=
$goods
[
'size_name'
];
$build
[
'comment'
]
=
isset
(
$value
[
'content'
])
?
$value
[
'content'
]
:
''
;
$build
[
'date'
]
=
$value
[
'create_time'
];
$build
[
'total'
]
=
$value
[
'total'
];
$build
[
'date'
]
=
date
(
'Y-m-d H:i:s'
,
$value
[
'createTime'
]);
$build
[
'total'
]
=
$commentList
[
'data'
][
'pageResponse'
][
'totalCount'
];
$result
[]
=
$build
;
}
}
...
...
Please
register
or
login
to post a comment