<template>
	<el-card  shadow="never">
		<el-table :data="state.tableData" >
			<el-table-column prop="note" label="描述信息" align="center" />
			<el-table-column prop="balance" label="当前余额"  align="center" />
			<el-table-column prop="createTime" label="创建时间"  align="center" />
		</el-table>

		<el-pagination background layout="prev, pager, next" :total="state.total" @current-change="handlePageChange"/>
	</el-card>
</template>
<script setup lang="ts">
const  state = reactive({
	tableData:[],
	page:{
		page:1,
		limit:10,
	},
	total:0
})
function init() {
	frontRequest.get("api/account/page",{params:state.page}).then(res =>{
		state.tableData = res.data.list
		state.total = res.data.total
	})
}

// 页码改变时的处理函数
const handlePageChange = (page: number) => {
	state.page.page = page
	init()
}
init()
</script>
<style scoped>

</style>
<route lang="json">
{
"meta": {
"layout": "frontUserInfo"
}
}
</route>
