Initial commit: 风影 OA 全栈源码(API/Web/Flutter/IM)

含 Phase 1.1 IM seq 排序、断线重连、多端已读同步与微信式语音转文字 UI。
排除 node_modules、构建产物、安装包与 .env 密钥。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-02 10:04:03 +00:00
commit 76f266645d
507 changed files with 99891 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
# 本地 API 功能冒烟测试(不打包)
set -euo pipefail
BASE="${API_BASE:-http://127.0.0.1:3000/api/v1}"
PASS="${TEST_PASS:-Admin@123456}"
USER="${TEST_USER:-admin}"
echo "== health =="
curl -sf "$BASE/health/live" | head -c 200; echo
echo "== login =="
LOGIN=$(curl -sf -X POST "$BASE/auth/login" -H 'Content-Type: application/json' -d "{\"username\":\"$USER\",\"password\":\"$PASS\",\"agreeTerms\":true}")
TOKEN=$(echo "$LOGIN" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('data',{}).get('accessToken','') or d.get('accessToken',''))")
if [ -z "$TOKEN" ]; then echo "LOGIN FAIL: $LOGIN"; exit 1; fi
echo "token ok (${#TOKEN} chars)"
AUTH="Authorization: Bearer $TOKEN"
echo "== app-release =="
curl -sf "$BASE/system/app-release" -H "$AUTH" | python3 -m json.tool | head -15
echo "== im status =="
curl -sf "$BASE/im/status" -H "$AUTH" | python3 -m json.tool | head -10
echo "== voice transcribe (expect 400 bad fileId) =="
CODE=$(curl -s -o /tmp/asr.json -w '%{http_code}' -X POST "$BASE/im/voice/transcribe" -H "$AUTH" -H 'Content-Type: application/json' -d '{"fileId":""}')
echo "HTTP $CODE"; cat /tmp/asr.json; echo
echo "== attendance punch-status (no coords) =="
curl -sf "$BASE/attendance/punch-status?mode=OFFICE" -H "$AUTH" | python3 -m json.tool | head -12
echo "ALL SMOKE CHECKS DONE"