礼物墙
This commit is contained in:
@@ -486,9 +486,9 @@ class User extends Model
|
|||||||
$top_users_count = 0;
|
$top_users_count = 0;
|
||||||
$users = json_decode($item['give_user_ids'], true);
|
$users = json_decode($item['give_user_ids'], true);
|
||||||
if($users){
|
if($users){
|
||||||
foreach ($users as $user_id){
|
foreach ($users as $kk => $user_id){
|
||||||
$userInfo[] = db::name('user')->where(['id' => $user_id['user_id']])->field('id user_id,nickname,avatar')->find();
|
$userInfo[$kk] = db::name('user')->where(['id' => $user_id['user_id']])->field('id user_id,nickname,avatar')->find();
|
||||||
$userInfo[]['count'] = $user_id['count'];
|
$userInfo[$kk]['count'] = $user_id['count'];
|
||||||
$top_users_count ++;
|
$top_users_count ++;
|
||||||
}
|
}
|
||||||
//用户信息$userInfo 按照数量 count 排序且保留前三个
|
//用户信息$userInfo 按照数量 count 排序且保留前三个
|
||||||
|
|||||||
Reference in New Issue
Block a user