作者 sgj
1 个管道 的构建 失败 耗费 0 秒

提交信息修改

... ... @@ -78,23 +78,23 @@ class ActivityController extends AdminBaseController
$param = $this->request->param();
$team_id=$this->getAdminTeamId();
if (!empty($team_id)){
$where['team_id']=$team_id;
$where['an.team_id']=$team_id;
}
$startTime = empty($param['start_time']) ? 0 : strtotime($param['start_time']);
$endTime = empty($param['end_time']) ? 0 : strtotime($param['end_time']);
if (!empty($startTime) && !empty($endTime)) {
$where['create_time'] = [['>= time', $startTime], ['<= time', $endTime]];
$where['an.create_time'] = [['>= time', $startTime], ['<= time', $endTime]];
} else {
if (!empty($startTime)) {
$where['create_time'] = ['>= time', $startTime];
$where['an.create_time'] = ['>= time', $startTime];
}
if (!empty($endTime)) {
$where['create_time'] = ['<= time', $endTime];
$where['an.create_time'] = ['<= time', $endTime];
}
}
if (!empty($param['type'])){
$where['activity_type']=$param['type'];
$where['an.activity_type']=$param['type'];
$this->assign('type',$param['type']);
}else{
$this->assign('type','0');
... ... @@ -103,9 +103,12 @@ class ActivityController extends AdminBaseController
$keyword = empty($param['keyword']) ? '' : $param['keyword'];
if (!empty($keyword)) {
$where['activity_name|abstract'] = ['like', "%$keyword%"];
$where['an.activity_name|an.abstract'] = ['like', "%$keyword%"];
}
$data=Db::name('activity_news')
->alias('an')
->field('an.*,t.type_name')
->join('new_type t','an.activity_type=t.d')
->where('delete_time',0)
->where($where)
->order('weight desc')
... ... @@ -856,4 +859,4 @@ class ActivityController extends AdminBaseController
}*/
}
}
\ No newline at end of file
}
... ...
... ... @@ -39,6 +39,7 @@
<th width="20">ID</th>
<th width="50">标题</th>
<th width="50">团队名称</th>
<th width="50">活动类型</th>
<th width="20">缩略图</th>
<th width="30">创建时间</th>
<th width="30">更新时间</th>
... ... @@ -57,6 +58,7 @@
<td>{$vo.id}</td>
<td>{$vo.activity_name}</td>
<td>{:get_team($vo['id'],'name')}</td>
<td>{$vo.type_name}</td>
<td>
<notempty name="$vo.thumbnail">
<a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.thumbnail)}');">
... ...