- 新增「简记memo」一体化小程序产品原型设计文档 - 新增简记memo完整版UI视觉设计规范和界面细节 - 添加IDEA项目配置文件.gitignore - 创建404页面HTML文件,包含响应式布局和错误提示 - 添加关于页面HTML文件,展示品牌介绍和团队信息 - 实现AES加解密工具函数,支持请求体加密 - 添加用户协议页面基础框架
29 lines
580 B
Go
29 lines
580 B
Go
// routes/routes.go
|
|
// 路由注册器 - 统一管理所有路由
|
|
package routes
|
|
|
|
import (
|
|
"path/filepath"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// RegisterRoutes 注册所有路由
|
|
func RegisterRoutes(r *gin.Engine) {
|
|
// 注册静态资源路由
|
|
registerStaticRoutes(r)
|
|
|
|
// 注册页面路由
|
|
registerPageRoutes(r)
|
|
|
|
// 注册API路由
|
|
registerAPIAppRoutes(r)
|
|
registerAPIWebRoutes(r)
|
|
|
|
// 404页面处理 - 所有未匹配的路由都返回404页面
|
|
r.NoRoute(func(c *gin.Context) {
|
|
staticPath := getStaticPath()
|
|
c.File(filepath.Join(staticPath, "html", "404.html"))
|
|
})
|
|
}
|