Browse Source

用户来源注册信息登记

wangshan 9 months ago
parent
commit
03af090345
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/jfw/front/websocket.go

+ 2 - 2
src/jfw/front/websocket.go

@@ -152,9 +152,9 @@ func GetWsByCode(param []string) bool {
 			}
 			}
 			// 新用户注册 记录来源
 			// 新用户注册 记录来源
 			sourceLabel := redis.GetStr("limitation", fmt.Sprintf("firstVisitTagByWX_%s", session.Id()))
 			sourceLabel := redis.GetStr("limitation", fmt.Sprintf("firstVisitTagByWX_%s", session.Id()))
-			//来源不为空,且 注册时间 在5分钟内
-			registeDate := qutil.Int64All(infoData["registedate"])
 			if sourceLabel != "" && openid != "" {
 			if sourceLabel != "" && openid != "" {
+				//来源不为空,且 注册时间 在5分钟内
+				registeDate := qutil.Int64All(infoData["registedate"])
 				if time.Now().Unix()-registeDate < 300 {
 				if time.Now().Unix()-registeDate < 300 {
 					if ok := public.MQFW.Update("user", map[string]interface{}{
 					if ok := public.MQFW.Update("user", map[string]interface{}{
 						"s_m_openid": openid,
 						"s_m_openid": openid,