From 9512382ff76d1bf31999ccc0df81d9ebcd47d167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=9F=E5=AE=81?= Date: Thu, 13 Mar 2025 15:22:11 +0800 Subject: [PATCH] =?UTF-8?q?fixed-bug:=E5=9C=A8devstar.cn=E4=B8=8A=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=89=AB=E7=A0=81=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=94=A8=E6=88=B7=E6=97=B6=E9=94=99=E8=AF=AF=E5=A4=84?= =?UTF-8?q?=E7=90=86=E4=BA=86=E5=B7=B2=E7=BB=91=E5=AE=9A=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/auth/wechat_qr.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/auth/wechat_qr.go b/services/auth/wechat_qr.go index 1e6cef1dfe..38603e98db 100644 --- a/services/auth/wechat_qr.go +++ b/services/auth/wechat_qr.go @@ -143,8 +143,8 @@ func checkWechatQrTicketStatus(ctx *context.Context, qrTicket string, quit chan OpenId: data.Data.OpenId, } // 从微信服务器消息推送中解析扫码人的 OpenId - _, err := wechat_model.QueryUserByOpenid(ctx, qrStatus.OpenId) - if err != nil { + user, err := wechat_model.QueryUserByOpenid(ctx, qrStatus.OpenId) + if user == nil { // 未找到 OpenId 对应的 DevStar 用户信息,提示前端导向注册页 qrStatus.IsBinded = false qrStatusString, err := qrStatus.Marshal2JSONString()