- 新增「简记memo」一体化小程序产品原型设计文档 - 新增简记memo完整版UI视觉设计规范和界面细节 - 添加IDEA项目配置文件.gitignore - 创建404页面HTML文件,包含响应式布局和错误提示 - 添加关于页面HTML文件,展示品牌介绍和团队信息 - 实现AES加解密工具函数,支持请求体加密 - 添加用户协议页面基础框架
25 lines
456 B
Go
25 lines
456 B
Go
// routes/static.go
|
|
// 静态资源路由
|
|
package routes
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// getStaticPath 获取静态资源目录路径
|
|
func getStaticPath() string {
|
|
exeDir, _ := os.Getwd()
|
|
return filepath.Join(exeDir, "..", "static")
|
|
}
|
|
|
|
// registerStaticRoutes 注册静态资源路由
|
|
func registerStaticRoutes(r *gin.Engine) {
|
|
staticPath := getStaticPath()
|
|
|
|
// 静态资源目录
|
|
r.Static("/static", staticPath)
|
|
}
|