...
|
...
|
@@ -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;
|
|
|
}
|
|
|
}
|
...
|
...
|
|