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