Authored by 周少峰

Merge branch 'hotfix/colorName'

... ... @@ -14,7 +14,7 @@
{{#if title}}<h2 class="title">{{title}}</h2>{{/if}}
<ul class="left-list">
{{#each list}}
<li>
<li{{#name}} title="{{.}}"{{/name}}>
<a href="{{url}}">
<div class="classic-name">
{{#name}}
... ...
... ... @@ -13,7 +13,7 @@ module.exports = () => {
guangDetailReg = /.html$/;
if (req.subdomains.length > 1 && req.subdomains[1] === 'www') {
res.redirect(301, helpers.urlFormat(req.path, req.query || '', req.subdomains[0]));
return res.redirect(301, helpers.urlFormat(req.path, req.query || '', req.subdomains[0]));
}
if (req.subdomains.length) {
switch (req.subdomains[0]) {
... ...
{
"name": "yohobuy-node",
"version": "5.3.13",
"version": "5.3.16",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -108,8 +108,8 @@ function getShoppingKey() {
a.async = 1;
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.1.1/yas.js', '_yas')); // eslint-disable-line
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//' + // eslint-disable-line
'cdn.yoho.cn/yas-jssdk/2.1.2/yas.js', '_yas')); // eslint-disable-line
(function() {
var uid = getUid();
... ... @@ -119,7 +119,7 @@ function getShoppingKey() {
window._ozuid = uid; // 暴露ozuid
if (window._yas) {
window._yas(1 * new Date(), '2.1.1', 'yohobuy_web', uid, '', '');
window._yas(1 * new Date(), '2.1.2', 'yohobuy_web', uid, '', '');
}
}());
... ...
var $ = require('yoho-jquery');
var yas = require('../common/data-yas');
exports.yasHead = function(){
/* 获取商品编码*/
function getPrdId() {
return +$('.main').data('id');
}
/* 点击商品详情页【立即购买】按钮时埋点*/
$('#buy-now').click(function() {
var num = +$('#num').text();
var color = $('.chose-color .colors .focus').find('color-name').text();
var size = $('#sizes .size .focus').data('name');
var option = {
PRD_ID: getPrdId(),
PRD_NUM: num,
COLOR: color,
SIZE: size
};
yas.givePoint('YB_GDS_BUY_NOW_C', option);
});
/* 点击商品详情页商品角度图时埋点*/
$('#thumbs > .thumb-wrap').on('click', '.thumb', function() {
var $this = $(this);
var $index = $this.index() + 1;
yas.givePoint('YB_GDS_PICTURE_C', {PRD_ID: getPrdId(), PIC_INDEX: $index});
});
/* 点击商品分享渠道时埋点*/
$('.share-row .share-to i').on('click', function() {
var $this = $(this);
var $index = $this.index() + 1;
yas.givePoint('YB_GDS_SHARE_TYPE_C', {PRD_ID: getPrdId(), TYPE_ID: $index});
});
/* 查看VIP价格后的【立即登录】按钮点击埋点*/
$('.market-price .vip-price a').click(function() {
yas.givePoint('YB_GDS_VIP_PRICE_SIGN_C', {PRD_ID: getPrdId()});
});
/* 点击【展开全部促销】按钮时*/
$('.activity-wrapper .activity-title').click(function() {
yas.givePoint('YB_GDS_ALL_PROMOTION_C', { PRD_ID: getPrdId() });
});
/* 点击优惠券领取模块埋点*/
$('.small-coupon-list li .coupon-item .small-desc').click(function() {
var $this = $(this);
var coupon = $this.parent('.coupon-item').data('id');
yas.givePoint('YB_GDS_COUPON_C', {PRD_ID: getPrdId(), COUPON: coupon});
});
/* 点击商品详情页颜色时*/
$('.chose-color .colors').on('click', 'li', function() {
var $this = $(this);
var color = $this.find('color-name').text();
yas.givePoint('YB_GDS_COLOR_C', {PRD_ID: getPrdId(), COLOR: color});
});
/* 点击商品详情页尺寸时埋点*/
$('#sizes .size').on('click', 'li', function() {
var $this = $(this);
yas.givePoint('YB_GDS_SIZE_C', {PRD_ID: getPrdId(), SIZE: $this.data('name')});
});
/*点击到货通知按钮时*/
$('.trade-content .type-chose').on('click', '#enable-notify', function() {
yas.givePoint('YB_GDS_ARRIVAL_NOTICE_C', {PRD_ID: getPrdId()});
});
//点击数量加减号埋点
$('#plus-num').click(function(){
yas.givePoint('YB_GDS_NUMBER_C', {PRD_ID: getPrdId(), TYPE : 1});
});
$('#minus-num').click(function(){
yas.givePoint('YB_GDS_NUMBER_C', {PRD_ID: getPrdId(), TYPE : 2});
});
}
var $ = require('yoho-jquery');
var yas = require('../common/data-yas');
exports.yasHead = function() {
/* 获取商品编码*/
function getPrdId() {
return +$('.main').data('id');
}
/* 点击商品详情页【立即购买】按钮时埋点*/
$('#buy-now').click(function() {
var num = +$('#num').text(),
color = $('.chose-color .colors .focus').find('.color-name').text(),
size = $('#sizes .size .focus').data('name');
var option = {
PRD_ID: getPrdId(),
PRD_NUM: num,
COLOR: color,
SIZE: size
};
yas.givePoint('YB_GDS_BUY_NOW_C', option);
});
/* 点击商品详情页商品角度图时埋点*/
$('#thumbs > .thumb-wrap').on('click', '.thumb', function() {
var $this = $(this);
var $index = $this.index() + 1;
yas.givePoint('YB_GDS_PICTURE_C', {PRD_ID: getPrdId(), PIC_INDEX: $index});
});
/* 点击商品分享渠道时埋点*/
$('.share-row .share-to i').on('click', function() {
var $this = $(this);
var $index = $this.index() + 1;
yas.givePoint('YB_GDS_SHARE_TYPE_C', {PRD_ID: getPrdId(), TYPE_ID: $index});
});
/* 查看VIP价格后的【立即登录】按钮点击埋点*/
$('.market-price .vip-price a').click(function() {
yas.givePoint('YB_GDS_VIP_PRICE_SIGN_C', {PRD_ID: getPrdId()});
});
/* 点击【展开全部促销】按钮时*/
$('.activity-wrapper .activity-title').click(function() {
yas.givePoint('YB_GDS_ALL_PROMOTION_C', { PRD_ID: getPrdId() });
});
/* 点击优惠券领取模块埋点*/
$('.small-coupon-list li .coupon-item .small-desc').click(function() {
var $this = $(this);
var coupon = $this.parent('.coupon-item').data('id');
yas.givePoint('YB_GDS_COUPON_C', {PRD_ID: getPrdId(), COUPON: coupon});
});
/* 点击商品详情页颜色时*/
$('.chose-color .colors').on('click', 'li', function() {
var $this = $(this);
var color = $this.find('.color-name').text();
yas.givePoint('YB_GDS_COLOR_C', {PRD_ID: getPrdId(), COLOR: color});
});
/* 点击商品详情页尺寸时埋点*/
$('#sizes .size').on('click', 'li', function() {
var $this = $(this);
yas.givePoint('YB_GDS_SIZE_C', {PRD_ID: getPrdId(), SIZE: $this.data('name')});
});
/* 点击到货通知按钮时*/
$('.trade-content .type-chose').on('click', '#enable-notify', function() {
yas.givePoint('YB_GDS_ARRIVAL_NOTICE_C', {PRD_ID: getPrdId()});
});
// 点击数量加减号埋点
$('#plus-num').click(function() {
yas.givePoint('YB_GDS_NUMBER_C', {PRD_ID: getPrdId(), TYPE: 1});
});
$('#minus-num').click(function() {
yas.givePoint('YB_GDS_NUMBER_C', {PRD_ID: getPrdId(), TYPE: 2});
});
};
... ...
... ... @@ -296,6 +296,7 @@
width: 50px;
height: 50px;
color: #ffc513;
font-size: 14px;
text-align: center;
line-height: 57px;
background: url('/product/hat.png');
... ... @@ -636,6 +637,9 @@
.name {
font-size: 14px;
font-weight: bold;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.en-name {
... ...