Authored by yyq

check页添加reqid

... ... @@ -7,9 +7,14 @@ const simpleHeaderModel = require('../../../doraemon/models/simple-header');
const logger = global.yoho.logger;
const index = (req, res) => {
let remoteIp = req.yoho.clientIp || '';
logger.info(`limit remote ip: ${remoteIp}; ua: ${req.header('User-Agent')}; uid: ${req.user.uid}; reqId: ${req.reqID}`); // eslint-disable-line
return res.render('robot-check', {
module: '3party',
page: 'robot-check',
reqId: req.reqID,
simpleHeader: simpleHeaderModel.setSimpleHeaderData()
});
};
... ...
<div class="robot-check-page yoho-page">
<div class="robot-check-page yoho-page" data-reqid="{{reqId}}">
<div class="captcha">
<div class="title">您的操作太频繁了~请完成以下操作后继续</div>
<div class="captcha-wrap"> </div>
... ...
... ... @@ -224,7 +224,7 @@ module.exports = class favorite extends global.yoho.BaseModel {
url = helpers.urlFormat(`/shop/${item.brand_domain}-${item.shop_id}.html`, null);
break;
case 'brand':
url = helpers.urlFormat(`/search/`, {brand: item.brand_id});
url = helpers.urlFormat('/search/', {brand: item.brand_id});
break;
default:
break;
... ...
... ... @@ -91,8 +91,6 @@ module.exports = (req, res, next) => {
if (exclusion) {
return next();
} else if (!allPass && policy) {
logger.info(`limit remote ip: ${remoteIp}; ua: ${req.header('User-Agent')}; uid: ${req.user.uid}`);
policy(req, res, next);
} else {
return next();
... ...