Explorar o código

test(微信PC端登录逻辑)

Roc %!s(int64=4) %!d(string=hai) anos
pai
achega
a63fa0e626
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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