diff --git a/functions/api/login.ts b/functions/api/login.ts index b213faf..a5ced7b 100644 --- a/functions/api/login.ts +++ b/functions/api/login.ts @@ -97,6 +97,8 @@ export const onRequestPost: PagesFunction = async (context) => { WHERE phone = ? `).bind(phone).first(); + userId = userInfo.id + // 生成 token const token = await generateToken(userId, env);