Authored by yyq

gulp ge

... ... @@ -11664,7 +11664,6 @@ $('#me-checkall').click(function() {
//删除收藏
$('.del-favorite').click(function(e) {
var id = $(this).closest('.fav-row').data('id'),
shopid = $(this).closest('.fav-row').data('shopid'),
brandorshoptype = $(this).closest('.fav-row').data('brandorshoptype');
e.preventDefault();
... ... @@ -11674,9 +11673,7 @@ $('.del-favorite').click(function(e) {
url: '/home/favorite/cancel',
data: {
id: id,
shopid: shopid,
brandorshoptype: brandorshoptype,
type: favType
type: brandorshoptype || favType
}
}).then(function(data) {
if (data.code === 200) {
... ... @@ -11689,16 +11686,27 @@ $('.del-favorite').click(function(e) {
$('#me-del-checked').click(function() {
var ids = [],
name = '商品';
var optType, group = {};
if (favType === 'brand') {
name = '品牌';
name = '品牌店铺';
} else if (favType === 'article') {
name = '文章';
}
if (confirm('您确定要删除您收藏的' + name + '吗?')) {
$('.checkbox input[type="checkbox"]:checked').each(function() {
ids.push($(this).closest('.fav-row').data('id'));
var $favRow = $(this).closest('.fav-row'),
rdata = $favRow.data();
ids.push(rdata.id);
if (rdata.brandorshoptype) {
if (!group[rdata.brandorshoptype]) {
group[rdata.brandorshoptype] = [];
}
group[rdata.brandorshoptype].push(rdata.id);
}
});
if (ids.length === 0) {
... ... @@ -11711,6 +11719,10 @@ $('#me-del-checked').click(function() {
url: '/home/favorite/cancel',
data: {
id: ids.join(','),
group: {
bid: group.brand ? group.brand.join(',') : '',
sid: group.shop ? group.shop.join(',') : ''
},
type: favType
}
}).then(function(data) {
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.