作者 王智

文档修改

... ... @@ -892,9 +892,7 @@ class Update extends Api
}
$UserArray = Db::name('user')->field('nickname')->order('id desc')->page(1, 50)->select();
$NickNameArray = array_column($UserArray, 'nickname');
dump($UserArray);
die;
$rand_list = array_rand($NickNameArray, 30);
$rand_list = array_rand(array_count_values($NickNameArray), 30);
foreach ($rand_list as $key) {
$RankArray[] = $NickNameArray[$key];
}
... ...