hookehuyr

fix

<!--
* @Date: 2024-01-16 11:37:10
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-24 17:52:56
* @LastEditTime: 2024-01-27 11:26:24
* @FilePath: /xysBooking/src/views/bookingList.vue
* @Description: 文件描述
* @Description: 预约记录列表页
-->
<template>
<div class="booking-list-page">
......@@ -57,7 +57,7 @@ const formatDatetime = (data) => { // 格式化日期
onMounted(async () => {
const { code, data } = await billListAPI({ page: page.value, row_num: limit.value });
if (code) {
//
// 格式化数据
data.forEach(item => {
item.booking_time = item && formatDatetime(item);
item.order_time = item.created_time.slice(0, -3);
......@@ -70,11 +70,14 @@ const onLoad = async () => {
page.value++;
const { code, data } = await billListAPI({ page: page.value, row_num: limit.value });
if (code) {
// 格式化数据
data.forEach(item => {
item.booking_time = item && formatDatetime(item);
item.order_time = item.created_time.slice(0, -3);
});
// 合并数据
bookingList.value = bookingList.value.concat(data);
// 结束loading状态
loading.value = false;
// 数据全部加载完成
if (!data.length) {
......
<!--
* @Date: 2023-06-21 10:23:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-26 14:10:42
* @LastEditTime: 2024-01-27 11:19:43
* @FilePath: /xysBooking/src/views/index.vue
* @Description: 预约页首页
-->
......@@ -94,7 +94,7 @@ const toMy = () => { // 跳转到我的
onMounted(async () => {
// TAG: 触发授权页面
await billListAPI();
await billListAPI({ page: 1, row_num: 1 });
});
const root = ref();
......