Authored by shuaiguo

Merge branch 'feature/captcha'

... ... @@ -9,6 +9,8 @@ const model = require('../models/feature');
const _ = require('lodash');
const stringProcess = require('../../../utils/string-process');
const config = global.yoho.config;
exports.index = function(req, res, next) {
let qcdn = _.get(req.app.locals, 'wap.qcloud_cdn');
... ... @@ -34,6 +36,7 @@ exports.index = function(req, res, next) {
page: 'feature',
title: title,
content: result,
captchaAppId: config.captcha.appId ,
activity_id: req.params.code,
isFeature: true,
wechatShare: true,
... ...
... ... @@ -305,5 +305,8 @@
<input type="hidden" value="{{content.atlBo}}" class="activity-plan">
<input type="hidden" value="{{content.templateId}}" class="template-id">
<input type="hidden" value="{{content.id}}" class="activity-id">
{{#if wap.ufo.coupon}}
<div class="yoho-tencentCaptcha" data-appid="{{captchaAppId}}" data-open="1"><div>
{{/if}}
{{/unless}}
</div>
... ...
... ... @@ -111,7 +111,7 @@ module.exports = {
debugStdout: true
}
},
zookeeperServer: '127.0.0.1:2181',
zookeeperServer: 'zk.yohoops.com:2181',
alipayConfig: {
payUrl: 'https://mapi.alipay.com/gateway.do',
service: 'alipay.wap.create.direct.pay.by.user',
... ... @@ -161,7 +161,7 @@ module.exports = {
port: '6379',
pass: '',
prefix: 'yohobuy_session:'
}
},
},
REQUEST_LIMIT: {
// 10s 最多访问20次
... ... @@ -178,7 +178,12 @@ module.exports = {
},
LIMITER_IP_TIME: 3600, // 超出访问限制ip限制访问1小时
superCapture: '93c70db61fe276f93ce781ad17dc47cd',
from: from
from: from,
// 优惠券防刷腾讯云验证码
captcha: {
appId: 2008945059
}
};
if (isProduction) {
... ...
{
"name": "yohobuywap-node-activity",
"version": "6.9.16",
"version": "6.9.15-32",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -88,7 +88,7 @@ window.onItemClick = function(item = {}) {
const {
articleId,
authorUid,
findGood: { productSkn, productType, id } = {},
findGood: { productSkn, productType, id, productName: name} = {},
} = item;
localStorage.setItem(FAV_GOODSIDSTORAGE, id);
... ... @@ -96,8 +96,19 @@ window.onItemClick = function(item = {}) {
// 点击上报事件
yasReport.clickReport({ productSkn, type: 1, articleId, authorUid });
// productType: 1 -> 有货 2 -> ufo
if (productType === 1) {
yoho.goProductDetail({ skn: productSkn, name, articleId });
} else {
yoho.goUfoProductDetail({
skn: productSkn,
name,
articleId,
});
}
// 跳转到有货精选
yoho.goFindGoodThings({ articleId, productSkn, productType, id });
// yoho.goFindGoodThings({ articleId, productSkn, productType, id });
};
window.onAuthorClick = function(item = {}) {
... ...