作者 sgj
1 个管道 的构建 通过 耗费 1 秒

添加结束时间

... ... @@ -92,10 +92,10 @@ class ActivityController extends AdminBaseController
if($this->request->isPost()){
$param=$this->request->param();
$param['time'] = strtotime($param['time']);
$param['end_time'] = strtotime($param['end_time']);
$param['update_time'] = time();
$validate = new Validate([
'activity_name' => 'require',
'content'=>'require',
'time' => 'require',
'thumbnail'=>'require',
... ... @@ -200,6 +200,7 @@ class ActivityController extends AdminBaseController
$param['create_time']=time();
$param['update_time']=time();
$param['time']=strtotime($param['time']);
$param['end_time']=strtotime($param['end_time']);
$validate = new Validate([
'activity_name' => 'require',
'content'=>'require',
... ... @@ -208,7 +209,6 @@ class ActivityController extends AdminBaseController
]);
$validate->message([
'activity_name'=>'标题不能为空!',
'content' => '内容不能为空!',
'time' => '时间不能为空!',
'thumbnail'=>'请上传缩略图!',
... ...
... ... @@ -89,6 +89,17 @@
value="{:date('Y-m-d',$data.time)}">
</td>
</tr>
<tr>
<th><b>结束时间</b></th>
</tr>
<tr>
<td>
<input class="form-control js-bootstrap-datetime " type="text" name="end_time"
value="{:date('Y-m-d H:i',$data.end_time)}">
</td>
</tr>
<tr>
<th>状态</th>
</tr>
... ...