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

备注

... ... @@ -106,6 +106,20 @@ class OnlineTrainController extends AdminBaseController
}
/**
* 删除培训新
*/
public function trainDelete(){
$id=input('id');
$result= db('class')->where('id',$id)->delete();
if ($result){
$this->success('操作成功');
}else{
$this->error('操作失败');
}
}
/**
* 问题详情
*/
public function questioninfo(){
... ...
... ... @@ -48,18 +48,22 @@ class VolunteerController extends AdminBaseController
switch ($param['stage']){
case 0:
$where['status']=['in','1,3'];
$order='id desc';
break;
case 1:
$where['status']=2;
$where['stage']=1;
$order='work_time desc';
break;
case 2:
$where['status']=2;
$where['stage']=2;
$order='work_time desc';
break;
case 3:
$where['status']=2;
$where['stage']=3;
$order='work_time desc';
break;
}
}
... ... @@ -95,7 +99,7 @@ class VolunteerController extends AdminBaseController
->where('delete_time', 0)
->where($where)
->where($where1)
->order('work_time desc')
->order($order)
->paginate(10);
$list->appends($param);
$data=$list->items();
... ...
... ... @@ -15,14 +15,9 @@
<form class="js-ajax-form" action="" method="post">
<table class="table table-hover table-bordered">
<div class="table-actions">
<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
data-action="{:url('activity/publish',array('yes'=>1))}" data-subcheck="true">发布
</button>
<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
data-action="{:url('activity/publish',array('no'=>1))}" data-subcheck="true">取消发布
</button>
<button class="btn btn-danger btn-sm js-ajax-submit"
data-action="{:url('activity/delete')}" data-subcheck="true" data-msg="你确定删除吗?">
data-action="{:url('activity/deleteNews')}" data-subcheck="true" data-msg="你确定删除吗?">
{:lang('DELETE')}
</button>
</div>
... ...
... ... @@ -14,18 +14,7 @@
</form>-->
<form class="js-ajax-form" action="" method="post">
<table class="table table-hover table-bordered">
<div class="table-actions">
<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
data-action="{:url('activity/publish',array('yes'=>1))}" data-subcheck="true">发布
</button>
<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
data-action="{:url('activity/publish',array('no'=>1))}" data-subcheck="true">取消发布
</button>
<button class="btn btn-danger btn-sm js-ajax-submit"
data-action="{:url('activity/delete')}" data-subcheck="true" data-msg="你确定删除吗?">
{:lang('DELETE')}
</button>
</div>
<thead>
<tr>
<th width="15">
... ... @@ -59,7 +48,7 @@
<td>{$vo.work_time}</td>
<td>
<a href='{:url("edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>|
<a class="js-ajax-delete" href="{:url('activity/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
<a class="js-ajax-delete" href="{:url('trainDelete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
<a href="{:url('questionList',array('id'=>$vo['id']))}">查看题目</a>
</td>
</tr>
... ...