|
@@ -572,6 +572,8 @@ func CheckQmxUser(newUser *map[string]interface{}, UnionId string) (b bool, qmxi
|
|
|
}
|
|
|
|
|
|
//关注事件处理
|
|
|
+var loginWxPool = make(chan bool, 1)
|
|
|
+
|
|
|
func Subscribe(w ResponseWriter, r *Request) {
|
|
|
defer util.Catch()
|
|
|
openid := r.FromUserName
|
|
@@ -771,8 +773,15 @@ func Subscribe(w ResponseWriter, r *Request) {
|
|
|
go JyopenScanRpc([]string{source, openid})
|
|
|
} else {
|
|
|
if pccodepre != "32" {
|
|
|
+ loginWxPool <- true
|
|
|
+ go func() {
|
|
|
+ defer func() {
|
|
|
+ <-loginWxPool
|
|
|
+ }()
|
|
|
+ redis.SetLoginVal("loginCode", source+","+openid)
|
|
|
+ }()
|
|
|
//修改为rpc回调
|
|
|
- go SendScanRpc([]string{source, openid})
|
|
|
+ //go SendScanRpc([]string{source, openid})
|
|
|
}
|
|
|
}
|
|
|
//redis.Put("sso", "p_userlogs_"+source, openid, 600)
|
|
@@ -1031,8 +1040,15 @@ func ScanHandler(w ResponseWriter, r *Request) {
|
|
|
go JyopenScanRpc([]string{r.EventKey, openid})
|
|
|
} else {
|
|
|
if pccodepre != "32" {
|
|
|
+ loginWxPool <- true
|
|
|
+ go func() {
|
|
|
+ defer func() {
|
|
|
+ <-loginWxPool
|
|
|
+ }()
|
|
|
+ go redis.SetLoginVal("loginCode", r.EventKey+","+openid)
|
|
|
+ }()
|
|
|
//修改为rpc回调
|
|
|
- go SendScanRpc([]string{r.EventKey, openid})
|
|
|
+ //go SendScanRpc([]string{r.EventKey, openid})
|
|
|
}
|
|
|
}
|
|
|
} else {
|