...
|
...
|
@@ -1008,6 +1008,31 @@ class MemberCenterController extends RestBaseController |
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* @title 编辑用户昵称
|
|
|
* @description 编辑用户昵称
|
|
|
* @author XiaoGang Wang
|
|
|
* @url /index/member_center/editUserNickname
|
|
|
* @method GET
|
|
|
*
|
|
|
* @header name:XX-Token require:1 default: desc:token
|
|
|
*/
|
|
|
public function editUserNickname(){
|
|
|
$name=input('name');
|
|
|
if (empty($name)){
|
|
|
$this->error('编辑失败');
|
|
|
}
|
|
|
$userId=$this->getUserId();
|
|
|
$Volunteer=new VolunteerModel();
|
|
|
$update['nickname']=$name;
|
|
|
$result=$Volunteer->where('user_id',$userId)->update($update);
|
|
|
if (empty($result)){
|
|
|
$this->error('编辑失败');
|
|
|
}else{
|
|
|
$this->success('编辑成功');
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|