feat(api): strip CRMEB-PRO prefix from getVersion response

The admin auth page rendered the raw version string from the .version
file (e.g. "CRMEB-PRO v3.5.1"); strip the vendor brand prefix at the
controller boundary so display matches the rebranded UI without
touching internal version detection.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
danaisuiyuan
2026-05-10 12:06:19 +08:00
parent b9d70438b1
commit c96b074dda

View File

@@ -487,10 +487,12 @@ class SystemConfig extends AuthController
public function getVersion()
{
$version = get_crmeb_version();
$label = strripos($version, 'min') === false ? 3 : 2;
$displayVersion = preg_replace('/^CRMEB-PRO\s*/i', '', (string)$version);
return $this->success([
'version' => $version,
'label' => strripos($version, 'min') === false ? 3 : 2
'version' => $displayVersion,
'label' => $label,
]);
}