作者 王智

1111

@@ -156,8 +156,6 @@ class Config extends Api @@ -156,8 +156,6 @@ class Config extends Api
156 foreach ($Array as $k => $v) { 156 foreach ($Array as $k => $v) {
157 $Ids[] = $v['id']; 157 $Ids[] = $v['id'];
158 } 158 }
159 -// $Id = array_rand($Ids);  
160 -// $NEW = $this->shuffle_assoc($Ids);  
161 $List = Db::name('gift_message')->where('id', array_rand($Ids) + 1)->find(); 159 $List = Db::name('gift_message')->where('id', array_rand($Ids) + 1)->find();
162 $data = [ 160 $data = [
163 'Content' => $List['content'] 161 'Content' => $List['content']
@@ -166,14 +164,6 @@ class Config extends Api @@ -166,14 +164,6 @@ class Config extends Api
166 $this->success('成功', $data); 164 $this->success('成功', $data);
167 } 165 }
168 166
169 - function shuffle_assoc($array)  
170 - {  
171 - $randomized_keys = array_rand($array, count($array));  
172 - foreach ($randomized_keys as $current_key) {  
173 - $output[$current_key] = $array[$current_key];  
174 - }  
175 - return $output;  
176 - }  
177 167
178 /** 168 /**
179 * Config接口 169 * Config接口