...
|
...
|
@@ -2464,7 +2464,7 @@ exports.init = function(num) { |
|
|
|
|
|
$goodItemWrapper.mouseleave(function() {
|
|
|
|
|
|
removeHtmlFn();
|
|
|
// removeHtmlFn();
|
|
|
});
|
|
|
|
|
|
function removeHtmlFn() {
|
...
|
...
|
@@ -2485,15 +2485,19 @@ $(document).on('hover', '.good-select-color li', function() { |
|
|
});
|
|
|
|
|
|
$goodInfoMain.on('click', '.col-btn', function() {
|
|
|
var $this = $(this);
|
|
|
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/product/list/changeFavorite',
|
|
|
data: {
|
|
|
skn: $(this).closest('.good-info').data('skn'),
|
|
|
isFavorite: !$(this).hasClass('coled')
|
|
|
skn: $this.closest('.good-info').data('skn'),
|
|
|
isFavorite: !$this.hasClass('coled')
|
|
|
}
|
|
|
}).then(function(res) {
|
|
|
console.log(res);
|
|
|
if (res.code === 200) {
|
|
|
$this.toggleClass('coled');
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
...
|
...
|
|