Authored by Rock Zhang

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop

5.23 KB | W: | H:

5.23 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

4.05 KB | W: | H:

4.05 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -114,6 +114,7 @@ function showChooseGifDialog() {
window.location.href = cartContentShow().find('.freebie > a').attr('href');
}, function() {
var info = window.cookie('order-info');
if (info) {
window.setCookie('order-info', '');
}
... ... @@ -191,8 +192,10 @@ if ($('.freebie').length > 0) {
}
$('.btn-balance').on('touchend', function() {
lowStockCount = 0;
var info = window.cookie('order-info');
lowStockCount = 0;
if (shouldLowStocks()) {
tip.show('所选商品中有' + lowStockCount + '种库存不足的商品');
return false;
... ...
... ... @@ -105,7 +105,6 @@ $('.icon-del').on('touchstart', function(e) {
autoHide: true,
fast: true
});
//window.setCookie('order-info', '');
window.setCookie('_yoho-cart-refreshByDelete', true);
window.location.href = '/cart/index/index?cartType=' + $('#cartType').val();
} else {
... ...
... ... @@ -93,6 +93,7 @@ $('.invoice').on('touchend', '.checkbox', function() {
function orderCompute() {
var yohoCoin = orderInfo('yohoCoin');
$.ajax({
method: 'POST',
url: '/cart/index/orderCompute',
... ...
... ... @@ -7,6 +7,7 @@
var $ = require('jquery'),
Hammer = require('yoho.hammer'),
Swiper = require('yoho.iswiper'),
loading = require('../plugin/loading'),
lazyLoad = require('yoho.lazyload');
var swiper,
... ... @@ -26,6 +27,8 @@ var brandsData,
$keyword,
clearTextHammer;
loading.showLoadingMask();
//热门品牌滑动
hotBrandsSwiper = new Swiper('.brands-swiper', {
grabCursor: true,
... ... @@ -48,9 +51,14 @@ $('.yoho-header').css({
top: 0
});
if ($('.banner-top').length > 0) {
$('.hot-brands').css('padding-top', '0');
}
(function() {
if ($('.banner-top').length > 0) {
$('.hot-brands').css('padding-top', '0');
}
$('.hide-when-loading').show();
loading.hideLoadingMask();
})();
$fixTitleBar = $('<div class="title-bar fixed-title-bar"><h2></h2></div>');
$fixTitleBar.css({
... ... @@ -187,8 +195,15 @@ if ($('.brand-search-page').length) {
if ($genderItem.length > 0) {
$genderItem.on('touchstart', function() {
var index = $(this).data('id') + 1;
$('.genderNav ul .active').removeClass('active');
$(this).addClass('active');
window.location.search = 'channel=' + ($(this).data('id') + 1);
$('.hide-when-loading').hide();
loading.showLoadingMask();
function reload() {
window.location.search = 'channel=' + index;
}
setTimeout(reload.bind(this), 100);
});
}
... ...
... ... @@ -12,9 +12,6 @@ var commentsNum,consultsNum;
var navtabEle = document.getElementById('nav-tab'),
navtabHammer = navtabEle && new Hammer(navtabEle),
// consultFooterEle = $('.consult-content-footer')[0],
// consultFooterHammer = consultFooterEle && new Hammer(consultFooterEle),
gotoConsultEle = document.getElementById('goto-consult'),
gotoConsultHammer = gotoConsultEle && new Hammer(gotoConsultEle),
... ...
... ... @@ -2,6 +2,9 @@
.re-pos-search {
top: 170rem / $pxConvertRem !important;
}
.hide-when-loading {
display: none;
}
.genderNav {
display: block;
width: 100%;
... ...
... ... @@ -21,38 +21,40 @@
</a>
</div>
</div>
<div class="hide-when-loading">
{{# topData}}
{{! 头部banner}}
{{# bannerTop}}
{{> home/banner_top}}
{{/ bannerTop}}
{{# topData}}
{{! 头部banner}}
{{# bannerTop}}
{{> home/banner_top}}
{{/ bannerTop}}
{{! 热门品牌可滑动}}
{{# hotBrandsScroll}}
{{> home/hot_brands_swipe}}
{{/ hotBrandsScroll}}
{{/ topData}}
{{! 热门品牌可滑动}}
{{# hotBrandsScroll}}
{{> home/hot_brands_swipe}}
{{/ hotBrandsScroll}}
{{/ topData}}
{{# brandList}}
<div class="brand-list bar-{{@index}}">
<div class="title-bar">
<h2 style="position: static;">{{title}}</h2>
{{# brandList}}
<div class="brand-list bar-{{@index}}">
<div class="title-bar">
<h2 style="position: static;">{{title}}</h2>
</div>
{{# list}}
<p>
<a href="{{url}}">{{name}}
{{# isHot}}
<i class="icon-hot">HOT</i>
{{/ isHot}}
{{# isNew}}
<i class="icon-new">NEW</i>
{{/ isNew}}
</a>
</p>
{{/ list}}
</div>
{{# list}}
<p>
<a href="{{url}}">{{name}}
{{# isHot}}
<i class="icon-hot">HOT</i>
{{/ isHot}}
{{# isNew}}
<i class="icon-new">NEW</i>
{{/ isNew}}
</a>
</p>
{{/ list}}
{{/ brandList}}
</div>
{{/ brandList}}
{{/channel}}
{{> layout/footer}}
... ...
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-W958MG" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>
var _hmt = _hmt || [];
(function() {
var _hmt = _hmt || [];
function async_load(){
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
... ... @@ -32,7 +31,6 @@ var _hmt = _hmt || [];
})();
}
window.addEventListener('load', async_load, false);
})();
</script>
<script>
window._py = window._py||[];
... ...