package services import "github.com/gin-gonic/gin" // GetCurrPageByClaims 从Claims中获取当前页码 func GetCurrPageByClaims(c *gin.Context) (currPage int) { //获取jwt数据失败 claims, _ := c.Get("curr_page") currPage = claims.(int) return } // GetPageSizeByClaims 从Claims中获取当前每页数据量 func GetPageSizeByClaims(c *gin.Context) (pageSize int) { //获取jwt数据失败 claims, _ := c.Get("page_size") pageSize = claims.(int) return }