File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 7
7
"github.com/astaxie/beego/context"
8
8
"github.com/yaotian/gowechat"
9
9
"github.com/yaotian/gowechat/mp/message"
10
- "github.com/yaotian/gowechat/mp/oauth "
10
+ "github.com/yaotian/gowechat/mp/user "
11
11
"github.com/yaotian/gowechat/wxcontext"
12
12
)
13
13
@@ -58,14 +58,14 @@ func wxOAuth(ctx *context.Context) {
58
58
59
59
oauthHandler := mp .GetPageOAuthHandler (ctx .Request , ctx .ResponseWriter , appURL + "/oauth" )
60
60
61
- oauthHandler .SetFuncCheckOpenIDExisting (func (openID string ) bool {
61
+ oauthHandler .SetFuncCheckOpenIDExisting (func (openID string ) ( existing bool , stopNow bool ) {
62
62
//看自己的系统中是否已经存在此openID的用户
63
63
//如果已经存在, 调用自己的Login 方法,设置cookie等,return true
64
64
//如果还不存在,return false, handler会自动去取用户信息
65
- return true
65
+ return false , true
66
66
})
67
67
68
- oauthHandler .SetFuncAfterGetUserInfo (func (user oauth. UserInfo ) bool {
68
+ oauthHandler .SetFuncAfterGetUserInfo (func (user user. Info ) bool {
69
69
//已获得用户信息,这里用信息做注册使用
70
70
//调用自己的Login方法,设置cookie等
71
71
return false
You can’t perform that action at this time.
0 commit comments