作者 王智

文档修改

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