作者 王智

文档修改

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