Authored by 王水玲

app 引流

... ... @@ -19,7 +19,9 @@ exports.special = (req, res) => {
res.render('special', _.merge({
module: 'activity',
page: 'special'
}, headerData, result[1]));
}, headerData, result[1], {
id: id
}));
}).catch((err) => {
res.send(err);
});
... ...
{{{content}}}
<div class="qrcode-activity">
<div class="qrcode-activity" data-id={{id}}>
<i class="iconfont close-btn">&#xe6ee;</i>
<div id="qrcode-img" class="qrcode-img" data-url="http://union.yoho.cn/union/app-downloads.html"></div>
<p>扫一扫,手机逛更方便</p>
... ...
... ... @@ -48,9 +48,9 @@
<input name="refer" id="refer" type="hidden" value="{{referUrl}}">
<input id="register-btn" class="btn register-btn disable" type="submit" value="{{regBtnText}}" disabled="">
<div class="qrcode-hover-reg">
<div class="qrcode-reg">
<a class="qrcode-reg" href="//www.yohobuy.com/download/app">
<i class="qrcode-icon"></i>
</div>
</a>
<div class="download-app-box">
<div class="qr-img"></div>
<h3 class="qr-words">扫描二维码</h3>
... ...
... ... @@ -39,7 +39,7 @@
<span id="shop-favor" class="brand-favor shop-favor" data-id="{{shopId}}">
<i class="iconfont{{#if coled}} coled{{/if}}">&#xe611;</i>
</span>
<div class="qrcode-hover-box">
<div class="qrcode-hover-box" data-id="{{shopId}}">
<span class="qrcode-shop">
<i class="qrcode-icon"></i>
<div class="qrcode-box">
... ...
... ... @@ -23,7 +23,7 @@
{{/if}}
</span>
</div>
<div class="qrcode-hover-box">
<div class="qrcode-hover-box qrcode-decoration" data-id="{{brandIntro.shopId}}">
<i class="qrcode-icon"></i>
<div class="qrcode-box">
<div id="qrcode-img" class="qrcode-img" data-url='http://union.yoho.cn/union/app-downloads.html?openby:yohobuy={"action":"go.shop","params":{"shop_id":"{{brandIntro.shopId}}","shop_template_type":"2","shop_name":"{{brandIntro.brandName}}"}}'></div>
... ...
... ... @@ -41,9 +41,11 @@
<div class="share-row">
<span class="title pull-left">分享:</span> {{> common/share }}
<div class="qrcode-buy">
<i class="qrcode-img"></i>扫一扫购买
<div id="qrcode-img" class="qrcode-box" data-url='http://union.yoho.cn/union/app-downloads.html?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"{{skn}}"}}'></div>
<div class="qrcode-buy" skn="{{skn}}">
<i class="qrcode-icon"></i>扫一扫购买
<div class="qrcode-box">
<div id="qrcode-img" class="qrcode-img" data-url='http://union.yoho.cn/union/app-downloads.html?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"{{skn}}"}}'></div>
</div>
</div>
</div>
</div>
... ...
... ... @@ -14,3 +14,7 @@ $qrcodeImg.qrcode({
text: $qrcodeImg.attr('data-url'), // 二维码的内容
size: parseInt($qrcodeImg.width(), 10) // 大小
});
$qrcodeActivity.mouseenter(function() {
_hmt.push(['_trackEvent', '二维码', '活动页', 'id', $(this).attr('data-id')]);
});
... ...
... ... @@ -145,8 +145,10 @@ $returnTop.click(function() {
}, 500);
});
$qrcodeHoverBox.click(function() {
$qrcodeHoverBox.mouseenter(function() {
_hmt.push(['_trackEvent', '二维码', '右侧悬浮', '', '']);
}).click(function() {
_hmt.push(['_trackEvent', '二维码', '右侧悬浮', '', '']);
});
$(window).scroll(function() {
... ...
... ... @@ -81,6 +81,11 @@ var bannerMap = {
$('#signin-url').attr('href', window.signinUrl());
$('#reg-url').attr('href', window.registerUrl());
$('.phoneapp').mouseenter(function() {
_hmt.push(['_trackEvent', '二维码', '头部手机版', '', '']);
}).click(function() {
_hmt.push(['_trackEvent', '二维码', '头部手机版', '', '']);
});
// handlebars模板
centerFn = handlebars.compile($('#simple-account-info-tpl').html() || '');
... ...
... ... @@ -650,3 +650,10 @@ exports.init = function(page) {
}
});
};
$('.qrcode-hover-reg').mouseenter(function() {
_hmt.push(['_trackEvent', '二维码', '注册页', '', '']);
}).click(function() {
_hmt.push(['_trackEvent', '二维码', '注册页', '', '']);
});
... ...
... ... @@ -394,7 +394,11 @@ bindEvent.add(function() {
$qrcodeImg.qrcode({
render: 'div', // 显示方式,canvas,image和div
text: $qrcodeImg.attr('data-url'), // 二维码的内容
size: 130 // 大小
size: parseInt($qrcodeImg.width(), 10) // 大小
});
$('.qrcode-buy').mouseenter(function() {
_hmt.push(['_trackEvent', '二维码', '商品详情页', 'skn', $(this).attr('skn')]);
});
// 是否能:量贩购买,量贩小于库存才能购买
... ...
... ... @@ -142,3 +142,7 @@ $qrcodeImg.qrcode({
text: $qrcodeImg.attr('data-url'), // 二维码的内容
size: parseInt($qrcodeImg.width(), 10) // 大小
});
$('.qrcode-hover-box').mouseenter(function() {
_hmt.push(['_trackEvent', '二维码', '普通店铺', 'shopId', $(this).attr('data-id')]);
});
... ...
... ... @@ -42,6 +42,10 @@ $qrcodeImg.qrcode({
size: parseInt($qrcodeImg.width(), 10) // 大小
});
$('.qrcode-decoration').mouseenter(function() {
_hmt.push(['_trackEvent', '二维码', '经典店铺', 'shopId', $(this).attr('data-id')]);
});
// require('../product/list');
product.init(4);
... ...
... ... @@ -8,8 +8,8 @@
background: #fff;
.qrcode-img {
width: 140px;
height: 140px;
width: 150px;
height: 150px;
margin: 26px auto 10px;
}
... ...
... ... @@ -300,6 +300,7 @@
border: 1px solid #b0b0b0;
box-sizing: border-box;
text-align: center;
display: inline-block;
}
.qrcode-icon {
... ...
... ... @@ -841,11 +841,11 @@
&:hover {
.qrcode-box {
opacity: 1;
display: block;
}
}
.qrcode-img {
.qrcode-icon {
background: url("/product/qrcode.png") no-repeat;
width: 16px;
height: 16px;
... ... @@ -858,25 +858,30 @@
border: 1px solid #b0b0b0;
width: 150px;
height: 150px;
background: #fff;
background: #f8f8f8;
position: absolute;
margin-top: 13px;
top: 30px;
left: -56px;
z-index: 9;
opacity: 0;
padding: 10px;
display: none;
box-sizing: border-box;
z-index: 9;
&:before {
content: "";
width: 16px;
height: 8px;
background: url("/product/arrow-top.png") no-repeat;
display: block;
position: absolute;
position: relative;
left: 67px;
top: -8px;
}
.qrcode-img {
width: 130px;
height: 130px;
margin: 2px auto;
}
}
}
}
... ...
... ... @@ -111,7 +111,7 @@
position: absolute;
top: 42px;
right: -26px;
background: #fff;
background: #f8f8f8;
display: none;
}
... ... @@ -127,9 +127,9 @@
}
.qrcode-img {
width: 140px;
height: 140px;
margin: 25px auto 10px;
width: 150px;
height: 150px;
margin: 20px auto 10px;
}
p {
... ... @@ -176,7 +176,7 @@
position: absolute;
top: 42px;
right: -20px;
background: #fff;
background: #f8f8f8;
display: none;
}
... ... @@ -192,9 +192,9 @@
}
.qrcode-img {
width: 140px;
height: 140px;
margin: 25px auto 10px;
width: 150px;
height: 150px;
margin: 20px auto 10px;
}
p {
... ...