新增管理师移动端前端模块

This commit is contained in:
2026-06-29 20:58:39 +08:00
parent 9cfaac3e18
commit 48c47fe3ff
78 changed files with 9276 additions and 5 deletions
@@ -495,12 +495,20 @@ function Build-ReleasePackage {
Invoke-Native "npm" @("ci") $frontendRoot
}
Invoke-Native "npm" @("run", "build") $frontendRoot
Write-Step "构建 FM-Front"
$managerMobileRoot = Join-Path $resolvedRepoRoot "FM-Front"
if (-not (Test-Path -LiteralPath (Join-Path $managerMobileRoot "node_modules"))) {
Invoke-Native "npm" @("ci") $managerMobileRoot
}
Invoke-Native "npm" @("run", "build") $managerMobileRoot
}
$coreJar = Join-Path $resolvedRepoRoot "FD-Core\target\FingertipDesigner-Core.jar"
$gatewayJar = Join-Path $resolvedRepoRoot "FD-Gateway\target\FingertipDesigner-Gateway.jar"
$frontendDist = Join-Path $resolvedRepoRoot "FD-Frontend\dist"
foreach ($requiredPath in @($coreJar, $gatewayJar, $frontendDist, $InitSqlPath)) {
$managerMobileDist = Join-Path $resolvedRepoRoot "FM-Front\dist"
foreach ($requiredPath in @($coreJar, $gatewayJar, $frontendDist, $managerMobileDist, $InitSqlPath)) {
if (-not (Test-Path -LiteralPath $requiredPath)) {
throw "缺少发布产物:$requiredPath"
}
@@ -521,7 +529,17 @@ function Build-ReleasePackage {
if (Test-Path -LiteralPath $frontendArtifact) {
Remove-Item -LiteralPath $frontendArtifact -Force
}
Invoke-Native $tar.Source @("-czf", $frontendArtifact, "-C", (Join-Path $resolvedRepoRoot "FD-Frontend"), "dist")
$frontendStagingRoot = Join-Path $frontendDir "web-dist"
$frontendStagingDist = Join-Path $frontendStagingRoot "dist"
$managerMobileStagingDist = Join-Path $frontendStagingDist "fm-front"
if (Test-Path -LiteralPath $frontendStagingRoot) {
Remove-Item -LiteralPath $frontendStagingRoot -Recurse -Force
}
New-Item -ItemType Directory -Force -Path $frontendStagingRoot, $managerMobileStagingDist | Out-Null
Copy-Item -LiteralPath $frontendDist -Destination $frontendStagingRoot -Recurse -Force
Copy-Item -Path (Join-Path $managerMobileDist "*") -Destination $managerMobileStagingDist -Recurse -Force
Invoke-Native $tar.Source @("-czf", $frontendArtifact, "-C", $frontendStagingRoot, "dist")
Remove-Item -LiteralPath $frontendStagingRoot -Recurse -Force
$hashes = foreach ($artifact in @($coreArtifact, $gatewayArtifact, $frontendArtifact, $sqlArtifact)) {
$hash = Get-FileHash -LiteralPath $artifact -Algorithm SHA256
@@ -750,6 +768,7 @@ function Write-ReleaseManifest {
gatewayRemoteAppDir = $GatewayRemoteAppDir
webRemoteDir = $WebRemoteDir
publicBaseUrl = $PublicBaseUrl
managerMobileWeb = "$PublicBaseUrl/fm-front/"
managerMiniProgramApi = "$PublicBaseUrl/api/admin"
nacosNamespace = "FingertipDesigner"
dryRun = [bool]$DryRun
@@ -765,11 +784,12 @@ function Invoke-PublicSmokeTests {
Write-Host "DryRun public smoke tests:"
Write-Host "GET $PublicBaseUrl/health/check"
Write-Host "GET $PublicBaseUrl/api/shop/list"
Write-Host "GET $PublicBaseUrl/fm-front/"
return
}
Write-Step "生产公开冒烟"
foreach ($url in @("$PublicBaseUrl/health/check", "$PublicBaseUrl/api/shop/list")) {
foreach ($url in @("$PublicBaseUrl/health/check", "$PublicBaseUrl/api/shop/list", "$PublicBaseUrl/fm-front/")) {
Write-Host "GET $url"
$response = Invoke-WebRequest -Uri $url -UseBasicParsing -TimeoutSec 20
Write-Host "Status $($response.StatusCode) Length $($response.RawContentLength)"