瀏覽代碼

test(微信PC端登录逻辑)

Roc 4 年之前
父節點
當前提交
a63fa0e626
共有 1 個文件被更改,包括 5 次插入0 次删除
  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