rdluck 4 år sedan
förälder
incheckning
a071a70f1b
2 ändrade filer med 2 tillägg och 1 borttagningar
  1. 1 1
      controllers/wechat.go
  2. 1 0
      models/db.go

+ 1 - 1
controllers/wechat.go

@@ -195,7 +195,7 @@ func (this *WechatCommonController) WechatLogin() {
 	fmt.Println("unionId", wxInfo.UnionID)
 
 	token, userId, firstLogin, _, err := services.WxLogin(code, wxInfo.OpenID, wxInfo.UnionID, wxUserInfo)
-	if err != nil {
+	if err != nil && err.Error() != utils.ErrNoRow() {
 		br.Msg = "微信登录失败"
 		br.ErrMsg = "微信登录失败,err:" + err.Error()
 		return

+ 1 - 0
models/db.go

@@ -48,5 +48,6 @@ func init() {
 		new(CygxArticle),
 		new(CygxArticleHistoryRecord),
 		new(CygxSearchKeyWord),
+		new(UserRecord),
 	)
 }