作者 王智

修改

... ... @@ -352,11 +352,11 @@ class Question extends Api
$Array = Db::name('sleep')->where('user_id', $UserId)->where('type', 1)->select();
if (!empty($Array)) {
foreach ($Array as $k => $v) {
$DateDay[$k] = date('Y-m-d', $v['createtime']);
$DateMonth[$k] = date('Y-m', $v['createtime']);
$DateDay[$k]['date'] = date('Y-m-d', $v['createtime']);
$DateMonth[$k]['date'] = date('Y-m', $v['createtime']);
}
dump($DateDay);
dump($DateMonth);
dump($this->second_array_unique_bykey($DateDay, 'date'));
dump($this->second_array_unique_bykey($this, 'date'));
} else {
$Day = [];
$Month = [];
... ...