...
|
...
|
@@ -43,11 +43,21 @@ class MemberCenterController extends RestBaseController |
|
|
* @return user_nickname:用户昵称
|
|
|
* @return avatar:头像
|
|
|
* @return type:类型(1为普通,2为管理员)
|
|
|
* @return is_submit:0为未提交过,1为已提交过
|
|
|
*/
|
|
|
public function index(){
|
|
|
$user_id = $this->getUserId();
|
|
|
//判断当前用户是否提交过
|
|
|
$volunteerModel = new VolunteerModel();
|
|
|
$result = $volunteerModel->findData(array('user_id'=>$user_id,'status'=>2,'delete_time'=>0));
|
|
|
if(empty($result)){
|
|
|
$is_submit = 0;
|
|
|
}else{
|
|
|
$is_submit = 1;
|
|
|
}
|
|
|
$userModel = new UserModel();
|
|
|
$user = $userModel->findData(array('id'=>$user_id));
|
|
|
$user['is_submit'] = $is_submit;
|
|
|
$this->success('获取成功!',$user);
|
|
|
}
|
|
|
/**
|
...
|
...
|
|