fix: H5客户端接口全链路修复 — 登录状态/首页key/账户字段/膳食类型

This commit is contained in:
li
2026-03-14 20:56:10 +08:00
parent 66ea2f558d
commit 29d5b9e7db
5 changed files with 51 additions and 34 deletions
@@ -31,7 +31,7 @@ class AuthController extends Controller
return $this->error('手机号或密码错误', 40100, 401);
}
if ($customer->status !== 1) {
if (in_array($customer->status, [4, 5])) {
return $this->error('账号已停用,请联系门店', 40101, 403);
}
@@ -69,12 +69,12 @@ class HomeController extends Controller
$nannyOrder->load('nanny:id,name,level,phone');
}
return $this->success(compact(
'customerInfo',
'careRecords',
'todayMeals',
'contract',
'nannyOrder'
));
return $this->success([
'customer' => $customerInfo,
'care_records' => $careRecords,
'today_meals' => $todayMeals,
'contract' => $contract,
'nanny_order' => $nannyOrder,
]);
}
}