diff --git a/src/controllers/games/gift.js b/src/controllers/games/gift.js index d33e65a..92f579d 100644 --- a/src/controllers/games/gift.js +++ b/src/controllers/games/gift.js @@ -133,6 +133,7 @@ router.post('/list', async (req, res, next) => { cond_name: body.cond_name, condition: body.condition, list: body.list, + numList: body.numList }) const result = await list.save() res.send({ @@ -165,6 +166,7 @@ router.put('/list', async (req, res, next) => { cond_name: body.cond_name, condition: body.condition, list: body.list, + numList: body.numList } ) res.send({ diff --git a/src/models/admin/GameGift.js b/src/models/admin/GameGift.js index 1880df4..cd30431 100644 --- a/src/models/admin/GameGift.js +++ b/src/models/admin/GameGift.js @@ -31,6 +31,7 @@ const GiftListSchema = new mongoose.Schema( cond_name: {type: String}, // 兑换条件名称 condition: {type: Number}, // 兑换条件 list: [{type: String, ref: 'GameGift'}], + numList: {type: Object, default: {}}, // 物品显示数量,对应 list deleted: {type: Boolean, default: false}, }, {