Authored by 杨延青

Merge branch 'feature/question' into 'release/0718'

Feature/question



See merge request !1478
... ... @@ -51,6 +51,10 @@ exports.check = (req, res, next) => {
};
exports.geetestLoad = (req, res, next) => {
if (req.user.uid) {
return next();
}
req.yoho.captchaShow = false;
res.locals.useGeetest = true;
... ... @@ -72,7 +76,7 @@ exports.geetestLoad = (req, res, next) => {
exports.geetestCheck = (req, res, next) => {
let testCode = req.body.yohobuy;
if (testCode === global.yoho.config.testCode) {
if (testCode === global.yoho.config.testCode || req.user.uid) {
return next();
}
... ...
... ... @@ -51,6 +51,7 @@
</div>
</div>
</div>
<div data-userverify="{{captchaShow}}" data-geetest="{{useGeetest}}" id="js-img-check" {{#unless useGeetest}} class="full-img-verify" {{/unless}}></div>
{{#if noLogin}}
<div data-userverify="{{captchaShow}}" data-geetest="{{useGeetest}}" id="js-img-check" {{#unless useGeetest}} class="full-img-verify" {{/unless}}></div>
{{/if}}
</div>
... ...
... ... @@ -6,18 +6,26 @@ let $ = require('yoho-jquery'),
share = require('common/share'),
Validate = require('plugin/validata');
let validate = new Validate('#js-img-check', {
useREM: {
rootFontSize: 40,
picWidth: 150
let validate = {
getResults: () => {
return Promise.resolve({});
}
});
};
let question = {
$base: $('#qs-wrap'),
init: function() {
let that = this;
if ($('#js-img-check').length) {
validate = new Validate('#js-img-check', {
useREM: {
rootFontSize: 40,
picWidth: 150
}
});
}
this.$errTip = $('.error-tip');
this.$mobile = $('.user-mobile > input');
this.$item = $('.qs-item, .sub-qs-item', this.$base);
... ...