...
|
...
|
@@ -17,6 +17,7 @@ var path = require('path'); |
|
|
const uuid = require('uuid');
|
|
|
const os = require('os');
|
|
|
const regMobile = /(\d{3})\d{4}(\d{4})/;// 正则匹配替换手机号码中间4位
|
|
|
const regEmail = /(\d{3})\d{4}/;// 正则匹配替换邮箱中间4位
|
|
|
|
|
|
const captchaUrl = helpers.urlFormat('/passport/images', {t: Date.now()});
|
|
|
|
...
|
...
|
@@ -164,7 +165,7 @@ const bindEmail = (req, res, next) => { |
|
|
if (result.info.verify_email !== '') {
|
|
|
let info = result.info;
|
|
|
|
|
|
info.ellipsisEmail = info.verify_email.substring(0, 3) + '****' + info.verify_email.substring(7, 11);
|
|
|
info.ellipsisEmail = info.verify_email.replace(regEmail, '$1****');
|
|
|
info.checkCode = settingModel.cipheriv(info.uid + '.completeverify');
|
|
|
res.display('index', {
|
|
|
module: 'me',
|
...
|
...
|
@@ -289,7 +290,7 @@ const success = (req, res)=> { |
|
|
};
|
|
|
|
|
|
/*
|
|
|
* post1 第一步的post请求
|
|
|
* post1 第一步身份验证的post请求
|
|
|
* */
|
|
|
const validate1 = (req, res)=> {
|
|
|
co(function *() {
|
...
|
...
|
@@ -314,7 +315,7 @@ const validate1 = (req, res)=> { |
|
|
};
|
|
|
|
|
|
/*
|
|
|
* post2 第二步的post请求
|
|
|
* post2 第二步具体操作的post请求
|
|
|
* */
|
|
|
const validate2 = (req, res)=> {
|
|
|
co(function *() {
|
...
|
...
|
@@ -366,7 +367,7 @@ function getfilePath(req, res, next) { |
|
|
|
|
|
req.filePath = filePath;
|
|
|
req.pipe(uploadStream);
|
|
|
uploadStream.on('finish', function() {
|
|
|
uploadStream.on('finish', function () {
|
|
|
next();
|
|
|
});
|
|
|
}
|
...
|
...
|
|