作者 潘浩文
1 个管道 的构建 通过 耗费 2 秒

测试

... ... @@ -537,21 +537,24 @@ class IndexController extends RestBaseController
$date=date('Y-m',time());
$timestamp=strtotime($date);
$arr=getdate($timestamp);
$firstday=date('Y-n-01',strtotime(date('Y',$timestamp).'-'.date('m',$timestamp).'-01'));
$firstday1=date('Y年n月',strtotime(date('Y',$timestamp).'-'.date('m',$timestamp).'-01'));
$secondday=date('Y-n-01',strtotime(date('Y',$timestamp).'-'.(date('m',$timestamp)+1).'-01'));
$secondday1=date('Y年n月',strtotime(date('Y',$timestamp).'-'.(date('m',$timestamp)+1).'-01'));
$thirdday=date('Y-n-01',strtotime(date('Y',$timestamp).'-'.(date('m',$timestamp)+2).'-01'));
$thirdday1=date('Y年n月',strtotime(date('Y',$timestamp).'-'.(date('m',$timestamp)+2).'-01'));
if($arr['mon'] == 12){
$year=$arr['year'] +1;
$firstday=date('Y-m-01',strtotime(date('Y',$timestamp).'-'.date('m',$timestamp).'-01'));
$firstday1=date('Y年m月',strtotime(date('Y',$timestamp).'-'.date('m',$timestamp).'-01'));
$secondday=$year.'-02-01';;
$secondday1=$year.'年02月';
$thirdday=$year.'-03-01';;
$thirdday1=$year.'年03月';
}else{
$firstday=date('Y-m-01',strtotime(date('Y',$timestamp).'-'.date('m',$timestamp).'-01'));
$firstday1=date('Y年m月',strtotime(date('Y',$timestamp).'-'.date('m',$timestamp).'-01'));
$secondday=date('Y-m-01',strtotime(date('Y',$timestamp).'-'.(date('m',$timestamp)+1).'-01'));
$secondday1=date('Y年m月',strtotime(date('Y',$timestamp).'-'.(date('m',$timestamp)+1).'-01'));
$thirdday=date('Y-m-01',strtotime(date('Y',$timestamp).'-'.(date('m',$timestamp)+2).'-01'));
$thirdday1=date('Y年m月',strtotime(date('Y',$timestamp).'-'.(date('m',$timestamp)+2).'-01'));
$secondday=$year.'-01-01';;
$secondday1=$year.'年1月';
$thirdday=$year.'-02-01';;
$thirdday1=$year.'年2月';
}elseif($arr['mon'] == 11){
$year=$arr['year'] +1;
$thirdday=$year.'-01-01';;
$thirdday1=$year.'年1月';
}
$data1['date']=$firstday1;
$data1['time']=strtotime($firstday);
... ...