This commit is contained in:
2026-03-02 14:41:17 +08:00
55 changed files with 2404 additions and 1839 deletions

View File

@@ -123,6 +123,14 @@ type (
GetInviteLinkResp {
InviteLink string `json:"invite_link"` // 邀请链接
}
// 生成邀请海报(后端 imageService 合成背景+二维码)
GetInvitePosterReq {
InviteLink string `form:"invite_link"` // 邀请链接
Format string `form:"format,optional"` // base64 时返回 JSON否则返回 image/png
}
GetInvitePosterResp {
PosterBase64 string `json:"poster_base64"` // PNG base64前端用 data:image/png;base64,{poster_base64}
}
// 获取代理等级特权信息
GetLevelPrivilegeResp {
Levels []LevelPrivilegeItem `json:"levels"`
@@ -250,6 +258,10 @@ service main {
@handler GetInviteLink
get /invite_link (GetInviteLinkReq) returns (GetInviteLinkResp)
// 生成邀请海报(后端 imageService 合成背景+二维码format=base64 返回 JSON
@handler GetInvitePoster
get /invite/poster (GetInvitePosterReq) returns (GetInvitePosterResp)
// 获取代理等级特权信息
@handler GetLevelPrivilege
get /level/privilege returns (GetLevelPrivilegeResp)

View File

@@ -51,6 +51,7 @@ type (
Id string `json:"id"`
PayMethod string `json:"pay_method"` // 支付方式: wechat, alipay, appleiap, test(仅开发环境), test_empty(仅开发环境-空报告模式)
PayType string `json:"pay_type" validate:"required,oneof=query agent_vip agent_upgrade whitelist"`
Code string `json:"code,optional"` // 微信小程序登录 code未绑定 openid 时传此参数以换取 openid 并调起支付
}
PaymentResp {
PrepayData interface{} `json:"prepay_data"`

View File

@@ -140,6 +140,7 @@ type (
AccessToken string `json:"accessToken"`
AccessExpire int64 `json:"accessExpire"`
RefreshAfter int64 `json:"refreshAfter"`
IsAgent bool `json:"is_agent,optional"` // 该手机号已是代理时为 true前端可据此自动进入代理中心
}
)
@@ -156,8 +157,26 @@ service main {
type (
sendSmsReq {
Mobile string `json:"mobile" validate:"required,mobile"`
ActionType string `json:"actionType" validate:"required,oneof=login register query agentApply realName bindMobile"`
Mobile string `json:"mobile" validate:"required,mobile"`
ActionType string `json:"actionType" validate:"required,oneof=login register query agentApply realName bindMobile"`
CaptchaVerifyParam string `json:"captchaVerifyParam,optional"` // 阿里云滑块验证码参数
}
)
//============================> captcha v1 <============================
@server (
prefix: api/v1
group: captcha
)
service main {
@doc "get encrypted scene id for aliyun captcha"
@handler getEncryptedSceneId
post /captcha/encryptedSceneId returns (GetEncryptedSceneIdResp)
}
type (
GetEncryptedSceneIdResp {
EncryptedSceneId string `json:"encryptedSceneId"`
}
)