...
|
...
|
@@ -365,11 +365,13 @@ class Question extends Api |
|
|
$EndTime = mktime(0, 0, 0, $YMD[1], $YMD[2], $YMD[0]) - 1;
|
|
|
$map['createtime'] = ['between', [$StarTime, $EndTime]];
|
|
|
$List = Db::name('sleep')->where('user_id', $UserId)->where('type', 1)->where($map)->select();
|
|
|
$DayArray[$k]['id'] = $List['id'];
|
|
|
$DayArray[$k]['date'] = date('Y-m-d', $List['createtime']);
|
|
|
$DayArray[$k]['V'] = $List['v'];
|
|
|
$DayArray[$k]['P'] = $List['p'];
|
|
|
$DayArray[$k]['K'] = $List['k'];
|
|
|
foreach ($List as $key => $value) {
|
|
|
$DayArray[$k]['id'][$key] = $value['id'];
|
|
|
$DayArray[$k]['date'][$key] = date('Y-m-d', $value['createtime']);
|
|
|
$DayArray[$k]['V'][$key] = $value['v'];
|
|
|
$DayArray[$k]['P'][$key] = $value['p'];
|
|
|
$DayArray[$k]['K'][$key] = $value['k'];
|
|
|
}
|
|
|
}
|
|
|
dump($DayArray);
|
|
|
} else {
|
...
|
...
|
|