Authored by Rock Zhang

更新到201602021703静态资源

... ... @@ -1909,6 +1909,8 @@ module.exports = function(specificGender) {
index,
$navList = $('#maybe-like-nav');
var $footer;
//ajax url
if (kidsType) {
url = '/product/recom/maylikekids';
... ... @@ -1972,15 +1974,11 @@ module.exports = function(specificGender) {
page: page + 1
},
success: function(data) {
if (data === ' ') {
searching = false;
loading.hideLoadingMask();
//修复有货币页面最后一条数据显示被遮挡的问题
if (specificGender) {
window.rePosFooter();
}
// 有货币页面不加载底部
if (gender && !specificGender) {
if (gender === '1,3') {
... ... @@ -2006,6 +2004,12 @@ module.exports = function(specificGender) {
return;
}
//加载到数据后,去除bottom样式,使得footer能够随着页面长度的增加改变位置
if (data.length > 1) {
$footer ? null : $footer = $('#yoho-footer');
$footer.hasClass('bottom') ? $footer.removeClass('bottom') : null;
}
num = $goodList.find('.good-info').length;
$goodList.append(data);
... ... @@ -5511,6 +5515,17 @@ function checkColorSizeNum() {
return true;
}
//禁用数字编辑
function disableNumEdit() {
var $numBtn = $('.chose-panel').find('.num .btn>.iconfont');
//添加disabled样式
$numBtn.hasClass('disabled') ? null : $numBtn.addClass('disabled');
$yohoPage.off('touchstart', '.btn-minus');
$yohoPage.off('touchstart', '.btn-plus');
}
function show(html, cb) {
var scrollPosition = [
... ... @@ -5528,8 +5543,7 @@ function show(html, cb) {
if (html) {
$chosePanel.html(html);
if ($('#promotionId').val() !== '') {
$yohoPage.off('touchstart', '.btn-minus');
$yohoPage.off('touchstart', '.btn-plus');
disableNumEdit();
}
init();
}
... ... @@ -5908,6 +5922,7 @@ exports.init = init;
exports.show = show;
exports.remove = removePannel;
exports.setEditModeWithSknId = setEditModeWithSknId;
exports.disableNumEdit = disableNumEdit;
});
... ... @@ -9240,6 +9255,9 @@ var dialog = require("js/me/dialog"),
var $selectAllBtn = $('.balance .checkbox'),
requesting = false;
//上次编辑的商品skn
var previousEditSkn;
ellipsis.init();
lazyLoad({
... ... @@ -9310,11 +9328,12 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
*
* @param {Bool} isSelected. 所要编辑的商品是否被选中
*
* @return false;
* @param {Bool} isEditNum. 所要编辑的商品是否被选中
*
* @return false or undefined
*
*/
function showEditPannelWithSku(html, id, isSelected) {
function showEditPannelWithSku(html, id, isSelected, isEditNum) {
if (html.length < 2) {
tip.show('出错啦!');
return false;
... ... @@ -9324,21 +9343,47 @@ function showEditPannelWithSku(html, id, isSelected) {
chosePanel.remove();
$(html).appendTo('#mainCart');
chosePanel.init();
chosePanel.setEditModeWithSknId(id, isSelected);
chosePanel.show();
return false;
if (!isEditNum) {
chosePanel.disableNumEdit();
}
chosePanel.show();
}
$('.icon-edit').on('touchstart', function(e) {
var $this = $(this),
$checkBox = $this.closest('.info').siblings('.checkbox');
skn = $this.closest('.shopping-cart-good').data('skn');
var $checkBox,
$tag;
var id,
count,
canEditNum;
//如果点击的是上次编辑的商品,直接显示chose-pannel
if (skn === previousEditSkn) {
chosePanel.show();
return;
}
previousEditSkn = skn;
$checkBox = $this.closest('.info').siblings('.checkbox');
$tag = $this.closest('.deps').siblings('.few-tag');
id = $this.closest('.shopping-cart-good').data('id');
count = $this.data('count');
var skn = $this.closest('.shopping-cart-good').data('skn'),
id = $this.closest('.shopping-cart-good').data('id'),
count = $this.data('count');
//加价购或者赠品不能编辑数量
canEditNum = $tag.hasClass('gift-tag') || $tag.hasClass('plus-tag') ? false : true;
e.stopPropagation();
... ... @@ -9352,7 +9397,7 @@ $('.icon-edit').on('touchstart', function(e) {
buy_num: count
},
success: function(res) {
showEditPannelWithSku(res, id, $checkBox.hasClass('icon-cb-checked'));
showEditPannelWithSku(res, id, $checkBox.hasClass('icon-cb-checked'), canEditNum);
},
error: function() {
tip.show('网络异常');
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.