checklogin.go 214 B

1234567891011121314
  1. package middleware
  2. import (
  3. "fmt"
  4. "github.com/gin-gonic/gin"
  5. )
  6. func CheckLogin() gin.HandlerFunc {
  7. return func(ctx *gin.Context) {
  8. fmt.Println("登录验证中间件")
  9. // 前置中间件
  10. ctx.Next()
  11. }
  12. }