diff --git a/backend/main.go b/backend/main.go index 3d585a8..0de7f4d 100644 --- a/backend/main.go +++ b/backend/main.go @@ -18,7 +18,7 @@ func Cors() gin.HandlerFunc { if origin != "" { c.Header("Access-Control-Allow-Origin", origin) - c.Header("Access-Control-Allow-Headers", "Content-Type,AccessToken,X-CSRF-Token, Authorization") //自定义 Header + c.Header("Access-Control-Allow-Headers", "Content-Type,AccessToken,X-CSRF-Token, Authorization") // Header c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS") c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type") c.Header("Access-Control-Allow-Credentials", "true") @@ -27,7 +27,7 @@ func Cors() gin.HandlerFunc { if method == "OPTIONS" { c.Header("Access-Control-Allow-Origin", "*") - c.Header("Access-Control-Allow-Headers", "Content-Type,AccessToken,X-CSRF-Token, Authorization") //自定义 Header + c.Header("Access-Control-Allow-Headers", "Content-Type,AccessToken,X-CSRF-Token, Authorization") // Header c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS") c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type") c.Header("Access-Control-Allow-Credentials", "true") @@ -43,11 +43,6 @@ func main() { router := gin.Default() router.Use(Cors()) - // Serve frontend static files - // router.Use(static.Serve("/", static.LocalFile("./views", true))) - - // config.AllowOrigins = []string{"http://localhost:8080/"} - // Setup route group for the API api := router.Group("/api") { diff --git a/frontend/app/src/views/Users.vue b/frontend/app/src/views/Users.vue index 09b3b94..08a5188 100644 --- a/frontend/app/src/views/Users.vue +++ b/frontend/app/src/views/Users.vue @@ -4,7 +4,7 @@ - + @@ -12,13 +12,16 @@ -
{{ person.name }}
-
{{ person.userDescription }}
+
{{ person.login }}
+ +
{{ person.userDescription }}
+
_
+
grade - {{person.points}} + {{ person.points }}
@@ -30,21 +33,49 @@