|
|
@ -39,34 +39,25 @@ func (t *ActivityCtl) ModuleCurrent() { |
|
|
|
t.CheckErr(err) |
|
|
|
t.Assert(exist, code.MSG_ACTIVITY_NOT_EXIST, "互动不存在") |
|
|
|
|
|
|
|
var data map[string]interface{} |
|
|
|
switch moduleName { |
|
|
|
case define.MODULE_TUGWAR: // 拔河
|
|
|
|
data, err := bahe_service.GetCurrentTugWar(activityId, uid, activity.RehearsalId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.JSON(data) |
|
|
|
data, err = bahe_service.GetCurrentTugWar(activityId, uid, activity.RehearsalId) |
|
|
|
case define.MODULE_CALORIE: // 卡路里
|
|
|
|
data, err := calorie_service.GetCurrentCalorie(activityId, uid, activity.RehearsalId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.JSON(data) |
|
|
|
data, err = calorie_service.GetCurrentCalorie(activityId, uid, activity.RehearsalId) |
|
|
|
case define.MODULE_SHAKRB: // 摇红包
|
|
|
|
// 没有初始状态 // 记下参与人数
|
|
|
|
data, err := red_envelope_service.GetCurrentRB(activityId, uid, activity.RehearsalId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.JSON(data) |
|
|
|
data, err = red_envelope_service.GetCurrentRB(activityId, uid, activity.RehearsalId) |
|
|
|
case define.MODULE_AUCTION: |
|
|
|
// 竞拍
|
|
|
|
data, err := auction_service.GetCurrentAuction(activityId, activity.RehearsalId, t.MustGetUID()) |
|
|
|
t.CheckErr(err) |
|
|
|
t.JSON(data) |
|
|
|
data, err = auction_service.GetCurrentAuction(activityId, activity.RehearsalId, t.MustGetUID()) |
|
|
|
case define.MODULE_VOTE: |
|
|
|
data, err := vote_service.GetCurrentVote(activityId, uid, activity.RehearsalId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.JSON(data) |
|
|
|
data, err = vote_service.GetCurrentVote(activityId, uid, activity.RehearsalId) |
|
|
|
case define.MODULE_BULLYS: |
|
|
|
data, err := bully_screen_service.GetCurrentBullyScreen(activityId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.JSON(data) |
|
|
|
data, err = bully_screen_service.GetCurrentBullyScreen(activityId) |
|
|
|
default: |
|
|
|
t.ERROR("不存在该模块", code.MSG_MODULE_NOT_EXIST) |
|
|
|
} |
|
|
|
t.CheckErr(err) |
|
|
|
t.JSON(data) |
|
|
|
} |