新增通过链接邀请组织成员
This commit is contained in:
parent
57f383a413
commit
6c6016f9f5
@ -100,6 +100,27 @@ class ProjectMember extends BasicApi
|
||||
$this->success('', array_values($tempList));//数组下标重置
|
||||
}
|
||||
|
||||
/**
|
||||
* 邀请成员
|
||||
*/
|
||||
public function _joinProject()
|
||||
{
|
||||
$inviteCode = Request::param('inviteCode');
|
||||
$project = $this->model->where(['invite_code' => $inviteCode])->find();
|
||||
if (!$project) {
|
||||
$this->error('该项目已失效');
|
||||
}
|
||||
if (nowTime() >= $project['invite_over_time']) {
|
||||
$this->error('该链接已失效');
|
||||
}
|
||||
try {
|
||||
$this->model->inviteMember($data['memberCode'], $data['projectCode']);
|
||||
} catch (\Exception $e) {
|
||||
$this->error($e->getMessage(), $e->getCode());;
|
||||
}
|
||||
$this->success('');
|
||||
}
|
||||
|
||||
/**
|
||||
* 邀请成员
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user