修改未登录任务列表查询
This commit is contained in:
@ -332,11 +332,19 @@ func (s *gamelifeClient) RequestActivity(ctx context.Context, in *model.QQNetbar
|
||||
case consts.GetTaskList:
|
||||
result := model.GameTaskResponse{}
|
||||
in.TaskParam.BrandId = s.BrandId
|
||||
get, err := g.Redis().Get(ctx, fmt.Sprintf(consts.GameLifeUserKey, in.PopenId))
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("从缓存中获取用户信息失败")
|
||||
}
|
||||
var gamelifeCache model.UserGamelifeCache
|
||||
if err = json.Unmarshal(get.Bytes(), &gamelifeCache); err != nil {
|
||||
return nil, ecode.Fail.Sub("解析用户信息失败")
|
||||
}
|
||||
resp, err := client.R().
|
||||
SetContext(ctx).
|
||||
SetBody(in.TaskParam).
|
||||
SetResult(&result).
|
||||
Post(s.taskUrlMap[s.Mode] + consts.GetTaskList)
|
||||
Post(fmt.Sprintf("%s%s?%s", s.taskUrlMap[s.Mode], consts.GetTaskList, gamelifeCache.Params))
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("请求出现异常")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user