Authored by shuaiguo

feat(注册):删除 token验证

... ... @@ -183,7 +183,9 @@ class Reg {
let smsCode = +req.body.smsCode;
let inviteCode = req.body.inviteCode || '';
let isFromMy = _.get(req.session, 'phoneReg.isFromMy', '0');
let token = req.body.token;
// let token = req.body.token;
let token = '';
let clientIp = req.yoho.clientIp || '';
let from = req.cookies.from || 'yohobuy';
... ... @@ -197,10 +199,10 @@ class Reg {
}
// 判断是否允许访问
if (!sign.verifyToken(mobile, token)) {
postResult.message = '非法 token';
return res.json(postResult);
}
// if (!sign.verifyToken(mobile, token)) {
// postResult.message = '非法 token';
// return res.json(postResult);
// }
// 判断密码是否符合规则
if (!/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/.test(password)) {
... ...
... ... @@ -24,10 +24,6 @@
<span
id="passwordEyeIcon" class="eye"><i class="iconfont eye-close">&#xe716;</i><i class="iconfont eye-open hide">&#xe714;</i></span>
</div>
{{!-- <div class="form-group invite-code">
<label for="inviteCode" class="iconfont">&#xe71e;</label><input type="text" name="inviteCode" placeholder="好友潮流口令(非必填)" autocomplete="off" value="{{inviteValue}}">
</div> --}}
<input name="token" type="hidden" value="{{token}}">
<div data-userverify="{{captchaShow}}" data-geetest="{{useGeetest}}" id="js-img-check"{{#unless useGeetest}} class="full-img-verify"{{/unless}}></div>
<button id="regBtn" class="reg-btn" type="button">注册</button>
<div class="protocol">
... ...