<script setup lang="ts">
import { useRequest } from "vue-request";
import { myRequest } from "@/requests/request.ts";
import { userinfo } from "@/store/store.ts";
import BillComponent from "@/pages/account-bill/bill-component.vue";

const { data, loading } = useRequest<{ data?: accountBillData[] }>(
  () => myRequest(`/api/yeb_log`, userinfo.token),
  {
    refreshDeps: [() => userinfo.token],
    ready: () => Boolean(userinfo.token),
  },
);
</script>

<template>
  <BillComponent :loading="loading" :data="data?.data" detail />
</template>

<style scoped></style>
