Showing
8 changed files
with
13 additions
and
38 deletions
@@ -8276,8 +8276,7 @@ define("js/me/index", ["jquery","swiper","index"], function(require, exports, mo | @@ -8276,8 +8276,7 @@ define("js/me/index", ["jquery","swiper","index"], function(require, exports, mo | ||
8276 | * @author: bikai<kai.bi@yoho.cn> | 8276 | * @author: bikai<kai.bi@yoho.cn> |
8277 | * @date: 2015/11/12 | 8277 | * @date: 2015/11/12 |
8278 | */ | 8278 | */ |
8279 | -var $ = require("jquery"), | ||
8280 | - noticeScroll = require("js/plugin/notice-scroll"); | 8279 | +var $ = require("jquery"); |
8281 | var $userAvatar = $('.user-avatar'), | 8280 | var $userAvatar = $('.user-avatar'), |
8282 | $listItem = $('.list-item'); | 8281 | $listItem = $('.list-item'); |
8283 | var myImage = new Image(), | 8282 | var myImage = new Image(), |
@@ -8293,8 +8292,6 @@ myImage.onload = function() { | @@ -8293,8 +8292,6 @@ myImage.onload = function() { | ||
8293 | $userAvatar.css('background-image', 'url(' + avatar + ')'); | 8292 | $userAvatar.css('background-image', 'url(' + avatar + ')'); |
8294 | }; | 8293 | }; |
8295 | 8294 | ||
8296 | -noticeScroll('.notice'); | ||
8297 | - | ||
8298 | $('.yoho-page').on('touchstart', '.list-item, .type-item, .order-title', function() { | 8295 | $('.yoho-page').on('touchstart', '.list-item, .type-item, .order-title', function() { |
8299 | $listItem.removeClass('highlight'); | 8296 | $listItem.removeClass('highlight'); |
8300 | $(this).addClass('highlight'); | 8297 | $(this).addClass('highlight'); |
@@ -8303,38 +8300,6 @@ $('.yoho-page').on('touchstart', '.list-item, .type-item, .order-title', functio | @@ -8303,38 +8300,6 @@ $('.yoho-page').on('touchstart', '.list-item, .type-item, .order-title', functio | ||
8303 | }); | 8300 | }); |
8304 | 8301 | ||
8305 | }); | 8302 | }); |
8306 | -define("js/plugin/notice-scroll", ["jquery"], function(require, exports, module){ | ||
8307 | -/** | ||
8308 | - * 公告栏目滚动 | ||
8309 | - * bikai kai.bi@yoho.cn | ||
8310 | - */ | ||
8311 | - | ||
8312 | -var $ = require("jquery"); | ||
8313 | - | ||
8314 | -function noticeScroll(selecter, time) { | ||
8315 | - var $notice = $(selecter), | ||
8316 | - $noticeItem = $notice.find('.notice-item'), | ||
8317 | - count = $noticeItem.length, | ||
8318 | - i = 1; | ||
8319 | - | ||
8320 | - selecter = selecter || '.notice'; | ||
8321 | - time = time || 3000; | ||
8322 | - | ||
8323 | - if (count > 1) { | ||
8324 | - setInterval(function() { | ||
8325 | - if (i >= count) { | ||
8326 | - i = 0; | ||
8327 | - } | ||
8328 | - $noticeItem.fadeOut(); | ||
8329 | - $notice.find('.item-' + i).fadeIn(); | ||
8330 | - i++; | ||
8331 | - }, time); | ||
8332 | - } | ||
8333 | -} | ||
8334 | - | ||
8335 | -module.exports = noticeScroll; | ||
8336 | - | ||
8337 | -}); | ||
8338 | define("js/product/recommend-for-you", ["swiper","jquery","index"], function(require, exports, module){ | 8303 | define("js/product/recommend-for-you", ["swiper","jquery","index"], function(require, exports, module){ |
8339 | /** | 8304 | /** |
8340 | * 为您优选 | 8305 | * 为您优选 |
@@ -9385,8 +9350,8 @@ $('.btn-balance').on('touchend', function() { | @@ -9385,8 +9350,8 @@ $('.btn-balance').on('touchend', function() { | ||
9385 | } | 9350 | } |
9386 | }); | 9351 | }); |
9387 | 9352 | ||
9388 | -$('.off-shell-goods .shopping-cart-good').on('touchend', function() { | ||
9389 | - tip.show('商品已下架'); | 9353 | +$('.off-shell-goods').on('touchstart touchend', function() { |
9354 | + return false; | ||
9390 | }); | 9355 | }); |
9391 | 9356 | ||
9392 | $('.chose').on('touchend', function() { | 9357 | $('.chose').on('touchend', function() { |
@@ -9533,6 +9498,11 @@ $('.icon-edit').on('touchstart', function(e) { | @@ -9533,6 +9498,11 @@ $('.icon-edit').on('touchstart', function(e) { | ||
9533 | count, | 9498 | count, |
9534 | canEditNum; | 9499 | canEditNum; |
9535 | 9500 | ||
9501 | + if ($this.parents('.off-shell-goods').length) { | ||
9502 | + tip.show('商品已下架'); | ||
9503 | + return false; | ||
9504 | + } | ||
9505 | + | ||
9536 | //如果点击的是上次编辑的商品,直接显示chose-pannel | 9506 | //如果点击的是上次编辑的商品,直接显示chose-pannel |
9537 | if (skn === previousEditSkn) { | 9507 | if (skn === previousEditSkn) { |
9538 | chosePanel.show(); | 9508 | chosePanel.show(); |
@@ -9578,6 +9548,11 @@ $('.icon-edit').on('touchstart', function(e) { | @@ -9578,6 +9548,11 @@ $('.icon-edit').on('touchstart', function(e) { | ||
9578 | $('.icon-del').on('touchstart', function(e) { | 9548 | $('.icon-del').on('touchstart', function(e) { |
9579 | var $this = $(this); | 9549 | var $this = $(this); |
9580 | 9550 | ||
9551 | + if ($this.parents('.off-shell-goods').length) { | ||
9552 | + tip.show('商品已下架'); | ||
9553 | + return false; | ||
9554 | + } | ||
9555 | + | ||
9581 | e.stopPropagation(); | 9556 | e.stopPropagation(); |
9582 | 9557 | ||
9583 | dialog.showDialog({ | 9558 | dialog.showDialog({ |
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.
This diff could not be displayed because it is too large.
4.12 KB
2.07 KB
612 Bytes
-
Please register or login to post a comment