feat: 实现后端业务逻辑和Inertia.js管理后台

- 实现数据库连接和自动迁移
- 实现用户服务(登录、资料、JWT认证)
- 实现许愿服务(创建、列表、机器人许愿)
- 实现订单服务(创建、支付、状态管理)
- 实现JWT认证中间件
- 实现管理后台API(仪表盘、用户、订单、许愿、设置)
- 创建Inertia.js前端页面(Vue3 + Tailwind CSS)
- 修复Go模块依赖问题
This commit is contained in:
gouki
2026-08-06 13:11:59 +00:00
parent 11bfc15141
commit 48255faa5b
19 changed files with 1627 additions and 85 deletions
+7 -2
View File
@@ -6,10 +6,11 @@ import (
"github.com/gin-gonic/gin"
)
// AdminIndex 管理后台首页
func AdminIndex(c *gin.Context) {
// AdminDashboard 管理后台首页
func AdminDashboard(c *gin.Context) {
c.HTML(http.StatusOK, "index.html", gin.H{
"title": "管理后台",
"page": "dashboard",
})
}
@@ -17,6 +18,7 @@ func AdminIndex(c *gin.Context) {
func AdminUsers(c *gin.Context) {
c.HTML(http.StatusOK, "index.html", gin.H{
"title": "用户管理",
"page": "users",
})
}
@@ -24,6 +26,7 @@ func AdminUsers(c *gin.Context) {
func AdminOrders(c *gin.Context) {
c.HTML(http.StatusOK, "index.html", gin.H{
"title": "订单管理",
"page": "orders",
})
}
@@ -31,6 +34,7 @@ func AdminOrders(c *gin.Context) {
func AdminWishes(c *gin.Context) {
c.HTML(http.StatusOK, "index.html", gin.H{
"title": "许愿管理",
"page": "wishes",
})
}
@@ -38,5 +42,6 @@ func AdminWishes(c *gin.Context) {
func AdminSettings(c *gin.Context) {
c.HTML(http.StatusOK, "index.html", gin.H{
"title": "系统设置",
"page": "settings",
})
}