修改开箱记录中item的数据结构

This commit is contained in:
CounterFire2023 2024-04-24 19:53:41 +08:00
parent 4dc6dc1c6a
commit 97f8d8f92c
2 changed files with 3 additions and 3 deletions

View File

@ -346,7 +346,7 @@ class BoxController extends BaseController {
chest.items = [] chest.items = []
} }
items.forEach(item => { items.forEach(item => {
chest.items.push(item.id) chest.items.push(item)
}) })
if (items.find(item => item.type === 1)) { if (items.find(item => item.type === 1)) {
user.inWhiteList = true user.inWhiteList = true

View File

@ -68,8 +68,8 @@ export class ActivityChestClass extends BaseModule {
@prop({ type: () => [Number], default: [] }) @prop({ type: () => [Number], default: [] })
public bonusScores: number[] public bonusScores: number[]
// 获得的额外奖励 // 获得的额外奖励
@prop({ type: () => [String], default: [] }) @prop({ type: mongoose.Schema.Types.Mixed, default: [] })
public items: string[] public items: any
public toJson() { public toJson() {
return { return {