Authored by biao

resolve conflict

... ... @@ -69,6 +69,8 @@ lazyLoad($('img.lazy'));
if ('advance' === cartType) {
$cartContent.toggleClass('hide');
$('presell-cart-nav').addClass('active');
$('common-cart-nav').removeClass('active');
}
if ($('.cart-nav').length > 0) {
... ... @@ -82,8 +84,10 @@ if ($('.cart-nav').length > 0) {
if (cartType === 'ordinary') {
cartType = 'advance';
$('#cartType').val('advance');
} else {
cartType = 'ordinary';
$('#cartType').val('ordinary');
}
$this.siblings('.active').removeClass('active');
... ...
... ... @@ -14,7 +14,6 @@ var dialog = require('../me/dialog'),
orderInfo = require('./order-info').orderInfo;
var $selectAllBtn = $('.balance .checkbox'),
cartType = $('#cartType').val(),
requesting = false;
ellipsis.init();
... ... @@ -48,7 +47,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
return false;
}
goodInfo.goods_type = cartType;
goodInfo.goods_type = $('#cartType').val();
goodInfo.selected = $this.hasClass('icon-cb-checked') ? 'N' : 'Y';
goodInfo.product_sku = id;
goodInfo.buy_number = $good.find('.count').eq(0).text().trim().replace('×', '');
... ... @@ -67,7 +66,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
} else {
$this.removeClass('icon-checkbox').addClass('icon-cb-checked');
}
window.history.go(0);
window.location.href = '/cart/index/index?cartType=' + $('#cartType').val();
} else if (data.code === 400) {
tip.show('网络异常');
}
... ... @@ -191,7 +190,7 @@ function bottomCheckBoxHandeler(isSelected, type, handlerAfterTouch) {
//全选按钮点击事件
$selectAllBtn.on('touchend', function() {
bottomCheckBoxHandeler($(this).hasClass('icon-cb-checked'), cartType, didUpdateAllGoodsCheckStatus);
bottomCheckBoxHandeler($(this).hasClass('icon-cb-checked'), $('#cartType').val(), didUpdateAllGoodsCheckStatus);
});
$('.down').on('touchend', function() {
... ...
... ... @@ -97,12 +97,6 @@ function orderCompute() {
if ($.type(res) !== 'object') {
window.location.reload();
} else {
/*if (res.order_amount) {
res.order_amount = (+res.order_amount).toFixed(2);
}
if (res.discount_amount) {
res.discount_amount = (+res.discount_amount).toFixed(2);
}*/
if (res.last_order_amount) {
res.last_order_amount = (+res.last_order_amount).toFixed(2);
}
... ... @@ -128,6 +122,10 @@ function submitOrder() {
var invoiceText = $invoice.find('[name="invoice-title"]').val() || orderInfo('invoiceText'),
msg = $('#msg').find('input').val() || orderInfo('msg');
if (orderInfo('deliveryId') === 2 && !$addressWrap.data('support')) {
tip.show('当前地址不支持顺丰快递');
return;
}
if (isSubmiting) {
return false;
}
... ...
... ... @@ -3,7 +3,8 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/21
*/
var $ = require('jquery');
var $ = require('jquery'),
Hammer = require('yoho.hammer');
var $footer = $('#yoho-footer'),
$yohoPage = $('.yoho-page'),
... ... @@ -131,6 +132,8 @@ function reMarginFooter(fixedElement) {
var user = getUser();
var backToTopHammer;
rePosFooter(); //计算底部位置
if (user === 0) {
... ... @@ -151,10 +154,15 @@ function reMarginFooter(fixedElement) {
);
}
$op.find('.back-to-top').on('touchend', function() {
$(window).scrollTop(0);
return false;
});
if ($op.find('.back-to-top').length > 0) {
backToTopHammer = new Hammer($op.find('.back-to-top')[0]);
backToTopHammer.on('tap', function(e) {
$(window).scrollTop(0);
e.srcEvent.preventDefault();
return false;
});
}
$footer.removeClass('hide');
}());
... ...
... ... @@ -15,7 +15,7 @@ function downLoadApp() {
var appUrl = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445';
var clickedAt = new Date();
setTimeout(function () {
setTimeout(function() {
if ((new Date()) - clickedAt < 2000) {
window.location = appUrl;
}
... ...
... ... @@ -19,6 +19,9 @@ $.ajax({
if (count > 99) {
count = '99+';
}
if (count === 0) {
$('.cart-count').remove();
}
$cart.find('.cart-count').html(count).removeClass('hide');
}
}
... ...
... ... @@ -32,4 +32,10 @@
}
}
}
}
.deal_main{
margin: .5rem 3%;
font-size:1.2em;
widows: 94%;
overflow: hidden;
}
\ No newline at end of file
... ...
... ... @@ -20,12 +20,12 @@
{{#if cartNav}}
<ul class="cart-nav clearfix">
<li class="active">
<span>
<span id="common-cart-nav">
普通商品({{commonGoodsCount}})
</span>
</li>
<li>
<span>
<span id="presell-cart-nav">
预售商品({{presellGoodsCount}})
</span>
<div id="presell-tip" class="presell-tip">
... ...
... ... @@ -46,6 +46,9 @@
{{#if isAdvanceBuy}}
<span class="sale-price">¥{{salesPrice}}</span>
{{/if}}
{{#if isGift}}
<span class="sale-price">¥{{salesPrice}}</span>
{{/if}}
</p>
{{#if isVipPrice}}
<span class="vip">
... ...
... ... @@ -346,7 +346,8 @@ class CartModel
$result['phoneNum'] = isset($address['mobile']) ? $address['mobile'] : $payReturn['delivery_address']['mobile'];
$result['area'] = isset($address['area']) ? $address['area'] : $payReturn['delivery_address']['area'];
$result['address'] = isset($address['address']) ? $address['address'] : $payReturn['delivery_address']['address'];
$result['isSupport'] = ($payReturn['delivery_address']['is_support'] === 'Y');
$isSupport = isset($address['is_support']) ? $address['is_support'] : $payReturn['delivery_address']['is_support'];
$result['isSupport'] = $isSupport === 'Y';
}
// 配送方式
... ...