商品评分用户不存在导致错误优化

feat/task1-c-wallet
gongfuxiang 2021-10-24 23:50:11 +08:00
parent f3d370f61c
commit f5bb41988c
1 changed files with 2 additions and 2 deletions

View File

@ -255,8 +255,8 @@ class GoodsCommentsService
if(!isset($params['is_public']) || $params['is_public'] == 1)
{
$v['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'),
'avatar' => isset($user['avatar']) ? $user['avatar'] : '',
'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 {
$v['user'] = $user;