同步团队成员头像
Signed-off-by: vilson <545522390@qq.com>
This commit is contained in:
parent
6876700048
commit
5d5a3d2694
@ -176,6 +176,27 @@ class Account extends BasicApi
|
|||||||
$this->success('', ['organizationList' => $organizationList, 'currentOrganization' => $organization]);
|
$this->success('', ['organizationList' => $organizationList, 'currentOrganization' => $organization]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新本团队内的头像和手机、邮箱
|
||||||
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
|
* @throws \think\db\exception\ModelNotFoundException
|
||||||
|
* @throws \think\exception\DbException
|
||||||
|
*/
|
||||||
|
public function _syncDetail()
|
||||||
|
{
|
||||||
|
$code = Request::post('code');
|
||||||
|
$memberAccount = $this->model->where(['code' => $code])->find();
|
||||||
|
$memberInfo = Member::where('code', $memberAccount['member_code'])->find();
|
||||||
|
if (!$memberInfo) {
|
||||||
|
$this->error("更新失败!");
|
||||||
|
}
|
||||||
|
$memberAccount->avatar = $memberInfo['avatar'];
|
||||||
|
!$memberAccount->mobile && $memberAccount->mobile = $memberInfo['mobile'];
|
||||||
|
!$memberAccount->email && $memberAccount->email = $memberInfo['email'];
|
||||||
|
$memberAccount->save();
|
||||||
|
$this->success('更新成功');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 账户添加
|
* 账户添加
|
||||||
* @return array|string
|
* @return array|string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user