Browse Source

test(微信PC端登录逻辑)

Roc 4 years ago
parent
commit
a63fa0e626
1 changed files with 5 additions and 0 deletions
  1. 5 0
      controllers/user_pc.go

+ 5 - 0
controllers/user_pc.go

@@ -618,6 +618,11 @@ func (this *UserNotAuthController) CheckLogin() {
 		this.Data["json"] = br
 		this.ServeJSON()
 	}()
+	//没有用户信息,代表是没有登录
+	if this.User == nil{
+		br.Ret = 408
+		return
+	}
 	if this.User.IsFreeLogin == 1 {
 		if this.User.LoginTime.AddDate(0, 0, 30).After(time.Now()) {
 			br.Ret = 600