Commit ae651fbb by 杨树贤

æ·修复数组index报错的问题

parent 6f5921c5
Showing with 2 additions and 2 deletions
...@@ -22,7 +22,7 @@ class AssistService extends BaseService ...@@ -22,7 +22,7 @@ class AssistService extends BaseService
$userNames[$user['user_id']] = isset($user['company_name']) ?: $user['mobile']; $userNames[$user['user_id']] = isset($user['company_name']) ?: $user['mobile'];
$userAvatars[$user['user_id']] = $user['avatar']; $userAvatars[$user['user_id']] = $user['avatar'];
} }
$result['data'] = array_map(function ($value) use ($userNames,$userAvatars) { $result['data'] = array_map(function ($value) use ($userNames, $userAvatars) {
$value['assist_user_name'] = $userNames[$value['assist_user_id']]; $value['assist_user_name'] = $userNames[$value['assist_user_id']];
$value['assist_user_avatar'] = $userAvatars[$value['assist_user_id']]; $value['assist_user_avatar'] = $userAvatars[$value['assist_user_id']];
...@@ -31,7 +31,7 @@ class AssistService extends BaseService ...@@ -31,7 +31,7 @@ class AssistService extends BaseService
}, $result['data']); }, $result['data']);
} }
return $result['data']; return array_get($result, 'data', []);
} }
public function addAssist($map = []) public function addAssist($map = [])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment