重构代码结构,迁移Baiyin SDK相关逻辑至globals包,并添加支付宝客户端初始化

This commit is contained in:
2025-04-16 14:01:30 +08:00
parent f1456d01ea
commit 083fabb308
12 changed files with 200 additions and 76 deletions

View File

@@ -3,6 +3,7 @@ package web
import (
"net/http"
"platform/pkg/env"
g "platform/web/globals"
"runtime"
"log/slog"
@@ -38,6 +39,10 @@ func New(config *Config) (*Server, error) {
func (s *Server) Run() error {
// inits
g.InitBaiyin()
g.InitAlipay()
// config
s.fiber = fiber.New(fiber.Config{
ErrorHandler: ErrorHandler,