Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
38021383
authored
Jul 10, 2025
by
wzxjohn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: wrong loading state while top up
parent
34c94220
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
web/src/pages/TopUp/index.js
+2
-3
No files found.
web/src/pages/TopUp/index.js
View file @
38021383
...
...
@@ -168,6 +168,7 @@ const TopUp = () => {
showError
(
t
(
'管理员未开启在线充值!'
));
return
;
}
setPayWay
(
payment
);
setPaymentLoading
(
true
);
try
{
await
getAmount
();
...
...
@@ -175,7 +176,6 @@ const TopUp = () => {
showError
(
t
(
'充值数量不能小于'
)
+
minTopUp
);
return
;
}
setPayWay
(
payment
);
setOpen
(
true
);
}
catch
(
error
)
{
showError
(
t
(
'获取金额失败'
));
...
...
@@ -193,7 +193,6 @@ const TopUp = () => {
return
;
}
setConfirmLoading
(
true
);
setOpen
(
false
);
try
{
const
res
=
await
API
.
post
(
'/api/user/pay'
,
{
amount
:
parseInt
(
topUpCount
),
...
...
@@ -234,6 +233,7 @@ const TopUp = () => {
console
.
log
(
err
);
showError
(
t
(
'支付请求失败'
));
}
finally
{
setOpen
(
false
);
setConfirmLoading
(
false
);
}
};
...
...
@@ -255,7 +255,6 @@ const TopUp = () => {
}
catch
(
error
)
{
showError
(
t
(
'获取金额失败'
));
}
finally
{
setPayWay
(
''
)
setPaymentLoading
(
false
);
}
};
...
...
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