import { PageContainer, ProTable } from "@ant-design/pro-components"
import { columns } from "./tableConfig"
import { useAjax } from "@/Hook/useAjax"
import { useModel } from "@umijs/max"
import { longBookOrderList } from "@/services/miniApp/payLog"

const Page: React.FC = () => {
    let { initialState } = useModel("@@initialState")
    let getList = useAjax((params) => longBookOrderList(params), { type: 'table' })
    return <PageContainer title={false}
    >
        <ProTable<any, any>
            params={{
                miniappId: initialState?.selectApp?.id || "",
                distributorId: initialState?.currentUser?.distributorId,
                appType: initialState?.selectApp?.appType || ""
            }}
            headerTitle={"长篇小说充值记录列表"}
            rowKey={(r) => r.id}
            search={{
                labelWidth: 120,
            }}
            request={async (params) => {
                return await getList.run(params)
            }}
            columns={columns()}
        // bordered
        />
    </PageContainer>

}
export default Page