1.提交缺失的东西
This commit is contained in:
@ -272,13 +272,13 @@ class AccountController extends BaseApiController
|
||||
{
|
||||
$post = $this->request->post();
|
||||
if (!isset($post['avatar']) || empty($post['avatar'])) {
|
||||
$this->fail('参数缺失');
|
||||
return $this->fail('参数缺失');
|
||||
}
|
||||
if (!isset($post['nickname']) || empty($post['nickname'])) {
|
||||
$this->fail('参数缺失');
|
||||
return $this->fail('参数缺失');
|
||||
}
|
||||
$data = LoginLogic::updateUser($post,$this->userId);
|
||||
$this->success($data['msg'], $data['data'], $data['code'], $data['show']);
|
||||
return $this->success("操作成功",$data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -705,7 +705,7 @@ class LoginLogic extends LogicBase
|
||||
// return self::dataError('非新用户无法使用此接口更新用户信息');
|
||||
// }
|
||||
Db::name('user')->where(['id'=>$user_id])->update(['nickname'=>$post['nickname'],'avatar'=>UrlServer::setFileUrl($post['avatar']),'is_new_user'=>0]);
|
||||
return self::dataSuccess('操作成功');
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user