refactor: 移除测试代码并仅使用实际数据库数据

移除get_vip_last_booking.php和index.php中的测试代码和模拟数据功能,系统现在仅返回实际数据库中的预约记录数据
This commit is contained in:
2025-11-19 18:42:07 +08:00
parent 2e68b94aba
commit 7d81c77fac
2 changed files with 2 additions and 51 deletions
+1 -18
View File
@@ -66,21 +66,4 @@ echo json_encode($response);
// 关闭数据库连接
$conn = null;
// 如果在模拟环境中运行,提供测试数据
if (isset($_GET['test']) && $_GET['test'] == 1) {
// 生成测试数据
$testResponse = [
'has_booking' => true,
'appointment_date' => date('Y-m-d', strtotime('-7 days')),
'appointment_time' => '14:30',
'package_name' => '豪华精洗套餐',
'duration' => 90
];
// 如果URL参数指定no_booking,则返回没有预约的结果
if (isset($_GET['no_booking'])) {
$testResponse = ['has_booking' => false];
}
echo json_encode($testResponse);
}
// 系统现在只返回实际数据库中的预约记录数据