实现游戏人生背包url 返回
This commit is contained in:
@ -4,6 +4,8 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
"server/internal/consts"
|
||||
"server/internal/dao"
|
||||
"server/internal/model"
|
||||
@ -15,9 +17,6 @@ import (
|
||||
"server/utility/encrypt"
|
||||
"server/utility/gamelife"
|
||||
"server/utility/jwt"
|
||||
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
)
|
||||
|
||||
type sUser struct{}
|
||||
@ -313,3 +312,12 @@ func (s *sUser) GetUserGameRole(ctx context.Context, in *model.GetUserGameRoleIn
|
||||
RoleList: *result,
|
||||
}, nil
|
||||
}
|
||||
func (s *sUser) GamelifePackUrl(ctx context.Context, in *model.GamelifePackUrlIn) (out *model.GamelifePackUrlOut, err error) {
|
||||
url, err := gamelife.GetGamelifeClient(ctx).GetGamelifePackageUrl(ctx, in.PopenId, in.GameCode, in.GameId, in.BindType)
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("获取绑定链接失败")
|
||||
}
|
||||
return &model.GamelifePackUrlOut{
|
||||
Url: url,
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user