From 8ecb5e586afc1796e0e3fcc4e28c59e85747ba2a Mon Sep 17 00:00:00 2001 From: chaosBreaking Date: Sun, 8 Sep 2019 01:17:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=B9=E6=89=8B=E6=9C=BA=E5=8F=B7?= =?UTF-8?q?=E5=90=8E=E6=8D=A2=E9=82=80=E8=AF=B7=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/fund/fund.model.js | 2 +- src/modules/user/user.controller.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/fund/fund.model.js b/src/modules/fund/fund.model.js index 7338c95..c720e2d 100644 --- a/src/modules/fund/fund.model.js +++ b/src/modules/fund/fund.model.js @@ -17,7 +17,7 @@ const FundSchema = new mongoose.Schema({ 'usdtTRX': '' } }, - // fund 为充值的矿晶的一系列数值,用于计算收益 + // fundList 为充值的矿晶的一系列数值,用于计算收益 // fund = 矿晶,单位KG fundList: [{}], // fundSum, 用户充值的总usdt数 diff --git a/src/modules/user/user.controller.js b/src/modules/user/user.controller.js index 230d51e..bfc1e4e 100644 --- a/src/modules/user/user.controller.js +++ b/src/modules/user/user.controller.js @@ -33,8 +33,10 @@ module.exports = { code: 2, error: 'Incorrect Code' }); + const newInviteCode = parseInt(phone.split('-')[1]).toString(36); return User.findByIdAndUpdate(userId, { - phone + phone, + inviteCode: newInviteCode }).then(data => { res.json({ code: 0,