init: web_hgdjc_server

This commit is contained in:
2026-11-07 10:46:18 +08:00
commit b2ff6ac8ff
707 changed files with 147645 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
package usercenterapi
import (
"videoweb/app/api/proto"
"videoweb/app/service/usercenterser"
"videoweb/pub/common"
"videoweb/pub/common/srvdef"
"github.com/gin-gonic/gin"
)
// Data app个人中心数据
// @Tags app个人中心相关接口
// @Summary app个人中心数据 --by 王鸣
// @Description 返回当前用户观看、收藏、追剧中、已购剧集统计
// @Accept json
// @Produce json
// @Success 200 {object} proto.UserCenterDataResp "成功"
// @Failure 400 {string} string "失败"
// @Security ApiKeyAuth
// @Router /api/app/user/center/data [get]
func Data(ctx *gin.Context) {
resp, err := usercenterser.Data(ctx, common.GetUserId(ctx))
if err != nil {
common.ServerJSON(ctx, err.Code, err.Tips)
return
}
common.ServerJSON(ctx, srvdef.Success, resp)
}
var _ = proto.UserCenterDataResp{}