Showing
4 changed files
with
47 additions
and
39 deletions
@@ -4942,7 +4942,14 @@ var $ = require("jquery"), | @@ -4942,7 +4942,14 @@ var $ = require("jquery"), | ||
4942 | var commentsNum,consultsNum; | 4942 | var commentsNum,consultsNum; |
4943 | 4943 | ||
4944 | var consultFooterEle = document.getElementById('consult-content-footer'), | 4944 | var consultFooterEle = document.getElementById('consult-content-footer'), |
4945 | - consultFooterHammer = consultFooterEle && new Hammer(consultFooterEle); | 4945 | + consultFooterHammer = consultFooterEle && new Hammer(consultFooterEle), |
4946 | + | ||
4947 | + navtabEle = document.getElementById('nav-tab'), | ||
4948 | + navtabHammer = navtabEle && new Hammer(navtabEle), | ||
4949 | + | ||
4950 | + gotoConsultEle = document.getElementById('goto-consult'), | ||
4951 | + gotoConsultHammer = gotoConsultEle && new Hammer(gotoConsultEle); | ||
4952 | + | ||
4946 | 4953 | ||
4947 | 4954 | ||
4948 | (function() { | 4955 | (function() { |
@@ -4968,32 +4975,41 @@ var consultFooterEle = document.getElementById('consult-content-footer'), | @@ -4968,32 +4975,41 @@ var consultFooterEle = document.getElementById('consult-content-footer'), | ||
4968 | 4975 | ||
4969 | })(); | 4976 | })(); |
4970 | 4977 | ||
4971 | -$('#nav-tab li').on('touchend', function() { | ||
4972 | - var index = $(this).index(); | 4978 | +if (navtabHammer) { |
4979 | + navtabHammer.on('tap', function(e) { | ||
4980 | + var $this = $(e.target).closest('li'); | ||
4981 | + var index = $this.index(); | ||
4973 | 4982 | ||
4974 | - if ($(this).hasClass('comment-nav') && 0 === commentsNum) { | ||
4975 | - tip.show('暂无商品评价'); | ||
4976 | - } else { | ||
4977 | - if (!$(this).hasClass('focus')) { | 4983 | + if ($this.hasClass('comment-nav') && 0 === commentsNum) { |
4984 | + tip.show('暂无商品评价'); | ||
4985 | + } else { | ||
4986 | + if (!$this.hasClass('focus')) { | ||
4978 | 4987 | ||
4979 | - $('#nav-tab li').each(function() { | ||
4980 | - $(this).removeClass('focus'); | ||
4981 | - }); | ||
4982 | - $('#feedback-content .content').each(function() { | ||
4983 | - $(this).addClass('hide'); | ||
4984 | - }); | 4988 | + $('#nav-tab li').each(function() { |
4989 | + $(this).removeClass('focus'); | ||
4990 | + }); | ||
4991 | + $('#feedback-content .content').each(function() { | ||
4992 | + $(this).addClass('hide'); | ||
4993 | + }); | ||
4985 | 4994 | ||
4986 | - $(this).addClass('focus'); | ||
4987 | - $('#feedback-content .content:eq(' + index + ')').removeClass('hide'); | 4995 | + $this.addClass('focus'); |
4996 | + $('#feedback-content .content:eq(' + index + ')').removeClass('hide'); | ||
4997 | + } | ||
4988 | } | 4998 | } |
4989 | - } | ||
4990 | -}); | 4999 | + }); |
5000 | +} | ||
4991 | 5001 | ||
4992 | if (consultFooterHammer) { | 5002 | if (consultFooterHammer) { |
4993 | consultFooterHammer.on('tap', function() { | 5003 | consultFooterHammer.on('tap', function() { |
4994 | location.href = $(consultFooterEle).find('a').attr('href'); | 5004 | location.href = $(consultFooterEle).find('a').attr('href'); |
4995 | }); | 5005 | }); |
4996 | } | 5006 | } |
5007 | + | ||
5008 | +if (gotoConsultHammer) { | ||
5009 | + gotoConsultHammer.on('tap', function() { | ||
5010 | + location.href = $(gotoConsultEle).find('a').attr('href'); | ||
5011 | + }); | ||
5012 | +} | ||
4997 | }); | 5013 | }); |
4998 | define("js/product/recommend-for-you-product-desc", ["swiper","jquery","index"], function(require, exports, module){ | 5014 | define("js/product/recommend-for-you-product-desc", ["swiper","jquery","index"], function(require, exports, module){ |
4999 | /** | 5015 | /** |
@@ -5370,7 +5386,7 @@ function getOrders(option) { | @@ -5370,7 +5386,7 @@ function getOrders(option) { | ||
5370 | page: order.page + 1 | 5386 | page: order.page + 1 |
5371 | }; | 5387 | }; |
5372 | 5388 | ||
5373 | - var show = option && option.showLoadingMask; | 5389 | + var show = option && !option.noLoadingMask; |
5374 | 5390 | ||
5375 | if (inAjax) { | 5391 | if (inAjax) { |
5376 | return; | 5392 | return; |
@@ -7121,12 +7137,9 @@ define("js/me/address", ["jquery"], function(require, exports, module){ | @@ -7121,12 +7137,9 @@ define("js/me/address", ["jquery"], function(require, exports, module){ | ||
7121 | 7137 | ||
7122 | var $ = require("jquery"), | 7138 | var $ = require("jquery"), |
7123 | tip = require("js/plugin/tip"), | 7139 | tip = require("js/plugin/tip"), |
7124 | - security = require("js/plugin/security"), | ||
7125 | loading = require("js/plugin/loading"); | 7140 | loading = require("js/plugin/loading"); |
7126 | 7141 | ||
7127 | var $action = $('.action'), | 7142 | var $action = $('.action'), |
7128 | - $addressForm = $('.edit-address'), | ||
7129 | - $submit = $('.submit'), | ||
7130 | $addAddress = $('.add-address'), | 7143 | $addAddress = $('.add-address'), |
7131 | $footer = $('#yoho-footer'), | 7144 | $footer = $('#yoho-footer'), |
7132 | $confim = $('.confim-mask'), | 7145 | $confim = $('.confim-mask'), |
@@ -7139,12 +7152,13 @@ $pageWrap.first().css('min-height', function() { | @@ -7139,12 +7152,13 @@ $pageWrap.first().css('min-height', function() { | ||
7139 | }); | 7152 | }); |
7140 | window.rePosFooter(); | 7153 | window.rePosFooter(); |
7141 | 7154 | ||
7142 | -$confim.on('touchend', '.cancel', function() { | 7155 | +$confim.on('touchend', '.cancel', function(e) { |
7143 | deleteId = null; | 7156 | deleteId = null; |
7144 | - $confim.hide(); | 7157 | + $confim.fadeOut(); |
7158 | + return false; | ||
7145 | }).on('touchend', '.confim', function() { | 7159 | }).on('touchend', '.confim', function() { |
7146 | loading.showLoadingMask(); | 7160 | loading.showLoadingMask(); |
7147 | - $confim.hide(); | 7161 | + $confim.fadeOut(); |
7148 | $.ajax({ | 7162 | $.ajax({ |
7149 | method: 'POST', | 7163 | method: 'POST', |
7150 | url: '/home/delAddress', | 7164 | url: '/home/delAddress', |
@@ -7167,6 +7181,7 @@ $confim.on('touchend', '.cancel', function() { | @@ -7167,6 +7181,7 @@ $confim.on('touchend', '.cancel', function() { | ||
7167 | }).always(function() { | 7181 | }).always(function() { |
7168 | deleteId = null; | 7182 | deleteId = null; |
7169 | }); | 7183 | }); |
7184 | + return false; | ||
7170 | }); | 7185 | }); |
7171 | 7186 | ||
7172 | 7187 | ||
@@ -7184,19 +7199,7 @@ $addAddress.on('touchend', function() { | @@ -7184,19 +7199,7 @@ $addAddress.on('touchend', function() { | ||
7184 | // 删除 | 7199 | // 删除 |
7185 | $action.on('touchend', '.del', function() { | 7200 | $action.on('touchend', '.del', function() { |
7186 | deleteId = $(this).data('id'); | 7201 | deleteId = $(this).data('id'); |
7187 | - $confim.show(); | ||
7188 | -}); | ||
7189 | - | ||
7190 | -$submit.on('touchend', function() { | ||
7191 | - if (security.hasDangerInput(false)) { | ||
7192 | - return false; | ||
7193 | - } | ||
7194 | - $addressForm.submit(); | ||
7195 | - return false; | ||
7196 | -}).on('touchstart', function() { | ||
7197 | - $(this).addClass('highlight'); | ||
7198 | -}).on('touchend touchcancel', function() { | ||
7199 | - $(this).removeClass('highlight'); | 7202 | + $confim.fadeIn(); |
7200 | }); | 7203 | }); |
7201 | 7204 | ||
7202 | }); | 7205 | }); |
@@ -7317,11 +7320,13 @@ $page.on('touchstart', '.del-icon', function() { | @@ -7317,11 +7320,13 @@ $page.on('touchstart', '.del-icon', function() { | ||
7317 | }); | 7320 | }); |
7318 | setTimeout(function() { | 7321 | setTimeout(function() { |
7319 | window.history.go(0); | 7322 | window.history.go(0); |
7320 | - }, 2500); | 7323 | + }, 1200); |
7321 | } | 7324 | } |
7322 | }, | 7325 | }, |
7323 | complete: function() { | 7326 | complete: function() { |
7324 | - dialog.hideDialog(); //隐藏dialog | 7327 | + setTimeout(function() { |
7328 | + dialog.hideDialog(); | ||
7329 | + }, 1500); | ||
7325 | } | 7330 | } |
7326 | }); | 7331 | }); |
7327 | }); | 7332 | }); |
@@ -7431,6 +7436,9 @@ $addressForm.on('submit', function() { | @@ -7431,6 +7436,9 @@ $addressForm.on('submit', function() { | ||
7431 | }); | 7436 | }); |
7432 | 7437 | ||
7433 | $submit.on('touchend', function() { | 7438 | $submit.on('touchend', function() { |
7439 | + if (security.hasDangerInput(false)) { | ||
7440 | + return false; | ||
7441 | + } | ||
7434 | $input.blur(); | 7442 | $input.blur(); |
7435 | $addressForm.submit(); | 7443 | $addressForm.submit(); |
7436 | return false; | 7444 | return false; |
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.
-
Please register or login to post a comment