...
|
...
|
@@ -281,4 +281,39 @@ class CoachController extends RestBaseController |
|
|
});
|
|
|
$this->success("获取数据成功", $data);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* @title 教练审核编辑(新)
|
|
|
* @description
|
|
|
* @author Pan Haowen
|
|
|
* @url /home/coach/edit
|
|
|
* @method POST
|
|
|
* @header name:XX-Token require:1 default: desc:token
|
|
|
*/
|
|
|
public function edit(){
|
|
|
$userId = $this->getUserId();
|
|
|
$data=Db::name('coach')->where('user_id',$userId)->find();
|
|
|
$data['product_id']=implode(',',$data['product_id']);
|
|
|
$data['type']=implode(',',$data['type']);
|
|
|
$this->success("获取数据成功", $data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @title 教练审核编辑提交(新)
|
|
|
* @description
|
|
|
* @author Pan Haowen
|
|
|
* @url /home/coach/editPost
|
|
|
* @method POST
|
|
|
* @header name:XX-Token require:1 default: desc:token
|
|
|
*/
|
|
|
public function editPost(){
|
|
|
$userId = $this->getUserId();
|
|
|
$param = $this->request->param();
|
|
|
$param['create_time']=time();
|
|
|
$param['status']=0;
|
|
|
$param['product']=substr($param['product'],1,strlen($param['product'])-2);
|
|
|
Db::name('coach')->where('user_id', $userId)->update($param);
|
|
|
$this->success('操作成功');
|
|
|
}
|
|
|
} |
...
|
...
|
|