Files
assetx/antdesign/fix-routes.sh
default 2ee4553b71 init: 初始化 AssetX 项目仓库
包含 webapp(Next.js 用户端)、webapp-back(Go 后端)、
antdesign(管理后台)、landingpage(营销落地页)、
数据库 SQL 和配置文件。
2026-03-27 11:26:43 +00:00

48 lines
1.7 KiB
Bash
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
echo "🔧 修复 Ant Design Pro 路由问题"
echo "================================"
# 1. 清理缓存
echo "1⃣ 清理缓存..."
rm -rf src/.umi
rm -rf node_modules/.cache
rm -rf .umi
rm -rf .umi-production
# 2. 检查页面文件
echo "2⃣ 检查页面文件..."
echo "✓ Vault/Trade: $(test -f src/pages/Vault/Trade/index.tsx && echo '存在' || echo '❌ 不存在')"
echo "✓ Vault/USDC: $(test -f src/pages/Vault/USDC/index.tsx && echo '存在' || echo '❌ 不存在')"
echo "✓ LP: $(test -f src/pages/LP/index.ts && echo '存在' || echo '❌ 不存在')"
echo "✓ Statistics/Holders: $(test -f src/pages/Statistics/Holders/index.tsx && echo '存在' || echo '❌ 不存在')"
echo "✓ Admin/Factory: $(test -f src/pages/Admin/Factory/index.tsx && echo '存在' || echo '❌ 不存在')"
echo "✓ Admin/Lending: $(test -f src/pages/Admin/Lending/index.tsx && echo '存在' || echo '❌ 不存在')"
echo "✓ Lending/User: $(test -f src/pages/Lending/User/index.tsx && echo '存在' || echo '❌ 不存在')"
# 3. 验证 export default
echo ""
echo "3⃣ 验证 default export..."
for file in src/pages/Vault/Trade/index.tsx src/pages/Vault/USDC/index.tsx src/pages/Admin/Factory/index.tsx src/pages/Admin/Lending/index.tsx src/pages/Lending/User/index.tsx src/pages/Statistics/Holders/index.tsx; do
if [ -f "$file" ]; then
if grep -q "export default" "$file"; then
echo "$file"
else
echo "$file - 缺少 export default"
fi
fi
done
echo ""
echo "4⃣ 重启开发服务器..."
echo "================================"
echo ""
echo "请手动执行:"
echo " pnpm dev"
echo ""
echo "或者:"
echo " npm run dev"
echo ""
echo "然后在浏览器中刷新页面Ctrl+Shift+R 或 Cmd+Shift+R"