增加兑换物品数量控制

This commit is contained in:
yulixing 2019-08-22 14:23:06 +08:00
parent 651116f490
commit 54b12fb288
2 changed files with 3 additions and 0 deletions

View File

@ -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({

View File

@ -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},
},
{