...
|
...
|
@@ -20,8 +20,14 @@ class TeamController extends AdminBaseController |
|
|
* @throws \think\exception\DbException
|
|
|
*/
|
|
|
public function index(){
|
|
|
$teamId=$this->getAdminTeamId();
|
|
|
$param=$this->request->param();
|
|
|
$map=[];
|
|
|
if ($teamId==0){
|
|
|
$map=[];
|
|
|
}else{
|
|
|
$map['id']=$teamId;
|
|
|
}
|
|
|
|
|
|
$data= db('team')->where($map)->order('id desc')->paginate();
|
|
|
$data->appends($param);
|
|
|
$list=$data->items();
|
...
|
...
|
@@ -29,6 +35,7 @@ class TeamController extends AdminBaseController |
|
|
'data'=>$list,
|
|
|
'page'=>$data->render(),
|
|
|
]);
|
|
|
$this->assign('teamId',$teamId);
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|
...
|
...
|
@@ -91,14 +98,16 @@ class TeamController extends AdminBaseController |
|
|
public function apply_pass(){
|
|
|
$data=input();
|
|
|
$update['status']=$data['status'];
|
|
|
$info=db('team_apply')->where('id',$data['id'])->find();
|
|
|
db('team')->where('id',$info['team_id'])->setInc('people_num');
|
|
|
$info=db('team_apply')->where('id',$data['id'])->update($update);
|
|
|
|
|
|
if (!empty($info)){
|
|
|
$this->success('操作成功!');
|
|
|
}else{
|
|
|
$this->error('操作失败');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 添加团队
|
|
|
* @return mixed
|
...
|
...
|
|