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

志愿者修改

... ... @@ -37,11 +37,15 @@ class TeamController extends AdminBaseController
*/
public function applylist(){
$param=$this->request->param();
$map=[];
$data= db('team_apply')->alias('t')->join('volunteer v','v.user_id=t.user_id')->where($map)->order('t.id desc')->paginate();
$map['t.team_id']=$param['id'];
$data= db('team_apply')
->field('t.*,v.name')
->alias('t')->join('volunteer v','v.user_id=t.user_id')
->where($map)
->order('t.id desc')
->paginate();
$data->appends($param);
$list=$data->items();
dump($list);
$this->assign([
'data'=>$list,
'page'=>$data->render(),
... ... @@ -82,4 +86,16 @@ class TeamController extends AdminBaseController
$info=db('team')->where('id',$data['id'])->update($data);
$this->success('操作成功!');
}
public function apply_pass(){
$data=input();
$update['status']=$data['status'];
$info=db('team_apply')->where('id',$data['id'])->update($update);
if (!empty($info)){
$this->success('操作成功!');
}else{
$this->error('操作失败');
}
}
}
\ No newline at end of file
... ...
... ... @@ -49,16 +49,13 @@
<td>{$vo.wx_id}</td>
<td>{$vo.mobile}</td>
<td>{$vo.join_reason}</td>
<if condition="$vo.status==1"> <td>审核中</td> </if>
<if condition="$vo.status==2"> <td>审核通过</td> </if>
<if condition="$vo.status==3"> <td>审核失败</td> </if>
<if condition="$vo.status==0"> <td>审核中</td> </if>
<if condition="$vo.status==1"> <td>审核通过</td> </if>
<if condition="$vo.status==-1"> <td>审核失败</td> </if>
<td>
<a href='{:url("applyList",array("id"=>$vo["id"]))}'>团队申请列表</a>|
<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>
<if condition="$vo.status==1">|
<a class="js-ajax-dialog-btn" data-msg="确定通审核吗?" href="{:url('pass',array('id'=>$vo['id'],'status'=>'2'))}">通过审核</a>|
<a class="js-ajax-dialog-btn" data-msg="确定拒绝通过吗?" href="{:url('pass',array('id'=>$vo['id'],'status'=>'3'))}">不通过审核</a>|
<if condition="$vo.status==0">
<a class="js-ajax-dialog-btn" data-msg="确定通审核吗?" href="{:url('apply_pass',array('id'=>$vo['id'],'status'=>'1'))}">通过审核</a>|
<a class="js-ajax-dialog-btn" data-msg="确定拒绝通过吗?" href="{:url('apply_pass',array('id'=>$vo['id'],'status'=>'-1'))}">不通过审核</a>
</if>
... ...