Authored by huangyi

修改api

... ... @@ -27,7 +27,17 @@ class ActWheelSurfModel extends global.yoho.BaseModel {
data.conf = await ActWheelSurfConf.findOne({where: {act_id: obj.act_id}});
// 获取当前活动奖品
data.prize = await ActWheelSurfPrize.count({where: {act_id: obj.act_id}});
let prize = await ActWheelSurfPrize.findAll({where: {act_id: obj.act_id}});
data.prize = prize.length;
data.emptyPrize = {};
for (let value of prize) {
if (value.type === 1) {
data.emptyPrize = value;
break;
}
}
// this.cache.set(md5('act' + obj.act_id), data);
// }
... ...