You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.4 KiB

2 years ago
  1. import React, { FC } from "react";
  2. import clientApi from "@/package/SimpleTrade/api/client";
  3. import MyTable from "@/components/MyTable";
  4. import { Input } from "antd";
  5. import { getTime, splitAddress } from "@/utils";
  6. const RechargeRecord: FC = () => {
  7. const columns = [
  8. {
  9. title: '用户ID',
  10. dataIndex: 'user_id'
  11. },
  12. {
  13. title: 'from地址',
  14. dataIndex: 'from_address',
  15. render: (_val) => (<div>{splitAddress(_val)}</div>)
  16. },
  17. {
  18. title: 'to地址',
  19. dataIndex: 'to_address',
  20. render: (_val) => (<div>{splitAddress(_val)}</div>)
  21. },
  22. {
  23. title: '链ID',
  24. dataIndex: 'chain_id'
  25. },
  26. {
  27. title: '区块高度',
  28. dataIndex: 'block_height'
  29. },
  30. {
  31. title: '数量',
  32. dataIndex: 'balance_real'
  33. },
  34. {
  35. title: '币种',
  36. dataIndex: 'symbol'
  37. },
  38. {
  39. title: '时间',
  40. dataIndex: 'create_time',
  41. render: (_time) => (<div>{getTime(_time * 1000)}</div>)
  42. }
  43. ]
  44. // 搜索栏配置项
  45. const searchConfigList = [
  46. {
  47. key: 'name',
  48. slot: <Input placeholder="用户名" allowClear />,
  49. initialValue: ''
  50. }
  51. ]
  52. return (
  53. <div>
  54. <MyTable
  55. columns={columns}
  56. apiFun={clientApi.recharge_list}
  57. searchConfigList={searchConfigList}
  58. rowKey="ID"
  59. />
  60. </div>
  61. )
  62. };
  63. export default RechargeRecord;