From be2bfa3b0e71d2185fbf9a5cea5f11a0b46e1d49 Mon Sep 17 00:00:00 2001 From: yulixing Date: Fri, 30 Aug 2019 11:53:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E5=93=81=E5=85=91=E6=8D=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=89=A9=E5=B1=95=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/games/gift.js | 2 ++ src/models/admin/GameGift.js | 1 + 2 files changed, 3 insertions(+) diff --git a/src/controllers/games/gift.js b/src/controllers/games/gift.js index 5b4186b..be6e6c1 100644 --- a/src/controllers/games/gift.js +++ b/src/controllers/games/gift.js @@ -145,6 +145,7 @@ router.post('/list', async (req, res, next) => { type: body.type, time: body.time, cfg: cfg, + extraData: body.extraData }) const result = await list.save() res.send({ @@ -183,6 +184,7 @@ router.put('/list', async (req, res, next) => { type: body.type, time: body.time, cfg: cfg, + extraData: body.extraData } ) res.send({ diff --git a/src/models/admin/GameGift.js b/src/models/admin/GameGift.js index a4808f2..047aa9f 100644 --- a/src/models/admin/GameGift.js +++ b/src/models/admin/GameGift.js @@ -38,6 +38,7 @@ const GiftListSchema = new mongoose.Schema( time: {type: String}, // 填写的发放配置 cfg: {type: Array, default: []}, // 生成的配置 deleted: {type: Boolean, default: false}, + extraData: {type: String, default: ''} //用于扩展 }, { collection: 'gift_list',