#!/bin/bash set -e echo "=========================================" echo " 服务状态检查" echo "=========================================" API_STATUS="❌ 未运行" ADMIN_STATUS="❌ 未运行" if curl -s http://localhost:8080/api/health > /dev/null 2>&1; then API_STATUS="✅ 运行中 (http://localhost:8080/api/health)" fi if curl -s http://localhost:5173 > /dev/null 2>&1; then ADMIN_STATUS="✅ 运行中 (http://localhost:5173)" fi echo "API 服务: $API_STATUS" echo "Admin 服务: $ADMIN_STATUS" echo "=========================================" if [[ "$API_STATUS" == *"✅"* ]] && [[ "$ADMIN_STATUS" == *"✅"* ]]; then exit 0 else exit 1 fi