Files
web_hgtv_server/app/api/rechargepackageapi/package.go
T
rootandClaude Opus 5.5 7974a42301 Initial commit
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 11:07:42 +08:00

31 lines
850 B
Go

package rechargepackageapi
import (
"videoweb/app/service/rechargepackageser"
"videoweb/pub/common"
"videoweb/pub/common/enum/consts"
"videoweb/pub/common/srvdef"
"github.com/gin-gonic/gin"
)
// List 查询购买套餐列表
// @Tags 金币与会员
// @Summary 查询购买套餐列表 -- by 王鸣
// @Description 返回会员畅享和金币充值两个列表,并附带各套餐可用支付方式
// @Produce json
// @Success 200 {object} proto.RechargePackageListResp "成功"
// @Router /api/app/recharge/package/list [GET]
func List(ctx *gin.Context) {
sysType := ctx.GetString(consts.CtxSysType)
if sysType == "" {
sysType = "android"
}
resp, err := rechargepackageser.GetRechargePackageList(ctx, sysType)
if err != nil {
common.ServerJSON(ctx, err.Code, err.Tips)
return
}
common.ServerJSON(ctx, srvdef.Success, resp)
}