作者 董瑞恩
1 个管道 的构建 通过 耗费 0 秒

order

... ... @@ -68,12 +68,10 @@ class AdminStatisticsController extends AdminBaseController{
$interval[2]=Db::query($sql);
$sql="SELECT count(*) as num FROM sleep_order where FROM_UNIXTIME(start_time,'%H:%i:%S')>'17:00:00' AND FROM_UNIXTIME(start_time,'%H:%i:%S')<'21:00:00'";
$interval[3]=Db::query($sql);
foreach ($interval as $k=>$v){
$interval[$k]=$interval[$k][0]['num'];
}
$this->assign('interval',json_encode($interval));
dump($interval);
return $this->fetch();
}
... ...
... ... @@ -95,7 +95,7 @@
//时间段统计数据
var dateX = ['21点-7点','17点-12点','12点-17点','17点-21点'];
var dateY = [1,2,3,4];
var dateY = {$interval};
var num=0;
... ...