feat: 配置开发环境和清理项目结构

- 修改默认路由重定向到首页 (/home)
- 配置开发服务器使用5667端口
- 整理测试文件到temp-tests目录
- 优化项目结构便于开发和部署

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
woshiqp465
2025-09-15 21:35:49 +08:00
parent 9be0b9788f
commit 9683b940bf
37 changed files with 3 additions and 223 deletions

51
temp-tests/test-simple.js Normal file
View File

@@ -0,0 +1,51 @@
import { chromium } from 'playwright';
(async () => {
const browser = await chromium.launch({
headless: false,
slowMo: 500,
});
const page = await browser.newPage();
try {
console.log('访问交易管理页面...');
await page.goto('http://localhost:5667/finance/transaction');
await page.waitForTimeout(3000);
console.log('点击新建按钮...');
const createBtn = await page
.locator('button')
.filter({ hasText: '新建' })
.first();
await createBtn.click();
console.log('等待弹窗...');
await page.waitForTimeout(2000);
console.log('填写金额...');
const amountInput = await page
.locator('input.ant-input-number-input')
.first();
await amountInput.clear();
await amountInput.fill('100');
console.log('点击提交...');
const submitBtn = await page
.locator('button')
.filter({ hasText: '确定' })
.first();
await submitBtn.click();
console.log('等待结果...');
await page.waitForTimeout(3000);
console.log('测试完成!');
} catch (error) {
console.error('错误:', error.message);
} finally {
console.log('浏览器将保持打开10秒请手动检查...');
await page.waitForTimeout(10_000);
await browser.close();
}
})();