diff --git a/src/views/user/components/payment.vue b/src/views/user/components/payment.vue new file mode 100644 index 0000000..0d2beb6 --- /dev/null +++ b/src/views/user/components/payment.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/src/views/user/components/withdraw.vue b/src/views/user/components/withdraw.vue new file mode 100644 index 0000000..99859ad --- /dev/null +++ b/src/views/user/components/withdraw.vue @@ -0,0 +1,154 @@ + + + + + diff --git a/src/views/user/index.vue b/src/views/user/index.vue index 8c62c06..3c39054 100644 --- a/src/views/user/index.vue +++ b/src/views/user/index.vue @@ -3,9 +3,11 @@ import { h, useTemplateRef } from 'vue'; import { useDialog } from 'naive-ui'; import dayjs from 'dayjs'; import { client, safeClient } from '@/service/api'; -import type { TableBaseColumns, TableFetchData, TableInst } from '@/components/table'; +import type { TableBaseColumns, TableFetchData, TableFilterColumns, TableInst } from '@/components/table'; import Wallet from './components/wallet.vue'; import Address from './components/address.vue'; +import Payment from './components/payment.vue'; +import Withdraw from './components/withdraw.vue'; const dialog = useDialog(); @@ -50,7 +52,7 @@ const columns: TableBaseColumns = [ { key: 'operations', title: '操作', - width: 200, + width: 300, fixed: 'right', operations: (row: any) => [ { @@ -76,10 +78,49 @@ const columns: TableBaseColumns = [ content: () => h(Address, { userId: row.userId }) }); } + }, + { + contentText: '收款方式', + size: 'small', + onClick: () => { + dialog.create({ + title: '收款方式', + showIcon: false, + style: { width: '1000px' }, + content: () => h(Payment, { userId: row.userId }) + }); + } + }, + { + contentText: '提现订单', + size: 'small', + onClick: () => { + dialog.create({ + title: '提现订单', + showIcon: false, + style: { width: '1000px' }, + content: () => h(Withdraw, { userId: row.userId }) + }); + } } ] } ]; + +const filterColumns: TableFilterColumns = [ + { + key: 'uid', + title: 'UID' + }, + { + key: 'username', + title: '手机号' + }, + { + key: 'name', + title: '姓名' + } +];