Commit 49d6f7b8 authored by zfc's avatar zfc

b端h5客户新增添加id返回值

parent fc18daa6
......@@ -41,25 +41,34 @@ class Client extends Basic
*/
public function editClient() {
header('Access-Control-Allow-Origin:*');
$data=array();
if ($this->params['user_nick'] || $this->params['user_nick'] || $this->params['id']) {
if ($this->request->isPost()) {
if ($this->params['id']) {
$this->data = $this->user->edit($this->params, $this->params['id']);
$data['start'] = $this->user->edit($this->params, $this->params['id']);
} else {
$this->data = $this->user->edit($this->params);
if ($this->data == -1) {
$data['start'] = $this->user->edit($this->params);
if ($data['start'] == -1) {
$this->code = 101;
$this->msg = '该用户已存在';
}
if($data['start']==1){
$data['id']= $this->user->id;
}else{
$this->code = 101;
$this->msg = '提交重复!';
}
}
} else {
$this->data = $this->user->getClient($this->params['id']);
$data['start'] = $this->user->getClient($this->params['id']);
}
} else {
$this->code = 101;
$this->msg = 'user_nick or user_phone or id is null';
}
return $this->response($this->code, $this->msg,$this->data);
return $this->response($this->code, $this->msg,$data);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment