fix: 改手机号后换邀请码
This commit is contained in:
@@ -17,7 +17,7 @@ const FundSchema = new mongoose.Schema({
|
||||
'usdtTRX': ''
|
||||
}
|
||||
},
|
||||
// fund 为充值的矿晶的一系列数值,用于计算收益
|
||||
// fundList 为充值的矿晶的一系列数值,用于计算收益
|
||||
// fund = 矿晶,单位KG
|
||||
fundList: [{}],
|
||||
// fundSum, 用户充值的总usdt数
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user