From a03d0746758f52afebac90afe1ebe6feb35cfa88 Mon Sep 17 00:00:00 2001 From: chaosBreaking Date: Sat, 12 Oct 2019 23:02:08 +0800 Subject: [PATCH] realname --- src/modules/user/user.controller.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/user/user.controller.js b/src/modules/user/user.controller.js index abb842d..16db769 100644 --- a/src/modules/user/user.controller.js +++ b/src/modules/user/user.controller.js @@ -194,22 +194,22 @@ module.exports = { encoding: 'utf-8' }); const { pic1, pic2 } = form.data; - const { name, nation, idType, idNo } = form.fields || {}; - if (!pic1 || !pic2 || !name || !nation || !idType || !idNo) return res.json({ + const { realname, nation, idType, idNo } = form.fields || {}; + if (!pic1 || !pic2 || !realname || !nation || !idType || !idNo) return res.json({ code: 1, msg: '缺少必要信息' }); const action = createAction(5, { userId, - detail: { verifyLevel, name, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path } + detail: { verifyLevel, realname, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path } }); - const verifyReq = createVerifyReq({ userId, verifyLevel, name, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path }); + const verifyReq = createVerifyReq({ userId, verifyLevel, realname, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path }); await Promise.all([ action.save(), verifyReq.save(), User.findByIdAndUpdate(userId, { verifyData: { - [verifyLevel]: { name, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path } + [verifyLevel]: { realname, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path } } }) ])