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
4bd14684
authored
Dec 01, 2023
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视觉优化
parent
35a3c610
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
10 deletions
+33
-10
web/src/components/MjLogsTable.js
+2
-2
web/src/components/RedemptionsTable.js
+13
-1
web/src/components/TokensTable.js
+13
-1
web/src/pages/Token/EditToken.js
+2
-2
web/src/pages/TopUp/index.js
+3
-4
No files found.
web/src/components/MjLogsTable.js
View file @
4bd14684
...
@@ -23,7 +23,7 @@ function renderType(type) {
...
@@ -23,7 +23,7 @@ function renderType(type) {
case
'DESCRIBE'
:
case
'DESCRIBE'
:
return
<
Tag
color
=
"yellow"
size
=
'large'
>
图生文
<
/Tag>
;
return
<
Tag
color
=
"yellow"
size
=
'large'
>
图生文
<
/Tag>
;
case
'BLEAND'
:
case
'BLEAND'
:
return
<
Tag
color
=
"
oliv
e"
size
=
'large'
>
图混合
<
/Tag>
;
return
<
Tag
color
=
"
lim
e"
size
=
'large'
>
图混合
<
/Tag>
;
default
:
default
:
return
<
Tag
color
=
"black"
size
=
'large'
>
未知
<
/Tag>
;
return
<
Tag
color
=
"black"
size
=
'large'
>
未知
<
/Tag>
;
}
}
...
@@ -35,7 +35,7 @@ function renderCode(code) {
...
@@ -35,7 +35,7 @@ function renderCode(code) {
case
1
:
case
1
:
return
<
Tag
color
=
"green"
size
=
'large'
>
已提交
<
/Tag>
;
return
<
Tag
color
=
"green"
size
=
'large'
>
已提交
<
/Tag>
;
case
21
:
case
21
:
return
<
Tag
color
=
"
oliv
e"
size
=
'large'
>
排队中
<
/Tag>
;
return
<
Tag
color
=
"
lim
e"
size
=
'large'
>
排队中
<
/Tag>
;
case
22
:
case
22
:
return
<
Tag
color
=
"orange"
size
=
'large'
>
重复提交
<
/Tag>
;
return
<
Tag
color
=
"orange"
size
=
'large'
>
重复提交
<
/Tag>
;
default
:
default
:
...
...
web/src/components/RedemptionsTable.js
View file @
4bd14684
...
@@ -324,6 +324,18 @@ const RedemptionsTable = () => {
...
@@ -324,6 +324,18 @@ const RedemptionsTable = () => {
},
},
};
};
const
handleRow
=
(
record
,
index
)
=>
{
if
(
record
.
status
!==
1
)
{
return
{
style
:
{
background
:
'var(--semi-color-disabled-border)'
,
},
};
}
else
{
return
{};
}
};
return
(
return
(
<>
<>
<
EditRedemption
refresh
=
{
refresh
}
editingRedemption
=
{
editingRedemption
}
visiable
=
{
showEdit
}
<
EditRedemption
refresh
=
{
refresh
}
editingRedemption
=
{
editingRedemption
}
visiable
=
{
showEdit
}
...
@@ -353,7 +365,7 @@ const RedemptionsTable = () => {
...
@@ -353,7 +365,7 @@ const RedemptionsTable = () => {
// setActivePage(1);
// setActivePage(1);
// },
// },
onPageChange
:
handlePageChange
,
onPageChange
:
handlePageChange
,
}}
loading
=
{
loading
}
rowSelection
=
{
rowSelection
}
>
}}
loading
=
{
loading
}
rowSelection
=
{
rowSelection
}
onRow
=
{
handleRow
}
>
<
/Table
>
<
/Table
>
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{
()
=>
{
()
=>
{
...
...
web/src/components/TokensTable.js
View file @
4bd14684
...
@@ -437,6 +437,18 @@ const TokensTable = () => {
...
@@ -437,6 +437,18 @@ const TokensTable = () => {
},
},
};
};
const
handleRow
=
(
record
,
index
)
=>
{
if
(
record
.
status
!==
1
)
{
return
{
style
:
{
background
:
'var(--semi-color-disabled-border)'
,
},
};
}
else
{
return
{};
}
};
return
(
return
(
<>
<>
<
EditToken
refresh
=
{
refresh
}
editingToken
=
{
editingToken
}
visiable
=
{
showEdit
}
handleClose
=
{
closeEdit
}
><
/EditToken
>
<
EditToken
refresh
=
{
refresh
}
editingToken
=
{
editingToken
}
visiable
=
{
showEdit
}
handleClose
=
{
closeEdit
}
><
/EditToken
>
...
@@ -473,7 +485,7 @@ const TokensTable = () => {
...
@@ -473,7 +485,7 @@ const TokensTable = () => {
setActivePage
(
1
);
setActivePage
(
1
);
},
},
onPageChange
:
handlePageChange
,
onPageChange
:
handlePageChange
,
}}
loading
=
{
loading
}
rowSelection
=
{
rowSelection
}
>
}}
loading
=
{
loading
}
rowSelection
=
{
rowSelection
}
onRow
=
{
handleRow
}
>
<
/Table
>
<
/Table
>
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{
()
=>
{
()
=>
{
...
...
web/src/pages/Token/EditToken.js
View file @
4bd14684
...
@@ -151,13 +151,13 @@ const EditToken = (props) => {
...
@@ -151,13 +151,13 @@ const EditToken = (props) => {
if
(
successCount
>
0
)
{
if
(
successCount
>
0
)
{
showSuccess
(
`
${
successCount
}
个令牌创建成功,请在列表页面点击复制获取令牌!`
);
showSuccess
(
`
${
successCount
}
个令牌创建成功,请在列表页面点击复制获取令牌!`
);
props
.
refresh
();
props
.
handleClose
();
}
}
}
}
setLoading
(
false
);
setLoading
(
false
);
setInputs
(
originInputs
);
// 重置表单
setInputs
(
originInputs
);
// 重置表单
setTokenCount
(
1
);
// 重置数量为默认值
setTokenCount
(
1
);
// 重置数量为默认值
props
.
refresh
();
props
.
handleClose
();
};
};
...
...
web/src/pages/TopUp/index.js
View file @
4bd14684
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Confirm
}
from
'semantic-ui-react'
;
import
{
API
,
isMobile
,
showError
,
showInfo
,
showSuccess
}
from
'../../helpers'
;
import
{
API
,
isMobile
,
showError
,
showInfo
,
showSuccess
}
from
'../../helpers'
;
import
{
renderNumber
,
renderQuota
}
from
'../../helpers/render'
;
import
{
renderNumber
,
renderQuota
}
from
'../../helpers/render'
;
import
{
Col
,
Layout
,
Row
,
Typography
,
Card
,
Button
,
Form
,
Divider
,
Space
,
Modal
}
from
"@douyinfe/semi-ui"
;
import
{
Col
,
Layout
,
Row
,
Typography
,
Card
,
Button
,
Form
,
Divider
,
Space
,
Modal
}
from
"@douyinfe/semi-ui"
;
...
@@ -179,8 +178,8 @@ const TopUp = () => {
...
@@ -179,8 +178,8 @@ const TopUp = () => {
size
=
{
'small'
}
size
=
{
'small'
}
centered
=
{
true
}
centered
=
{
true
}
>
>
<
p
>
充值数量:
{
topUpCount
}
<
/p
>
<
p
>
充值数量:
{
topUpCount
}
$
<
/p
>
<
p
>
充值
金额:
{
renderAmount
()}
<
/p
>
<
p
>
实付
金额:
{
renderAmount
()}
<
/p
>
<
p
>
是否确认充值?
<
/p
>
<
p
>
是否确认充值?
<
/p
>
<
/Modal
>
<
/Modal
>
<
div
style
=
{{
marginTop
:
20
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
div
style
=
{{
marginTop
:
20
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
...
@@ -224,7 +223,7 @@ const TopUp = () => {
...
@@ -224,7 +223,7 @@ const TopUp = () => {
<
Form
>
<
Form
>
<
Form
.
Input
<
Form
.
Input
field
=
{
'redemptionCount'
}
field
=
{
'redemptionCount'
}
label
=
{
'
充值
金额:'
+
renderAmount
()}
label
=
{
'
实付
金额:'
+
renderAmount
()}
placeholder
=
'充值数量'
placeholder
=
'充值数量'
name
=
'redemptionCount'
name
=
'redemptionCount'
type
=
{
'number'
}
type
=
{
'number'
}
...
...
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