实现游戏人生背包url 返回
This commit is contained in:
@ -73,7 +73,7 @@ var URLMaps = struct {
|
||||
},
|
||||
Package: map[string]string{
|
||||
"test": "https://test.igame.qq.com/tip/ingame-page/feature/add-game-life/igame-game-life-web/#/index/goods",
|
||||
"prod": "https://igame.qq.com/tip/ingame-page/feature/add-game-life/igame-game-life-web/#/index/goods",
|
||||
"prod": "https://igame.qq.com/tip/ingame-page/igame-game-life-web/index.html#/index/goods",
|
||||
},
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ func (s *gamelifeClient) GetUrl(ctx context.Context, popenID, appName, nickname
|
||||
}
|
||||
return fmt.Sprintf("%s?%s", rootURL, params), nil
|
||||
}
|
||||
func (s *gamelifeClient) GetGamelifePackageUrl(ctx context.Context, popenID, appName string, bindType int) (string, error) {
|
||||
func (s *gamelifeClient) GetGamelifePackageUrl(ctx context.Context, popenID, gameCode string, gameId, bindType int) (string, error) {
|
||||
// 从配置中获取 package URL 前缀
|
||||
packageURL := s.packageURLMap[s.config.Mode]
|
||||
|
||||
@ -204,10 +204,15 @@ func (s *gamelifeClient) GetGamelifePackageUrl(ctx context.Context, popenID, app
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
params, err := s.buildQueryParams(ctx, popenID, cache, appName, "", bindType, true)
|
||||
|
||||
params, err := s.buildQueryParams(ctx, popenID, cache, gameCode, "", bindType, true)
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if gameId != 0 {
|
||||
params = fmt.Sprintf("%s&gid=%d", params, gameId)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s?%s", packageURL, params), nil
|
||||
}
|
||||
|
||||
@ -70,6 +70,7 @@ func init() {
|
||||
enforcer.AddPolicy("user", "/x/user/boundUrl", "GET", "获取用户绑定的URL")
|
||||
enforcer.AddPolicy("user", "/x/user/unBoundUrl", "GET", "获取用户取消绑定的URL")
|
||||
enforcer.AddPolicy("user", "/x/user/gameRoleList", "GET", "查询用户游戏角色列表")
|
||||
enforcer.AddPolicy("user", "/x/user/packageUrl", "GET", "获取用户游戏人生背包url")
|
||||
|
||||
// 反馈信息
|
||||
enforcer.AddPolicy("user", "/x/feedback", "GET", "获取反馈信息列表")
|
||||
|
||||
Reference in New Issue
Block a user