dev stock stragety

This commit is contained in:
yanweidong
2026-01-26 17:38:06 +08:00
parent d2a3d60183
commit 7efdead5bf
20 changed files with 540 additions and 665 deletions

View File

@@ -4,13 +4,32 @@ import (
"os"
"strings"
"git.apinb.com/senlinai/site/internal/logic"
"git.apinb.com/senlinai/cloud/internal/logic"
"git.apinb.com/senlinai/cloud/internal/logic/apps"
"git.apinb.com/senlinai/cloud/internal/logic/auth"
"github.com/gin-gonic/gin"
)
// Register public 注册路由
func RegistersPublic(engine *gin.Engine) {
engine.GET("/", logic.Index)
// 匿名访问接口
engine.GET("/sign-in", auth.SignIn) // 登录
engine.POST("/login", auth.Login)
engine.GET("/logout", auth.Logout) // 退出登录
registerCenter("apps", engine)
}
func registerCenter(v1_key string, engine *gin.Engine) {
center := engine.Group(v1_key)
// Session认证
// center.Use(middleware.CheckSession())
center.GET("/home", apps.Home) // 首页概况
}
func RegistersAll(engine *gin.Engine) {