小程序一些功能更新

This commit is contained in:
李琦
2026-10-09 16:49:36 +08:00
parent 6f51d99a78
commit f0e833b84e
7 changed files with 128 additions and 18 deletions

View File

@@ -41,7 +41,15 @@ type EventInfoRes struct {
Stage *StageOut `json:"stage"` // 用于定位,不含个人信息
}
// EventSeatQueryReq 姓名 + 手机号双因子精确匹配(都填且都对才返回)
// EventSeatQueryReq 查座入参:**姓名 / 手机号二选一即可发起查询**(C 端体验)。
//
// 匹配策略(后端 event_query.go 权威实现):
// - 只给 name → 按姓名匹配。若命中多张票(重名)→ 返回 4010 ambiguous,**不返回任何座位信息**,
// 前端引导用户补手机号做二次查询;
// - 只给 phone → 手机号在本企业内唯一,直接精确匹配;
// - 两个都给 → 双因子精确匹配(最安全)。
//
// 🔴 无论哪种组合,**重名时一律不返回座位信息**(4010),避免「输个名字就看到别人的桌号」。
type EventSeatQueryReq struct {
g.Meta `path:"/event/seat/query" method:"post" tags:"event" summary:"扫码查座(免登录)"`
EventId int64 `v:"required#活动不存在" json:"event_id"`
@@ -51,10 +59,12 @@ type EventSeatQueryReq struct {
// EventSeatQueryRes 结果最小化:只有本人桌座 + 本人所在桌示意。
//
// Found=false 表示未查询到(双因子不匹配/未录入/未分配座位),message 为统一模糊文案,
// Found=false 表示未查询到(不匹配/未录入/未分配座位),message 为统一模糊文案,
// 前端据 Found 判定;找不到时所有桌座字段为空,不透出任何他人信息。
type EventSeatQueryRes struct {
Found bool `json:"found"`
Found bool `json:"found"`
// 🔴 true = 命中重名,需补手机号二次确认。此时 Found=false 且所有座位字段为空(后端不下发)。
Ambiguous bool `json:"ambiguous"`
Message string `json:"message"`
TableNo string `json:"table_no"`
TableName string `json:"table_name"`