fix(login): 修复登录成功后路由跳转问题
- 将登录成功后的路由跳转从 '/' 修改为 '/index' - 添加了测试脚本文件用于API功能验证 - 更新了服务器日志和前端构建输出日志文件
This commit is contained in:
13
test_api.ps1
Normal file
13
test_api.ps1
Normal file
@@ -0,0 +1,13 @@
|
||||
$body = '{"username":"aceykubbo","password":"axl123.0"}'
|
||||
try {
|
||||
$r = Invoke-WebRequest -Uri 'http://localhost:3001/api/login' -Method POST -ContentType 'application/json' -Body $body -TimeoutSec 10
|
||||
Write-Host "Status:" $r.StatusCode
|
||||
Write-Host "Body:" $r.Content
|
||||
} catch {
|
||||
Write-Host "Error:" $_.Exception.Message
|
||||
if ($_.Exception.Response) {
|
||||
$stream = $_.Exception.Response.GetResponseStream()
|
||||
$reader = New-Object System.IO.StreamReader($stream)
|
||||
Write-Host "Response:" $reader.ReadToEnd()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user