作者 何书鹏
1 个管道 的构建 通过 耗费 2 秒

合并分支 'heshupeng' 到 'master'

语音识别



查看合并请求 !314
... ... @@ -80,24 +80,21 @@ class Index extends Api
->field('a.id,CONCAT(b.nickname,a.nickname) name,a.nickname,a.exam_time')
->order('a.exam_time asc')
->select();
foreach ($exam_list as &$v) {
$countdown = strtotime(date('Y-m-d',$v['exam_time'])) - strtotime(date('Y-m-d'));
$countdown = $countdown/86400;
$v['countdown'] = $countdown > 0 ? $countdown : 0;
}
$exam = $exam_list[0];
}else{
$exam_list = [];
$exam = Exam::alias('a')
$exam_list = Exam::alias('a')
->join('mobile_exam b','b.id = a.pid')
->where('a.pid','>',0)
->field('a.id,CONCAT(b.nickname,a.nickname) name,a.nickname,a.exam_time')
->order('a.exam_time asc')
->find();
$countdown = strtotime(date('Y-m-d',$exam['exam_time'])) - strtotime(date('Y-m-d'));
->limit(1)
->select();
}
foreach ($exam_list as &$v) {
$countdown = strtotime(date('Y-m-d',$v['exam_time'])) - strtotime(date('Y-m-d'));
$countdown = $countdown/86400;
$exam['countdown'] = $countdown > 0 ? $countdown : 0;
$v['countdown'] = $countdown > 0 ? $countdown : 0;
}
$exam = $exam_list[0];
// 轮播图
$banner_list = IndexBanner::order('createtime desc')->field('id,image,type,course_id,news_id')->select();
// 消息
... ...