chore: 以本地为准,上传全部并替换 GitHub

This commit is contained in:
卡若
2026-02-03 11:36:53 +08:00
parent 1219166526
commit b404bf546e
131 changed files with 37618 additions and 3930 deletions

View File

@@ -0,0 +1,31 @@
import { NextRequest, NextResponse } from "next/server"
/**
* 本地验证码发送 API (mock)
* 开发环境下直接返回成功验证码可为任意4位以上
*/
export async function POST(request: NextRequest) {
try {
const formData = await request.formData()
const phone = (formData.get("phone") || "").toString().trim()
if (!phone) {
return NextResponse.json(
{ code: 40001, message: "请输入手机号" },
{ status: 200 }
)
}
// Mock: 模拟发送成功,开发时可用 123456 等作为验证码
return NextResponse.json({
code: 10000,
message: "验证码已发送开发模式可使用任意4位以上数字",
})
} catch (error) {
console.error("[auth/send-code]", error)
return NextResponse.json(
{ code: 50000, message: "服务器错误" },
{ status: 500 }
)
}
}