Browse Source

添加待释放

master
mac 4 months ago
parent
commit
d33176980f
  1. 1
      .env
  2. 47939
      package-lock.json
  3. 8
      package.json
  4. 2
      src/App.tsx
  5. 2
      src/config/index.ts
  6. 21
      src/package/SimpleTrade/pages/client/user/index.tsx
  7. 13420
      yarn.lock

1
.env

@ -0,0 +1 @@
SKIP_PREFLIGHT_CHECK=true

47939
package-lock.json
File diff suppressed because it is too large
View File

8
package.json

@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@ant-design/icons": "^4.0.6",
"@ant-design/icons": "4.0.6",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
@ -26,9 +26,9 @@
"less": "^3.11.1",
"less-loader": "^5.0.0",
"moment": "^2.24.0",
"react": "^16.13.1",
"react": "16.13.1",
"react-canvas-nest": "^1.0.10",
"react-dom": "^16.13.1",
"react-dom": "16.13.1",
"react-flow-renderer": "^10.3.17",
"react-redux": "^7.1.3",
"react-router-breadcrumbs-hoc": "^3.2.4",
@ -37,7 +37,7 @@
"redux": "^4.0.4",
"redux-persist": "^6.0.0",
"redux-promise": "^0.6.0",
"typescript": "^3.8.3"
"typescript": "^4.8.3"
},
"scripts": {
"start": "cross-env PORT=3000 react-app-rewired start",

2
src/App.tsx

@ -9,7 +9,7 @@ const App: FC = () => (
<Route
path="/"
key="container"
render={(props: unknown) => <Container {...props} />}
render={(props: any) => <Container {...props} />}
/>
</Router>
)

2
src/config/index.ts

@ -6,5 +6,5 @@ export const httpIp = {
}
export const getBaseURL = () => {
return httpIp.simpleTradeKey.dev
return httpIp.simpleTradeKey.prod
}

21
src/package/SimpleTrade/pages/client/user/index.tsx

@ -31,6 +31,7 @@ const UserList: FC = () => {
},
{
title: '地址',
width: 150,
dataIndex: 'address',
render: (address) => (
<div style={{ display: 'flex', alignItems: 'center' }}>
@ -51,7 +52,7 @@ const UserList: FC = () => {
},
{
title: 'A仓订单数量',
dataIndex: 'a_product'
dataIndex: 'a_product',
},
{
title: 'B账号',
@ -65,6 +66,10 @@ const UserList: FC = () => {
title: 'B仓订单数量',
dataIndex: 'b_product'
},
{
title: '待释放',
dataIndex: 'c_mt4_balance',
},
{
title: '手数',
dataIndex: 'volume'
@ -110,8 +115,8 @@ const UserList: FC = () => {
<Button style={{ marginLeft: 10 }} type="primary" className="btn" size="small" onClick={() => rename(record.remark, record.invite_code)}></Button>
</div>
<div style={{ marginTop: 10 }}>
<Popconfirm title={`确认${!record.deactivate?'停用':'启用'}账号?`} onConfirm={()=>deactivateAccount(record.invite_code,record.deactivate)}>
<Button type="primary" className="btn" size="small" danger={!record.deactivate}>{!record.deactivate ? '停用账号' :'启用账号'}</Button>
<Popconfirm title={`确认${!record.deactivate ? '停用' : '启用'}账号?`} onConfirm={() => deactivateAccount(record.invite_code, record.deactivate)}>
<Button type="primary" className="btn" size="small" danger={!record.deactivate}>{!record.deactivate ? '停用账号' : '启用账号'}</Button>
</Popconfirm>
</div>
</div>
@ -129,12 +134,12 @@ const UserList: FC = () => {
]
const nicknameRefs = useRef(null)
const deactivateAccount = async (code:string,status:boolean)=>{
const res:any = await clientApi.user_deactivate({
invite_code:code,
deactivate:!status
const deactivateAccount = async (code: string, status: boolean) => {
const res: any = await clientApi.user_deactivate({
invite_code: code,
deactivate: !status
})
if(res.code === 0){
if (res.code === 0) {
notification.success({
message: !status ? '停用成功' : '启用成功'
})

13420
yarn.lock
File diff suppressed because it is too large
View File

Loading…
Cancel
Save