feat: 添加许愿树功能和Go后端服务

- 新增许愿树页面(Canvas绘制、许愿条展示)
- 新增许愿详情页面
- 新增许愿创建弹窗(免费/付费两种模式)
- 新增网络请求封装 utils/request.js
- 新增Go后端项目结构(Gin + Inertia.js)
- 新增用户、订单、许愿数据模型
- 新增数据库迁移脚本
- 更新.gitignore补全忽略规则
- 更新.env.local配置(robot=2, 版本1.0.1)
- 添加secrets目录说明文档
This commit is contained in:
gouki
2026-08-06 12:26:29 +00:00
parent 9c178e6d49
commit 11bfc15141
31 changed files with 2025 additions and 1 deletions
+57
View File
@@ -0,0 +1,57 @@
package handler
import (
"net/http"
"github.com/gin-gonic/gin"
)
// GetWishTree 获取许愿树
func GetWishTree(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"code": 0,
"msg": "success",
"data": gin.H{
"tree": gin.H{
"id": 1,
"name": "许愿树",
"wishes": []interface{}{},
},
},
})
}
// CreateWish 创建许愿
func CreateWish(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"code": 0,
"msg": "success",
"data": gin.H{
"id": 1,
},
})
}
// GetWishList 获取许愿列表
func GetWishList(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"code": 0,
"msg": "success",
"data": gin.H{
"list": []interface{}{},
"total": 0,
},
})
}
// DeleteWish 删除许愿
func DeleteWish(c *gin.Context) {
id := c.Param("id")
c.JSON(http.StatusOK, gin.H{
"code": 0,
"msg": "success",
"data": gin.H{
"id": id,
},
})
}