|
@ -31,6 +31,7 @@ const UserList: FC = () => { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '地址', |
|
|
title: '地址', |
|
|
|
|
|
width: 150, |
|
|
dataIndex: 'address', |
|
|
dataIndex: 'address', |
|
|
render: (address) => ( |
|
|
render: (address) => ( |
|
|
<div style={{ display: 'flex', alignItems: 'center' }}> |
|
|
<div style={{ display: 'flex', alignItems: 'center' }}> |
|
@ -51,7 +52,7 @@ const UserList: FC = () => { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: 'A仓订单数量', |
|
|
title: 'A仓订单数量', |
|
|
dataIndex: 'a_product' |
|
|
|
|
|
|
|
|
dataIndex: 'a_product', |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: 'B账号', |
|
|
title: 'B账号', |
|
@ -65,6 +66,10 @@ const UserList: FC = () => { |
|
|
title: 'B仓订单数量', |
|
|
title: 'B仓订单数量', |
|
|
dataIndex: 'b_product' |
|
|
dataIndex: 'b_product' |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '待释放', |
|
|
|
|
|
dataIndex: 'c_mt4_balance', |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '手数', |
|
|
title: '手数', |
|
|
dataIndex: 'volume' |
|
|
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> |
|
|
<Button style={{ marginLeft: 10 }} type="primary" className="btn" size="small" onClick={() => rename(record.remark, record.invite_code)}>修改备注</Button> |
|
|
</div> |
|
|
</div> |
|
|
<div style={{ marginTop: 10 }}> |
|
|
<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> |
|
|
</Popconfirm> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -129,12 +134,12 @@ const UserList: FC = () => { |
|
|
] |
|
|
] |
|
|
const nicknameRefs = useRef(null) |
|
|
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({ |
|
|
notification.success({ |
|
|
message: !status ? '停用成功' : '启用成功' |
|
|
message: !status ? '停用成功' : '启用成功' |
|
|
}) |
|
|
}) |
|
|