Platform upgrade: login auth fix, OCR/OSS upload, system menus and dicts, weather dashboard, weighing and invoice modules

This commit is contained in:
2026-08-14 01:12:33 +08:00
parent c377421a3e
commit 8099ebae0a
75 changed files with 5611 additions and 473 deletions
+5
View File
@@ -0,0 +1,5 @@
$ErrorActionPreference = "SilentlyContinue"
$root = (Get-Location).Path
Get-ChildItem -Path $root -Recurse -Depth 2 -Include *.png, *.jpg, *.jpeg -File |
Select-Object @{N='File';E={$_.FullName.Replace($root, '.')}}, @{N='KB';E={[math]::Round($_.Length/1KB,1)}}, LastWriteTime |
Format-Table -AutoSize | Out-String -Width 200
+10
View File
@@ -0,0 +1,10 @@
$ErrorActionPreference = "Stop"
$root = (Get-Location).Path
Start-Process -FilePath "dotnet" `
-ArgumentList @("run", "--no-build", "--project", "backend/AgriculturalPlatform.Api/AgriculturalPlatform.Api.csproj") `
-WorkingDirectory $root `
-RedirectStandardOutput "$root/backend-run.log" `
-RedirectStandardError "$root/backend-run.err.log" `
-WindowStyle Hidden
Start-Sleep -Seconds 6
Get-NetTCPConnection -LocalPort 5246 -ErrorAction SilentlyContinue | Where-Object State -eq Listen | Select-Object LocalPort, State, OwningProcess
+21
View File
@@ -0,0 +1,21 @@
$ErrorActionPreference = "Stop"
$appcode = "e3bdae1a73d2415492e7fdc024f07d08"
$url = "https://swcardpack.market.alicloudapi.com/ocr/idcard"
$imgUrl = "https://bbit-f8-web.oss-cn-chengdu.aliyuncs.com/uploads/idcard/202608/7f0c397e0c494e4fa5c6481fc5e6bc32.jpg?Expires=1786613281&OSSAccessKeyId=TMP.3KwrhonVXVt12i8MCDjV4C2pP4DTvz83YikWKjsyUR3rpz6Up5tYdjiaU6FYjgSMetNvfiw65dqZ7GrHknpsvbE4LpFGis&Signature=nIfh556Er3%2FRPFGm2qJLfYPHaYQ%3D"
try {
$resp = Invoke-WebRequest -Uri $url -Method Post `
-Headers @{ Authorization = "APPCODE $appcode" } `
-ContentType "application/x-www-form-urlencoded; charset=UTF-8" `
-Body @{ image_url = $imgUrl } -UseBasicParsing
Write-Output ("HTTP " + [int]$resp.StatusCode)
Write-Output $resp.Content
} catch {
$r = $_.Exception.Response
if ($r) {
$reader = New-Object System.IO.StreamReader($r.GetResponseStream())
Write-Output ("HTTP " + [int]$r.StatusCode)
Write-Output $reader.ReadToEnd()
} else {
Write-Output ("ERROR: " + $_.Exception.Message)
}
}