瀏覽代碼

feat:phoneFilter调试日志

fuwencai 1 年之前
父節點
當前提交
ceffacd0a0
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/jfw/modules/app/src/app/filter/phonefilter.go

+ 6 - 0
src/jfw/modules/app/src/app/filter/phonefilter.go

@@ -59,6 +59,7 @@ func (l *phoneFilter) Do() bool {
         }
         }
         return false
         return false
     }()
     }()
+    log.Println("phoneFilter调试日志",l.R.URL.Path,pass)
     if pass {
     if pass {
         return true
         return true
     }
     }
@@ -83,6 +84,7 @@ func (l *phoneFilter) Do() bool {
             accountMergeOnline, _ := config.Sysconfig["accountMergeOnline"].(string)
             accountMergeOnline, _ := config.Sysconfig["accountMergeOnline"].(string)
             onLineTime, _ := time.ParseInLocation(Date_Full_Layout, accountMergeOnline, time.Local)
             onLineTime, _ := time.ParseInLocation(Date_Full_Layout, accountMergeOnline, time.Local)
             if onLineTime.After(reg) { //老用户
             if onLineTime.After(reg) { //老用户
+                log.Println("phoneFilter调试日志 onLineTime.After(reg):",onLineTime.After(reg))
                 dbname, _ := config.Sysconfig["bindPopRedis"].(string)
                 dbname, _ := config.Sysconfig["bindPopRedis"].(string)
                 key := fmt.Sprintf("bindPop_new_%s", userId)
                 key := fmt.Sprintf("bindPop_new_%s", userId)
                 if redis.GetInt(dbname, key) >= qu.IntAll(config.Sysconfig["maxBindPop"]) {
                 if redis.GetInt(dbname, key) >= qu.IntAll(config.Sysconfig["maxBindPop"]) {
@@ -97,6 +99,7 @@ func (l *phoneFilter) Do() bool {
                 }
                 }
                 return false
                 return false
             } else {
             } else {
+                log.Println("phoneFilter调试日志 isNewUser:",isNewUser)
                 isNewUser = true
                 isNewUser = true
             }
             }
             //设置cookie 前端跳转
             //设置cookie 前端跳转
@@ -106,6 +109,8 @@ func (l *phoneFilter) Do() bool {
         return false
         return false
     }()
     }()
     var href string
     var href string
+    log.Println("phoneFilter调试日志 needBindPhone:",needBindPhone)
+
     if needBindPhone {
     if needBindPhone {
         href = "/jyapp/account/phone/bind?mode=mergeBind"
         href = "/jyapp/account/phone/bind?mode=mergeBind"
         if isNewUser {
         if isNewUser {
@@ -116,6 +121,7 @@ func (l *phoneFilter) Do() bool {
             href = "/jyapp/frontPage/verify/free/index?mode=phoneCheck"
             href = "/jyapp/frontPage/verify/free/index?mode=phoneCheck"
         }
         }
     }
     }
+    log.Println("phoneFilter调试日志 href:",href)
     if href != "" {
     if href != "" {
         http.Redirect(l.W, l.R, href, 302)
         http.Redirect(l.W, l.R, href, 302)
         return false
         return false