...
|
...
|
@@ -4,12 +4,11 @@ |
|
|
|
|
|
var $ = require('yoho-jquery');
|
|
|
var dialog = require('../common/dialog');
|
|
|
var Dialog = dialog.Dialog;
|
|
|
var Alert = dialog.Alert;
|
|
|
var Confirm = dialog.Confirm;
|
|
|
var rDialog = require('./rdialog');
|
|
|
var RConfirm = rDialog.RConfirm;
|
|
|
var RAlert = rDialog.RAlert;
|
|
|
var Cart;
|
|
|
|
|
|
var $cartnewTips = $('.cartnew-tips'),
|
|
|
$payWapper = $('.pay-wapper'),
|
...
|
...
|
@@ -22,7 +21,7 @@ $cartnewTips.find('.btn_close').click(function() { |
|
|
});
|
|
|
|
|
|
// 滚动到第一个选中的商品
|
|
|
function scrollToFirst() {
|
|
|
/*function scrollToFirst() {
|
|
|
var $selected = $payWapper.find('li[data-role="pitem"] .cart-item-check.cart-item-checked:eq(0)');
|
|
|
var top = 0;
|
|
|
|
...
|
...
|
@@ -32,7 +31,7 @@ function scrollToFirst() { |
|
|
}
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
}*/
|
|
|
|
|
|
function toastNoStore(parent) {
|
|
|
|
...
|
...
|
@@ -45,10 +44,10 @@ function toastNoStore(parent) { |
|
|
}, 2000);
|
|
|
}
|
|
|
|
|
|
var Cart = {
|
|
|
addToCart: function(params) {
|
|
|
Cart = {
|
|
|
/* addToCart: function(params) {
|
|
|
|
|
|
},
|
|
|
},*/
|
|
|
toggleSelectOne: function() { // 单选
|
|
|
|
|
|
var $this = $(this);
|
...
|
...
|
@@ -143,6 +142,7 @@ var Cart = { |
|
|
|
|
|
var $chk = $(this);
|
|
|
var $item = $chk.closest('[data-role=pitem]');
|
|
|
|
|
|
if ($chk.hasClass('cart-item-checked')) {
|
|
|
|
|
|
if ($item.data('id')) {
|
...
|
...
|
@@ -240,6 +240,7 @@ var Cart = { |
|
|
|
|
|
var $item = $(this);
|
|
|
var $chk = $item.find('.cart-item-check');
|
|
|
|
|
|
if ($chk.hasClass('cart-item-checked')) {
|
|
|
|
|
|
if ($item.data('id')) {
|
...
|
...
|
@@ -301,9 +302,13 @@ var Cart = { |
|
|
|
|
|
if ($('[data-role="gift-sel-btn"]').length) {
|
|
|
alert('还有赠品未领取!');
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
capi.showMDialog('#Y_CartSelectDialog');
|
|
|
|
|
|
// $('.cart-preSell-dialog').show();
|
|
|
|
|
|
// $('.cart-togetherGoods').show();
|
...
|
...
|
|