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.

62 lines
1.2 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. import api from "@/api"
  2. import MyTable from "@/components/MyTable"
  3. import { Input } from "antd"
  4. import React, { useRef } from "react"
  5. const WalletLog = () => {
  6. const tableRef = useRef(null)
  7. const columns = [
  8. {
  9. title: '金额',
  10. dataIndex: 'amount',
  11. width: 200
  12. },
  13. {
  14. title: '剩余金额',
  15. dataIndex: 'balance',
  16. width: 200
  17. },
  18. {
  19. title: 'MT帐号',
  20. dataIndex: 'count',
  21. width: 200
  22. },
  23. {
  24. title: 'ID',
  25. dataIndex: 'id',
  26. width: 200
  27. },
  28. {
  29. title: '流水号',
  30. dataIndex: 'order',
  31. width: 200
  32. },
  33. {
  34. title: '时间',
  35. dataIndex: 'time',
  36. render: (text) => new Date(text * 1000).toLocaleString(), // 将时间戳转换为人类可读的格式
  37. },
  38. {
  39. title: '类型',
  40. dataIndex: 'type',
  41. },
  42. ];
  43. return (
  44. <div>
  45. <MyTable
  46. ref={tableRef}
  47. apiFun={api.get_walletRecord}
  48. columns={columns}
  49. searchConfigList={[{
  50. key: 'search',
  51. name: 'search',
  52. slot: <Input style={{ minWidth: 350 }} placeholder="请输入MT账号搜索" />
  53. }]}
  54. />
  55. </div>
  56. )
  57. }
  58. export default WalletLog