小程序一些功能更新

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

@@ -51,8 +51,9 @@ func AdminEventQrcode(ctx context.Context, req *v1.EventQrcodeReq) (*v1.EventQrc
}
token, err := wxAccessToken(ctx)
if err != nil {
// 把底层错误转成人话,不把原始英文/错误码直接抛给用户
return nil, gerror.New("获取微信 access_token 失败,请稍后重试或检查 wx.appId / wx.appSecret 配置")
// 保留底层 errcode/errmsg(gerror.Wrap 而非丢弃),否则「配置没填」与「编码不对」
// 「IP 白名单」「appSecret 错」四种完全不同的问题在后台会显示成同一句话,无法排障。
return nil, gerror.Wrap(err, "获取微信 access_token 失败")
}
// scene 只承载 event_id(getUnlimited 的 scene 有长度上限,event_id 远不触顶)