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
6eeb61aa
authored
Feb 23, 2024
by
1808837298@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 未配置在线支付时,限制用户输入金额 (close #74)
parent
ef9fbb8e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
controller/misc.go
+1
-0
web/src/pages/TopUp/index.js
+8
-0
No files found.
controller/misc.go
View file @
6eeb61aa
...
...
@@ -38,6 +38,7 @@ func GetStatus(c *gin.Context) {
"enable_drawing"
:
common
.
DrawingEnabled
,
"enable_data_export"
:
common
.
DataExportEnabled
,
"data_export_default_time"
:
common
.
DataExportDefaultTime
,
"enable_online_topup"
:
common
.
PayAddress
!=
""
&&
common
.
EpayId
!=
""
&&
common
.
EpayKey
!=
""
,
},
})
return
...
...
web/src/pages/TopUp/index.js
View file @
6eeb61aa
...
...
@@ -54,6 +54,10 @@ const TopUp = () => {
};
const
preTopUp
=
async
(
payment
)
=>
{
if
(
!
enableOnlineTopUp
)
{
showError
(
'管理员未开启在线充值!'
);
return
;
}
if
(
amount
===
0
)
{
await
getAmount
();
}
...
...
@@ -128,6 +132,9 @@ const TopUp = () => {
if
(
status
.
top_up_link
)
{
setTopUpLink
(
status
.
top_up_link
);
}
if
(
status
.
enable_online_top_up
)
{
setEnableOnlineTopUp
(
status
.
enable_online_topup
);
}
}
getUserQuota
().
then
();
},
[]);
...
...
@@ -229,6 +236,7 @@ const TopUp = () => {
<
/Divider
>
<
Form
>
<
Form
.
Input
disabled
=
{
!
enableOnlineTopUp
}
field
=
{
'redemptionCount'
}
label
=
{
'实付金额:'
+
renderAmount
()}
placeholder
=
'充值数量'
...
...
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