邀请码功能

1、新增邀请码功能
  needInvitationCode: false 改成 true 后生效
2、完善后台用户注册 修改相关
This commit is contained in:
欧阳氏
2022-08-13 10:41:10 +08:00
parent 7caccce907
commit 39606248a1
17 changed files with 1233 additions and 1062 deletions
+2
View File
@@ -69,6 +69,8 @@ func UserRegister(c *gin.Context) {
log.NewError(req.OperationID, errMsg)
if reply.CommonResp.ErrCode == constant.RegisterLimit {
c.JSON(http.StatusOK, gin.H{"errCode": constant.RegisterLimit, "errMsg": "用户注册被限制"})
} else if reply.CommonResp.ErrCode == constant.InvitationError {
c.JSON(http.StatusOK, gin.H{"errCode": constant.InvitationError, "errMsg": "邀请码错误"})
} else {
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
}