master
huanghai 5 years ago
parent c63d53422c
commit c150878390

@ -705,7 +705,13 @@ func bindWxUser(context *gin.Context) {
return
}
//是否能登录
success, identityId, personId, _, _, wxOpenId := ServiceLoginPerson.Login(username, string(decryptPwd), ip)
success, identityId, personId, _, remainCount, wxOpenId := ServiceLoginPerson.Login(username, string(decryptPwd), ip)
if remainCount == 0 {
context.JSON(http.StatusOK, Model.Res{
Code: http.StatusNotImplemented,
Msg: "密码输入错误次数过多,请两个小时后继续登录!",
})
}
//2、如果匹配了那么这个登录名是不是已经绑定过openId了
if success {
if len(wxOpenId) > 0 {

@ -784,7 +784,7 @@ type swaggerInfo struct {
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = swaggerInfo{
Version: "2.0",
Host: "10.10.14.187:8000",
Host: "127.0.0.1:8000",
BasePath: "",
Schemes: []string{},
Title: "东师理想统一认证中心(OAuth2+Sso)",

@ -7,7 +7,7 @@
"license": {},
"version": "2.0"
},
"host": "10.10.14.187:8000",
"host": "127.0.0.1:8000",
"paths": {
"/oauth2/access_token": {
"post": {

@ -32,7 +32,7 @@ definitions:
description: 个数
type: object
type: object
host: 10.10.14.187:8000
host: 127.0.0.1:8000
info:
contact: {}
description: 参考自xxl-sso

@ -67,7 +67,7 @@ func startOAuth2Server() {
// @title 东师理想统一认证中心(OAuth2+Sso)
// @version 2.0
// @description 参考自xxl-sso
// @host 10.10.14.187:8000
// @host 127.0.0.1:8000
func main() {
// 发布模式
//gin.SetMode(gin.ReleaseMode)

Loading…
Cancel
Save