更新若干功能
This commit is contained in:
@@ -64,4 +64,19 @@ class WxUserCenterService extends BaseWxService
|
||||
]);
|
||||
return ['nick_name' => $nickName];
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前用户绑定的企业资料,给企业详情页
|
||||
*/
|
||||
public function enterprise(): array
|
||||
{
|
||||
$user = WxUserModel::with('enterprise')->where('id', $this->userId)->first();
|
||||
$ent = $user['enterprise'] ?? null;
|
||||
if (empty($ent)) {
|
||||
$this->utils->errorThrow('未绑定企业');
|
||||
}
|
||||
$row = is_array($ent) ? $ent : $ent->toArray();
|
||||
$row['logo'] = \App\Service\common\MediaUrlService::getInstance()->toPublic($row['logo'] ?? '');
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user