|
@@ -55,7 +55,7 @@ class Index extends Api
|
|
|
public function index_trainactive(){
|
|
|
$now = time();
|
|
|
|
|
|
- $lists = Db::name('train_active')->field('id,title,logo_image,starttime,endtime,pingjia_time')
|
|
|
+ $lists = Db::name('train_active')->field('id,title,logo_image,starttime,endtime,pingjia_time,pingjia_uid')
|
|
|
->where('status', 1)
|
|
|
->where('deletetime', NULL)
|
|
|
->whereRaw("((endtime = 0) or (endtime > {$now}))")
|
|
@@ -75,7 +75,7 @@ class Index extends Api
|
|
|
$val['show_status'] = 2;
|
|
|
$val['show_status_text'] = '进行中';
|
|
|
}
|
|
|
- if($val['endtime'] < $now || $val['pingjia_time'] > 0){ //时间或评价,都行
|
|
|
+ if(/*$val['endtime'] < $now || */$val['pingjia_uid'] != 0){ //时间或评价,都行
|
|
|
$val['show_status'] = 3;
|
|
|
$val['show_status_text'] = '已结束';
|
|
|
}
|
|
@@ -115,10 +115,11 @@ class Index extends Api
|
|
|
$where['endtime'] = ['gt',$now];
|
|
|
}
|
|
|
if($type == 3){
|
|
|
- $where = 'endtime < '.$now.' or pingjia_time > 0';
|
|
|
+// $where = 'endtime < '.$now.' or pingjia_time > 0';
|
|
|
+ $where['pingjia_uid'] = ['NEQ',0];
|
|
|
}
|
|
|
|
|
|
- $papers = Db::name('train_active')->field('id,title,logo_image,starttime,endtime,pingjia_time')
|
|
|
+ $papers = Db::name('train_active')->field('id,title,logo_image,starttime,endtime,pingjia_time,pingjia_uid')
|
|
|
->where('status', 1)
|
|
|
->where('deletetime', NULL)
|
|
|
->where($where)
|
|
@@ -137,7 +138,7 @@ class Index extends Api
|
|
|
$val['show_status'] = 2;
|
|
|
$val['show_status_text'] = '进行中';
|
|
|
}
|
|
|
- if($val['endtime'] < $now || $val['pingjia_time'] > 0){ //时间或评价,都行
|
|
|
+ if(/*$val['endtime'] < $now || */$val['pingjia_uid'] != 0){ //时间或评价,都行
|
|
|
$val['show_status'] = 3;
|
|
|
$val['show_status_text'] = '已结束';
|
|
|
}
|