...
|
...
|
@@ -156,8 +156,6 @@ class Config extends Api |
|
|
foreach ($Array as $k => $v) {
|
|
|
$Ids[] = $v['id'];
|
|
|
}
|
|
|
// $Id = array_rand($Ids);
|
|
|
// $NEW = $this->shuffle_assoc($Ids);
|
|
|
$List = Db::name('gift_message')->where('id', array_rand($Ids) + 1)->find();
|
|
|
$data = [
|
|
|
'Content' => $List['content']
|
...
|
...
|
@@ -166,14 +164,6 @@ class Config extends Api |
|
|
$this->success('成功', $data);
|
|
|
}
|
|
|
|
|
|
function shuffle_assoc($array)
|
|
|
{
|
|
|
$randomized_keys = array_rand($array, count($array));
|
|
|
foreach ($randomized_keys as $current_key) {
|
|
|
$output[$current_key] = $array[$current_key];
|
|
|
}
|
|
|
return $output;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Config接口
|
...
|
...
|
|