Authored by 梁志锋

收藏浏览记录的失效商品点击效果

@@ -217,6 +217,12 @@ $('.btn-balance').on('touchend', function() { @@ -217,6 +217,12 @@ $('.btn-balance').on('touchend', function() {
217 }); 217 });
218 218
219 $('.off-shell-goods').on('touchstart touchend', function() { 219 $('.off-shell-goods').on('touchstart touchend', function() {
  220 + var $this = $(e.target).closest('span');
  221 +
  222 + if ($this.hasClass('icon-del')) {
  223 + return;
  224 + }
  225 +
220 tip.show('商品已下架'); 226 tip.show('商品已下架');
221 return false; 227 return false;
222 }); 228 });
@@ -178,11 +178,6 @@ $('.icon-edit').on('touchstart', function(e) { @@ -178,11 +178,6 @@ $('.icon-edit').on('touchstart', function(e) {
178 $('.icon-del').on('touchstart', function(e) { 178 $('.icon-del').on('touchstart', function(e) {
179 var $this = $(this); 179 var $this = $(this);
180 180
181 - if ($this.parents('.off-shell-goods').length) {  
182 - tip.show('商品已下架');  
183 - return false;  
184 - }  
185 -  
186 e.stopPropagation(); 181 e.stopPropagation();
187 182
188 dialog.showDialog({ 183 dialog.showDialog({
@@ -55,7 +55,7 @@ $overlay.on('touchstart', function() { @@ -55,7 +55,7 @@ $overlay.on('touchstart', function() {
55 return false; 55 return false;
56 }); 56 });
57 57
58 -$sideNav.on('touchmove', function() { 58 +$sideNav.on('touchmove scroll', function() {
59 return false; 59 return false;
60 }); 60 });
61 61
@@ -6,8 +6,9 @@ @@ -6,8 +6,9 @@
6 6
7 var $ = require('jquery'); 7 var $ = require('jquery');
8 8
9 -var lazyLoad = require('yoho.lazyload');  
10 -var load = require('../plugin/loading'); 9 +var lazyLoad = require('yoho.lazyload'),
  10 + load = require('../plugin/loading'),
  11 + tip = require('../plugin/tip');
11 12
12 var dialog = require('./dialog'); 13 var dialog = require('./dialog');
13 14
@@ -126,3 +127,13 @@ $('.deps').on('touchstart', 'span', function() { @@ -126,3 +127,13 @@ $('.deps').on('touchstart', 'span', function() {
126 }).on('touchend touchcancel', 'span', function() { 127 }).on('touchend touchcancel', 'span', function() {
127 $(this).css('background', 'transparent'); 128 $(this).css('background', 'transparent');
128 }); 129 });
  130 +
  131 +$('.invalidGoods').on('touchstart touchend', function() {
  132 + var $this = $(e.target).closest('span');
  133 +
  134 + if ($this.hasClass('del-icon')) {
  135 + return;
  136 + }
  137 + tip.show('商品已下架');
  138 + return false;
  139 +});
@@ -256,3 +256,13 @@ $(document).on('touchend', '.swiper-header', function() { @@ -256,3 +256,13 @@ $(document).on('touchend', '.swiper-header', function() {
256 window.location.href = url; 256 window.location.href = url;
257 } 257 }
258 }); 258 });
  259 +
  260 +$('.invalidGoods').on('touchstart touchend', function() {
  261 + var $this = $(e.target).closest('span');
  262 +
  263 + if ($this.hasClass('del-fav')) {
  264 + return;
  265 + }
  266 + tip.show('商品已下架');
  267 + return false;
  268 +});