特朗普头像任务
This commit is contained in:
@@ -44,7 +44,7 @@ func (l *GetTaskListLogic) GetTaskList(uid int, req *types.GetTaskListReq) (*typ
|
||||
totalCount = cast.ToInt(t.Param)
|
||||
}
|
||||
|
||||
resp.Tasks = append(resp.Tasks, types.Task{
|
||||
tks := types.Task{
|
||||
Id: t.Id,
|
||||
Title: t.Title,
|
||||
SubTitle: t.SubTitle,
|
||||
@@ -60,7 +60,12 @@ func (l *GetTaskListLogic) GetTaskList(uid int, req *types.GetTaskListReq) (*typ
|
||||
HasFinishCount: 0,
|
||||
TotalCount: totalCount,
|
||||
FinishState: model.TASK_PROGRESS_NOT_FINISHED,
|
||||
})
|
||||
}
|
||||
if tks.Type == model.TASKTYPE_TRUMP_HEAD {
|
||||
tks.Params = t.PropertyId
|
||||
}
|
||||
|
||||
resp.Tasks = append(resp.Tasks, tks)
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
@@ -91,7 +96,7 @@ func (l *GetTaskListLogic) GetTaskList(uid int, req *types.GetTaskListReq) (*typ
|
||||
// 计算任务完成数量以及总数
|
||||
hasFinishCount := 0
|
||||
totalCount := 1
|
||||
|
||||
param := t.Param
|
||||
if finishState >= model.TASK_PROGRESS_WAIT_REWARD {
|
||||
// 如果任务状态为待领取奖励, 完成数量等于总数量
|
||||
hasFinishCount = totalCount
|
||||
@@ -126,6 +131,9 @@ func (l *GetTaskListLogic) GetTaskList(uid int, req *types.GetTaskListReq) (*typ
|
||||
if hasBindTwitter == 1 {
|
||||
hasFinishCount = 1
|
||||
}
|
||||
|
||||
case model.TASKTYPE_TRUMP_HEAD:
|
||||
param = t.PropertyId
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +154,7 @@ func (l *GetTaskListLogic) GetTaskList(uid int, req *types.GetTaskListReq) (*typ
|
||||
Description: t.Description,
|
||||
Points: t.Points,
|
||||
ButtonText: t.ButtonText,
|
||||
Params: t.Param,
|
||||
Params: param,
|
||||
Type: t.Type,
|
||||
Url: t.Url,
|
||||
StartAt: t.StartAt.Time.Format(time.DateTime),
|
||||
|
||||
Reference in New Issue
Block a user