Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
523fa9f7
Unverified
Commit
523fa9f7
authored
Dec 27, 2025
by
IanShaw
Committed by
GitHub
Dec 27, 2025
Browse files
fix(frontend): 修复用户仪表板日期格式错误导致请求失败 (#55)
修复 loadRecentUsage 函数中日期格式问题,将 ISO 完整格式改为 YYYY-MM-DD 格式,与后端 API 期望一致。
parent
54636781
Changes
1
Show whitespace changes
Inline
Side-by-side
frontend/src/views/user/DashboardView.vue
View file @
523fa9f7
...
...
@@ -987,8 +987,8 @@ const loadChartData = async () => {
const
loadRecentUsage
=
async
()
=>
{
loadingUsage
.
value
=
true
try
{
const
endDate
=
new
Date
().
toISOString
()
const
startDate
=
new
Date
(
Date
.
now
()
-
7
*
24
*
60
*
60
*
1000
).
toISOString
()
const
endDate
=
new
Date
().
toISOString
()
.
split
(
'
T
'
)[
0
]
const
startDate
=
new
Date
(
Date
.
now
()
-
7
*
24
*
60
*
60
*
1000
).
toISOString
()
.
split
(
'
T
'
)[
0
]
const
usageResponse
=
await
usageAPI
.
getByDateRange
(
startDate
,
endDate
)
recentUsage
.
value
=
usageResponse
.
items
.
slice
(
0
,
5
)
}
catch
(
error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment