...
|
...
|
@@ -27,19 +27,10 @@ class Screen extends Api |
|
|
}
|
|
|
*/
|
|
|
public function index(){
|
|
|
$time = time();
|
|
|
$list = [];
|
|
|
$data = db('screen')->find();
|
|
|
$list['images'] = cdnurl($data['images'],true);
|
|
|
if ($data['starttime']<=$time && $data['endtime']>=$time){
|
|
|
$day = intval(($data['endtime']-$time)/86400);
|
|
|
$hour = intval((($data['endtime']-$time)%86400)/3600);
|
|
|
$minute = intval(((($data['endtime']-$time)%86400)%3600)/60);
|
|
|
$second = intval(((($data['endtime']-$time)%86400)%3600)%60);
|
|
|
$list['count_down'] = "距离活动结束还有".$day."天".$hour."时".$minute."分".$second."秒";
|
|
|
}else if ($data['endtime']<=$time){
|
|
|
$list['count_down'] = "距离活动结束还有00天00时00分00秒";
|
|
|
}
|
|
|
$list['count_down'] = $data['endtime'];
|
|
|
$list['screen_name'] = $data['title'];
|
|
|
$list['campus_name'] = db('campus c')
|
|
|
->where('c.id',$data['campus_id'])
|
...
|
...
|
|