将活动的奖励结果改成数组

This commit is contained in:
zhl 2021-05-20 20:34:18 +08:00
parent fe417b99c7
commit 4c2afbff6e
2 changed files with 9 additions and 9 deletions

View File

@ -98,13 +98,6 @@
"gameResult": 0 // 当局的游戏结果, 单人的话和上一层gameResult相同
}
},
"rewards": [{
coupon: '优惠券的id',
name: '优惠券名',
count: 1, //数量
couponUrl: '优惠券详情图的url',
ids: ['获取记录的短id']
}]
}
```
### 3. 开始匹配
@ -292,7 +285,14 @@
"gameResult": 0, // 当局的游戏结果, 单人的话和上一层gameResult相同
"timeLast": 1620973155307 //上次回答时间
}
}
},
"rewards": [{
coupon: '优惠券的id',
name: '优惠券名',
count: 1, //数量
couponUrl: '优惠券详情图的url',
ids: ['获取记录的短id']
}]
}
```

View File

@ -143,7 +143,7 @@ export async function sendReward(history: any) {
continue
}
const data = await UserReward.addOneRecord(history, members[i].accountId, adata.id, adata.coupon, adata.count)
await sendMsg(history.room, members[i].sessionId, 'rewords', data)
await sendMsg(history.room, members[i].sessionId, 'rewords', [data])
}
}