更新若干功能
Some checks failed
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
Tests / PHP 8.4 (push) Has been cancelled

This commit is contained in:
2026-08-20 19:16:49 +08:00
parent 72bc6502eb
commit 4ddf5e3c5f
48 changed files with 1908 additions and 18 deletions

View File

@@ -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;
}
}