增加excel模板配置,增加前端导出工具。token迁移至cookie x-token且保留header x-token 两者兼容。

This commit is contained in:
piexlMax
2023-12-30 19:57:36 +08:00
parent 5ea8947fc9
commit cd5b60c8cc
23 changed files with 1275 additions and 38 deletions

View File

@@ -19,7 +19,10 @@ type JwtApi struct{}
// @Success 200 {object} response.Response{msg=string} "jwt加入黑名单"
// @Router /jwt/jsonInBlacklist [post]
func (j *JwtApi) JsonInBlacklist(c *gin.Context) {
token := c.Request.Header.Get("x-token")
token, _ := c.Cookie("x-token")
if token == "" {
token = c.Request.Header.Get("x-token")
}
jwt := system.JwtBlacklist{Jwt: token}
err := jwtService.JsonInBlacklist(jwt)
if err != nil {