| 123456789101112131415161718 |
- package router
- import (
- "github.com/gin-gonic/gin"
- )
- func IndexPage(c *gin.Context) {
- cookie, err := c.Cookie("token")
- if err != nil || cookie == "" {
- c.HTML(200, "index.html", gin.H{
- "type": "login",
- })
- return
- }
- c.HTML(200, "index.html", gin.H{
- "type": "other",
- })
- }
|