Authored by 周少峰

Merge branch 'hotfix/tongji'

... ... @@ -7,7 +7,7 @@
const helpers = global.yoho.helpers;
const TYPE = require('../type');
const MOBILE_DOMAIN = '//item.m.yohobuy.com';
const MOBILE_DOMAIN = '//m.yohobuy.com';
module.exports = [
// 商品详情页老链接,形式一
... ...
... ... @@ -32,7 +32,7 @@ const ptm = {
module.exports = () => {
return (req, res, next) => {
let domain = 'm.yohobuy.com';
let proRegNew = /^\/product\/p([\d]+).html(.*)/,
let proRegNew = /^\/product\/([\d]+).html(.*)/,
guangReg = /^\/guang/,
guangDetailReg = /\/guang\/info\/index/,
qsReg = /\?/;
... ... @@ -58,7 +58,7 @@ module.exports = () => {
data.mobileRefer += `/author-${req.yoho.channel}-${req.query.author_id}/`;
}
} else if (proRegNew.test(url)) {
data.mobileRefer = url.replace(proRegNew, `//${domain}/product/pro_$1_1/1.html$2`);
data.mobileRefer = url.replace(proRegNew, `//${domain}/product/$1.html$2`);
} else {
data.mobileRefer = `//${domain}${req.originalUrl}`;
}
... ...
... ... @@ -39,15 +39,15 @@ var _gaq = _gaq || [];
<script>
var _hmt = _hmt || [];
if (getUid() !== 0) {
_hmt.push(['_setCustomVar', 1, 'login', true, 2]);
}
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?65dd99e0435a55177ffda862198ce841";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
if (getUid() !== 0) {
_hmt.push(['_setCustomVar', 1, 'login', true, 2]);
}
})();
</script>
<!-- 百度站长统计 -->
... ...
{
"name": "yohobuy-node",
"version": "6.0.3",
"version": "6.0.4",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -114,7 +114,7 @@ function getShoppingKey() {
a.src = j;
m.parentNode.insertBefore(a, m);
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//' + // eslint-disable-line
'cdn.yoho.cn/yas-jssdk/2.4.2/yas.js', '_yas')); // eslint-disable-line
'cdn.yoho.cn/yas-jssdk/2.4.3/yas.js', '_yas')); // eslint-disable-line
(function() {
var uid = getUid();
... ... @@ -124,7 +124,7 @@ function getShoppingKey() {
window._ozuid = uid; // 暴露ozuid
if (window._yas) {
window._yas(1 * new Date(), '2.4.2', 'yohobuy_web', uid, '', '');
window._yas(1 * new Date(), '2.4.3', 'yohobuy_web', uid, '', '');
}
}());
... ...