Authored by 周少峰

Merge branch 'feature/app-transfer' into gray

... ... @@ -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" 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>
</div>
<!-- updateAt {{updateTime}} -->
... ...
... ... @@ -44,9 +44,22 @@
<a class="link go-yoho-items" href="{{itemUrl}}" target="_blank">YOHO!BUY 有货服务条款</a>
</span>
</li>
<li class="clearfix">
<li class="clearfix reg-btn-area">
<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">
<a class="qrcode-reg" href="//www.yohobuy.com/download/app" target="_blank">
<i class="qrcode-icon"></i>
</a>
<div class="download-app-box">
<div class="qr-img"></div>
<h3 class="qr-words">扫描二维码</h3>
<h3 class="qr-words">下载YohoBuy手机端</h3>
<h3 class="qr-more">
<a href="//www.yohobuy.com/download/app" target="_blank">更多客户端下载</a>
</h3>
</div>
</div>
</li>
{{# loginUrl}}
<li class="quick-login-container">
... ...
... ... @@ -24,7 +24,7 @@
<div class="brand-banner base-shop-banner">
<div class="banner-img" style="height: {{bannerHeight}}px;background: url({{image2 banner}})"></div>
<div class="opt-wrap">
<p class="opt center-content">
<div class="opt center-content">
{{#if showShopName}}
<span class="shop-name">{{shopName}}</span>
{{/if}}
... ... @@ -39,7 +39,16 @@
<span id="shop-favor" class="brand-favor shop-favor" data-id="{{shopId}}">
<i class="iconfont{{#if coled}} coled{{/if}}">&#xe611;</i>
</span>
</p>
<div class="qrcode-hover-box" data-id="{{shopId}}">
<span class="qrcode-shop">
<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":"{{shopId}}","shop_template_type":"1","shop_name":"{{shopName}}"}}'></div>
<p>扫一扫,手机逛更方便</p>
</div>
</span>
</div>
</div>
</div>
</div>
{{/ shopBanner}}
... ...
{{# shopTopBanner}}
<div class="shop-banner">
<div class="shop-banner shop-decoration-banner">
<div class="banner-img" style="height: {{bannerHeight}}px;background: url({{image2 banner w=1150 h=bannerHeight}})">
<div class="banner-mark"></div>
</div>
... ... @@ -23,6 +23,13 @@
{{/if}}
</span>
</div>
<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>
<p>扫一扫,手机逛更方便</p>
</div>
</div>
</div>
</div>
{{#brandIntro}}
... ...
... ... @@ -39,7 +39,15 @@
</div>
</div>
<div class="share-row"><span class="title pull-left">分享:</span> {{> common/share }} </div>
<div class="share-row">
<span class="title pull-left">分享:</span> {{> common/share }}
<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>
<div id="thumbs" class="pull-right thumbs">
{{# colors}}
... ...
Stack trace:
Frame Function Args
000FFFFA318 0018007164E (0018026F12D, 00180224DC6, 000FFFFA318, 000FFFF9210)
000FFFFA318 00180046669 (00000000000, 00000000000, 00000000000, 001005E6E6C)
000FFFFA318 001800466A2 (0018026F1E9, 000FFFFA1C8, 000FFFFA318, 00000000000)
000FFFFA318 001800BDFEF (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFA318 001800BE20F (000FFFFA340, 00000000000, 00000000000, 00000000000)
000FFFFA3C0 001800BF4AD (000FFFFA340, 00000000000, 00000000000, 00000000000)
End of stack trace
... ...
... ... @@ -17,9 +17,9 @@ module.exports = {
cookieDomain: '.yohobuy.com',
domains: {
// test3
//singleApi: 'http://api-test3.yohops.com:9999/',
//api: 'http://api-test3.yohops.com:9999/',
//service: 'http://service-test3.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/',
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// prod
singleApi: 'http://single.yoho.cn/',
... ...
... ... @@ -366,7 +366,22 @@
</div>
</div>
</div>
<div class="return-top hide">
<span class="iconfont">&#xe607;</span>
</div>
<div class="right-floating-layer hide">
<div class="qrcode-hover-box">
<a class="layer-box qrcode-download-right" href="//www.yohobuy.com/download/app" target="_blank">
<span class="qrcode-img">&nbsp;</span>
</a>
<div class="download-app-box">
<div class="qr-img"></div>
<h3 class="qr-words">扫描二维码</h3>
<h3 class="qr-words">下载YohoBuy手机端</h3>
<h3 class="qr-more">
<a href="//www.yohobuy.com/download/app" target="_blank">更多客户端下载</a>
</h3>
</div>
</div>
<div class="layer-box return-top">
<span class="iconfont">&#xe607;</span>
</div>
</div>
</div>
... ...
{
"name": "yohobuy-node",
"version": "5.4.23",
"version": "5.4.24",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...

784 Bytes | W: | H:

1.11 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

43.5 KB | W: | H:

44.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.71 KB | W: | H:

3.01 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
var $qrcodeActivity = $('.qrcode-activity');
var $qrcodeImg = $('#qrcode-img');
require('../common');
require('yoho-jquery-qrcode');
$qrcodeActivity.find('.close-btn').click(function() {
$qrcodeActivity.hide();
});
// 生成二维码
$qrcodeImg.qrcode({
render: 'div', // 显示方式,canvas,image和div
text: $qrcodeImg.attr('data-url'), // 二维码的内容
size: parseInt($qrcodeImg.width(), 10) // 大小
});
$qrcodeActivity.mouseenter(function() {
_hmt.push(['_trackEvent', '二维码', '活动页', 'id', $(this).attr('data-id')]);
});
... ...
... ... @@ -129,9 +129,9 @@ $(window).on('resize', function() {
// return top
if (w < 1360) {
$('.return-top').addClass('min');
$('.right-floating-layer').addClass('min');
} else {
$('.return-top').removeClass('min');
$('.right-floating-layer').removeClass('min');
}
// body
... ...
... ... @@ -8,6 +8,8 @@ var $ = require('yoho-jquery'),
lazyLoad = require('yoho-jquery-lazyload');
var $returnTop = $('.return-top');
var $qrcodeHoverBox = $('.qrcode-hover-box');
var $rightFloatingLayer = $('.right-floating-layer');
lazyLoad($('img.lazy'));
... ... @@ -127,7 +129,7 @@ function actionhomeFootChange() {
function rePosReturn() {
if ($(window).height() > $(document).height()) {
$returnTop.addClass('hide');
$rightFloatingLayer.addClass('hide');
}
// 只在窗口高度大于文档高度的时候,隐藏返回顶部
... ... @@ -143,16 +145,22 @@ $returnTop.click(function() {
}, 500);
});
$qrcodeHoverBox.mouseenter(function() {
_hmt.push(['_trackEvent', '二维码', '右侧悬浮', '', '']);
}).click(function() {
_hmt.push(['_trackEvent', '二维码', '右侧悬浮', '', '']);
});
$(window).scroll(function() {
if ($(window).scrollTop() === 0) {
$returnTop.addClass('hide');
$rightFloatingLayer.addClass('hide');
} else {
$returnTop.removeClass('hide');
$rightFloatingLayer.removeClass('hide');
}
});
// 如果初始是隐藏的,监听图片加载,重新确定return-top的高度
if ($returnTop.hasClass('hide')) {
if ($rightFloatingLayer.hasClass('hide')) {
$('img').load(rePosReturn);
}
... ...
... ... @@ -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', '二维码', '注册页', '', '']);
});
... ...
... ... @@ -73,6 +73,8 @@ var notifyOkTpl = require('hbs/product/notify-ok.hbs');
var $goodsIdArr = [];
require('yoho-jquery-qrcode');
function limitedProductUrl(s) {
return window.location.href + '?openby:yohobuy={"action":"go.limitpurchase","params":{"lp":"' + s + '"}}';
}
... ... @@ -386,6 +388,19 @@ bindEvent.add(function() {
}
});
// 生成二维码
var $qrcodeImg = $('#qrcode-img'); // eslint-disable-line
$qrcodeImg.qrcode({
render: 'div', // 显示方式,canvas,image和div
text: $qrcodeImg.attr('data-url'), // 二维码的内容
size: parseInt($qrcodeImg.width(), 10) // 大小
});
$('.qrcode-buy').mouseenter(function() {
_hmt.push(['_trackEvent', '二维码', '商品详情页', 'skn', $(this).attr('skn')]);
});
// 是否能:量贩购买,量贩小于库存才能购买
function canBundleBuy() {
return goodsBaseNum <= maxStock;
... ... @@ -1858,7 +1873,6 @@ $(function() {
}
});
});
});
yasAtBottom.yasBottom();
... ...
... ... @@ -23,17 +23,20 @@ var listType = $('.path-nav').attr('listType'),
var filterValue = yas.getFilterValue();
var commonParams = {};
var $qrcodeImg = $('#qrcode-img');
$('.good-info .product-id').each(function() {
$productIdArr.push($(this).html());
});
require('yoho-jquery-qrcode');
require('../common');
require('../plugins/filter');
require('../plugins/sort-pager');
require('./detail/latest-walk');
require('./index/top-coupon');
// 品牌
require('./index/brand');
... ... @@ -133,4 +136,13 @@ $('.good-item-wrapper').click(function() {
yas.givePoint(opt, loadYas);
});
// 生成二维码
$qrcodeImg.qrcode({
render: 'div', // 显示方式,canvas,image和div
text: $qrcodeImg.attr('data-url'), // 二维码的内容
size: parseInt($qrcodeImg.width(), 10) // 大小
});
$('.qrcode-hover-box').mouseenter(function() {
_hmt.push(['_trackEvent', '二维码', '普通店铺', 'shopId', $(this).attr('data-id')]);
});
... ...
... ... @@ -21,6 +21,7 @@ var $shopIntro = $('.shop-intro'),
fixedAreaTop = $fixedArea.offset() ? $fixedArea.offset().top : 0;
var shopId = $shopCollect.data('id');
var $qrcodeImg = $('#qrcode-img');
// Pjax
require('yoho-jquery-pjax');
... ... @@ -31,6 +32,19 @@ require('../plugins/sort-pager');
require('../plugins/slider');
require('./index/top-coupon');
require('yoho-jquery-qrcode');
// 生成二维码
$qrcodeImg.qrcode({
render: 'div', // 显示方式,canvas,image和div
text: $qrcodeImg.attr('data-url'), // 二维码的内容
size: parseInt($qrcodeImg.width(), 10) // 大小
});
$('.qrcode-decoration').mouseenter(function() {
_hmt.push(['_trackEvent', '二维码', '经典店铺', 'shopId', $(this).attr('data-id')]);
});
// require('../product/list');
... ...
.qrcode-activity {
width: 190px;
height: 210px;
position: fixed;
left: 0;
bottom: 95px;
border: 1px solid #b0b0b0;
background: #fff;
.qrcode-img {
width: 150px;
height: 150px;
margin: 26px auto 10px;
}
.close-btn {
position: absolute;
right: 6px;
top: 6px;
font-size: 12px;
cursor: pointer;
}
p {
font-size: 12px;
color: #444;
text-align: center;
}
}
\ No newline at end of file
... ...
@import "activity";
\ No newline at end of file
... ...
... ... @@ -330,20 +330,29 @@
}
}
.return-top {
.right-floating-layer {
position: fixed;
width: 60px;
height: 60px;
left: 50%;
bottom: 20px;
margin-left: 595px;
z-index: 4;
}
.layer-box {
width: 60px;
height: 60px;
text-align: center;
line-height: 50px;
color: #fff;
background: #000;
opacity: 0.5;
bottom: 20px;
cursor: pointer;
z-index: 4;
margin-top: 20px;
&:first-child {
margin-top: 0;
}
&:hover {
opacity: 0.9;
... ... @@ -353,9 +362,75 @@
font-size: 34px;
}
}
.qrcode-hover-box {
width: 71px;
position: relative;
left: -11px;
text-align: right;
&:hover {
.download-app-box {
display: block;
}
.layer-box {
opacity: 0.9;
}
}
}
.qrcode-download-right {
display: inline-block;
.qrcode-img {
width: 28px;
height: 28px;
background: url("/layout/qrcode.png") no-repeat;
display: inline-block;
margin-top: 16px;
}
}
.download-app-box {
position: absolute;
bottom: -80px;
left: -231px;
width: 231px;
height: 290px;
background-color: #f8f8f8;
z-index: 1000;
display: none;
border: 1px solid #b0b0b0;
.qr-img {
position: relative;
background-image: resolve('layout/qr.png');
background-repeat: no-repeat;
background-size: 100% 100%;
margin: 32px auto 15px;
width: 143px;
height: 147px;
}
.qr-words {
height: 25px;
line-height: 25px;
font-size: 16px;
text-align: center;
color: #000;
}
.qr-more {
margin-top: 6px;
line-height: 25px;
font-size: 14px;
text-align: center;
}
}
}
.yoho-footer .return-top.min {
.yoho-footer .right-floating-layer.min {
left: 100%;
right: 20px;
margin-left: auto;
... ...
... ... @@ -97,6 +97,12 @@
}
}
.phoneapp {
a {
color: #d71d32;
}
}
.nick-name {
color: #000;
}
... ...
... ... @@ -6,6 +6,7 @@
@import "common/dialog";
@import "pager";
@import "path-nav";
@import 'activity/index';
/* 模块 */
@import 'help/index';
... ... @@ -17,4 +18,4 @@
@import 'guang/index';
/*@import 'cart/index';*/
@import 'service/index';
@import '3party/index';
@import '3party/index';
\ No newline at end of file
... ...
... ... @@ -174,6 +174,7 @@
background: #ff1901;
font-weight: bold;
font-size: 20px;
float: left;
&.disable {
background: #555;
... ... @@ -280,4 +281,86 @@
line-height: 45px;
}
}
.qrcode-hover-reg {
float: left;
margin-left: 10px;
position: relative;
width: 55px;
&:hover {
.download-app-box {
display: block;
}
}
.qrcode-reg {
width: 45px;
height: 45px;
border: 1px solid #b0b0b0;
box-sizing: border-box;
text-align: center;
display: inline-block;
}
.qrcode-icon {
width: 28px;
height: 28px;
background: url("/passport/qrcode.png") no-repeat;
display: inline-block;
margin-top: 7px;
}
.download-app-box {
position: absolute;
bottom: 0;
left: 55px;
width: 231px;
height: 290px;
background-color: #f8f8f8;
z-index: 1000;
display: none;
border: 1px solid #b0b0b0;
&:before {
content: "";
position: absolute;
left: -8px;
bottom: 14px;
display: inline-block;
width: 8px;
height: 16px;
background: url("/passport/arrow-left.jpg") no-repeat;
}
.qr-img {
position: relative;
background-image: resolve('layout/qr.png');
background-repeat: no-repeat;
background-size: 100% 100%;
margin: 32px auto 15px;
width: 143px;
height: 147px;
}
.qr-words {
height: 25px;
line-height: 25px;
font-size: 16px;
text-align: center;
color: #000;
}
.qr-more {
margin-top: 6px;
line-height: 25px;
font-size: 14px;
text-align: center;
}
}
}
.reg-btn-area {
width: 340px;
}
}
... ...
... ... @@ -830,6 +830,60 @@
.title {
line-height: 16px !important;
}
.qrcode-buy {
color: #cf031a;
font-size: 14px;
float: right;
position: relative;
height: 35px;
width: 96px;
&:hover {
.qrcode-box {
display: block;
}
}
.qrcode-icon {
background: url("/product/qrcode.png") no-repeat;
width: 16px;
height: 16px;
display: inline-block;
vertical-align: bottom;
margin-right: 10px;
}
.qrcode-box {
border: 1px solid #b0b0b0;
width: 150px;
height: 150px;
background: #f8f8f8;
position: absolute;
top: 30px;
left: -56px;
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: relative;
left: 67px;
top: -8px;
}
.qrcode-img {
width: 130px;
height: 130px;
margin: 2px auto;
}
}
}
}
.balance {
... ...
... ... @@ -72,7 +72,135 @@
}
.shop-favor {
margin-right: 60px;
margin-right: 5px;
}
.qrcode-shop {
margin-right: 0;
}
.qrcode-hover-box {
height: 48px;
width: 38px;
display: inline-block;
margin-right: 25px;
}
.qrcode-hover-box:hover {
.qrcode-box {
display: block;
}
}
.qrcode-shop {
position: relative;
.qrcode-icon {
background: url("/product/qrcode-white.png") no-repeat;
width: 16px;
height: 16px;
display: inline-block;
position: relative;
top: 2px;
}
.qrcode-box {
border: 1px solid #b0b0b0;
width: 190px;
height: 210px;
position: absolute;
top: 42px;
right: -26px;
background: #f8f8f8;
display: none;
}
.qrcode-box:before {
content: "";
width: 16px;
height: 8px;
background: url("/product/arrow-top.png") no-repeat;
display: block;
position: absolute;
top: -8px;
left: 140px;
}
.qrcode-img {
width: 150px;
height: 150px;
margin: 20px auto 10px;
}
p {
font-size: 14px;
color: #434343;
text-align: center;
}
}
}
.shop-decoration-banner {
.qrcode-shop {
margin-right: 0;
}
.qrcode-hover-box {
height: 48px;
width: 38px;
display: inline-block;
margin-right: 15px;
position: relative;
top: 9px;
left: 6px;
z-index: 9;
}
.qrcode-hover-box:hover {
.qrcode-box {
display: block;
}
}
.qrcode-icon {
background: url("/product/qrcode-white-big.png") no-repeat;
width: 28px;
height: 28px;
display: inline-block;
}
.qrcode-box {
border: 1px solid #b0b0b0;
width: 190px;
height: 210px;
position: absolute;
top: 42px;
right: -20px;
background: #f8f8f8;
display: none;
}
.qrcode-box:before {
content: "";
width: 16px;
height: 8px;
background: url("/product/arrow-top.png") no-repeat;
display: block;
position: absolute;
top: -8px;
left: 140px;
}
.qrcode-img {
width: 150px;
height: 150px;
margin: 20px auto 10px;
}
p {
font-size: 14px;
color: #434343;
text-align: center;
}
}
... ...