商品评分用户不存在导致错误优化
parent
f3d370f61c
commit
f5bb41988c
|
|
@ -255,8 +255,8 @@ class GoodsCommentsService
|
||||||
if(!isset($params['is_public']) || $params['is_public'] == 1)
|
if(!isset($params['is_public']) || $params['is_public'] == 1)
|
||||||
{
|
{
|
||||||
$v['user'] = [
|
$v['user'] = [
|
||||||
'avatar' => $user['avatar'],
|
'avatar' => isset($user['avatar']) ? $user['avatar'] : '',
|
||||||
'user_name_view' => (!isset($v['is_anonymous']) || $v['is_anonymous'] == 1) ? '匿名' : mb_substr($user['user_name_view'], 0, 1, 'utf-8').'***'.mb_substr($user['user_name_view'], -1, null, 'utf-8'),
|
'user_name_view' => (!isset($v['is_anonymous']) || $v['is_anonymous'] == 1 || empty($user['user_name_view'])) ? '匿名' : mb_substr($user['user_name_view'], 0, 1, 'utf-8').'***'.mb_substr($user['user_name_view'], -1, null, 'utf-8'),
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
$v['user'] = $user;
|
$v['user'] = $user;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue