修改新增门店奖励、封装登录任务接口
This commit is contained in:
@ -330,8 +330,21 @@ func (s *gamelifeClient) RequestActivity(ctx context.Context, in *model.QQNetbar
|
||||
}
|
||||
return &result, nil
|
||||
case consts.GetTaskList:
|
||||
result := model.GameTaskResponse{}
|
||||
in.TaskParam.BrandId = s.BrandId
|
||||
resp, err := client.R().
|
||||
SetContext(ctx).
|
||||
SetBody(in.TaskParam).
|
||||
SetResult(&result).
|
||||
Post(s.taskUrlMap[s.Mode] + consts.GetTaskList)
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("请求出现异常")
|
||||
}
|
||||
if resp.IsError() {
|
||||
return nil, ecode.Fail.Sub("请求失败")
|
||||
}
|
||||
return &result, nil
|
||||
|
||||
return nil, nil
|
||||
default:
|
||||
return nil, ecode.Fail.Sub("不支持的任务")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user