套餐查询提供状态筛选字段;实名认证回调结果提供页面

This commit is contained in:
2026-03-13 17:03:32 +08:00
parent 3dc9bc5b1d
commit efce18e6f5
7 changed files with 169 additions and 10 deletions

View File

@@ -2,8 +2,10 @@ package web
import (
"context"
"embed"
"fmt"
"log/slog"
"net/http"
_ "net/http/pprof"
"platform/web/events"
deps "platform/web/globals"
@@ -11,6 +13,7 @@ import (
"time"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html/v2"
"github.com/hibiken/asynq"
"golang.org/x/sync/errgroup"
)
@@ -42,11 +45,15 @@ func RunApp(pCtx context.Context) error {
return g.Wait()
}
//go:embed views/*.html
var fs embed.FS
func RunWeb(ctx context.Context) error {
fiber := fiber.New(fiber.Config{
ProxyHeader: fiber.HeaderXForwardedFor,
ErrorHandler: ErrorHandler,
Views: html.NewFileSystem(http.FS(fs), ".html"),
})
ApplyMiddlewares(fiber)