realname
This commit is contained in:
@@ -194,22 +194,22 @@ module.exports = {
|
|||||||
encoding: 'utf-8'
|
encoding: 'utf-8'
|
||||||
});
|
});
|
||||||
const { pic1, pic2 } = form.data;
|
const { pic1, pic2 } = form.data;
|
||||||
const { name, nation, idType, idNo } = form.fields || {};
|
const { realname, nation, idType, idNo } = form.fields || {};
|
||||||
if (!pic1 || !pic2 || !name || !nation || !idType || !idNo) return res.json({
|
if (!pic1 || !pic2 || !realname || !nation || !idType || !idNo) return res.json({
|
||||||
code: 1,
|
code: 1,
|
||||||
msg: '缺少必要信息'
|
msg: '缺少必要信息'
|
||||||
});
|
});
|
||||||
const action = createAction(5, {
|
const action = createAction(5, {
|
||||||
userId,
|
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([
|
await Promise.all([
|
||||||
action.save(),
|
action.save(),
|
||||||
verifyReq.save(),
|
verifyReq.save(),
|
||||||
User.findByIdAndUpdate(userId, {
|
User.findByIdAndUpdate(userId, {
|
||||||
verifyData: {
|
verifyData: {
|
||||||
[verifyLevel]: { name, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path }
|
[verifyLevel]: { realname, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
])
|
])
|
||||||
|
|||||||
Reference in New Issue
Block a user