...
|
...
|
@@ -3,7 +3,8 @@ |
|
|
* @author: jiangfeng<jeff.jiang@yoho.cn>
|
|
|
* @date: 16/7/20
|
|
|
*/
|
|
|
|
|
|
var dialog = require('../plugins/dialog');
|
|
|
var _confirm = dialog.Confirm;
|
|
|
|
|
|
var FavoriteBrand = {
|
|
|
init: function() {
|
...
|
...
|
@@ -66,6 +67,12 @@ var FavoriteBrand = { |
|
|
FavoriteBrand.doCancelMulti(shopId.join(','), brandId.join(','));
|
|
|
});
|
|
|
},
|
|
|
_showConfirm: function(cb) {
|
|
|
new _confirm({
|
|
|
content: '<h1 class="title">确认删除</h1><p>您确定要删除该收藏么?</p>',
|
|
|
cb: cb
|
|
|
}).show();
|
|
|
},
|
|
|
moveSlide: function(ele) {
|
|
|
var wrap = $(ele).parent().next('.slide-wrap');
|
|
|
var currLi = $('ul li.show', wrap);
|
...
|
...
|
@@ -79,6 +86,7 @@ var FavoriteBrand = { |
|
|
}
|
|
|
},
|
|
|
doCancel: function(ids, type) {
|
|
|
this._showConfirm(function() {
|
|
|
$.post('/me/collection/cancel', {
|
|
|
type: type || 'brand',
|
|
|
ids: ids
|
...
|
...
|
@@ -87,8 +95,10 @@ var FavoriteBrand = { |
|
|
location.href = '/me/collection/brand';
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
doCancelMulti: function(shops, brands) {
|
|
|
this._showConfirm(function() {
|
|
|
$.post('/me/collection/cancel/multi', {
|
|
|
shops: shops,
|
|
|
brands: brands
|
...
|
...
|
@@ -97,6 +107,7 @@ var FavoriteBrand = { |
|
|
location.href = '/me/collection/brand';
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
|
...
|
...
|
|