来源:hgdjnet-server 9bfbafe10d417deea959bd53117bc88a10e60a83 项目身份 HKDJ / JHA-216,独立官网仓库,Jenkins 守卫键 hkdjnet 测试目录 /server/hkdj_net,App/Web API 30331/30332 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
31 lines
878 B
Go
31 lines
878 B
Go
package rechargepackageapi
|
|
|
|
import (
|
|
"hkdj-web-server/app/service/rechargepackageser"
|
|
"hkdj-web-server/pub/common"
|
|
"hkdj-web-server/pub/common/enum/consts"
|
|
"hkdj-web-server/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)
|
|
}
|