|
@@ -2213,24 +2213,12 @@ var $searchBox = $('.search-box'), |
|
@@ -2213,24 +2213,12 @@ var $searchBox = $('.search-box'), |
2213
|
$box = $('.box'),
|
2213
|
$box = $('.box'),
|
2214
|
$indexSearch = $('.index-search'),
|
2214
|
$indexSearch = $('.index-search'),
|
2215
|
$indexLogo = $('.index-logo'),
|
2215
|
$indexLogo = $('.index-logo'),
|
2216
|
- $channelLink = $('.index-channel a'),
|
|
|
2217
|
- $win = $(window),
|
|
|
2218
|
- $doc = $(document),
|
|
|
2219
|
- $appFloatLayer = $('#float-layer-app');
|
2216
|
+ $channelLink = $('.index-channel a');
|
2220
|
|
2217
|
|
2221
|
var $search = $searchBox.children('input[type="text"]'),
|
2218
|
var $search = $searchBox.children('input[type="text"]'),
|
2222
|
$cancelSearch = $box.children('.no-search'),
|
2219
|
$cancelSearch = $box.children('.no-search'),
|
2223
|
$searchIcon = $searchBox.children('.search-icon');
|
2220
|
$searchIcon = $searchBox.children('.search-icon');
|
2224
|
|
2221
|
|
2225
|
-// variables for calculate the app download layer position
|
|
|
2226
|
-var layerInit = false,
|
|
|
2227
|
- windowViewHeight = 0,
|
|
|
2228
|
- layerContentHeight = $appFloatLayer.height(),
|
|
|
2229
|
- layerPaddingTop = parseInt($appFloatLayer.css('padding-top')),
|
|
|
2230
|
- layerPaddingBottom = parseInt($appFloatLayer.css('padding-bottom')),
|
|
|
2231
|
- layerHeight = layerContentHeight + layerPaddingTop + layerPaddingBottom,
|
|
|
2232
|
- layerNewPos;
|
|
|
2233
|
-
|
|
|
2234
|
require("js/common");
|
2222
|
require("js/common");
|
2235
|
|
2223
|
|
2236
|
$search.on('focus', function() {
|
2224
|
$search.on('focus', function() {
|
|
@@ -2262,6 +2250,15 @@ $searchBox.children('.search-icon').on('touchstart', function() { |
|
@@ -2262,6 +2250,15 @@ $searchBox.children('.search-icon').on('touchstart', function() { |
2262
|
$indexSearch.submit();
|
2250
|
$indexSearch.submit();
|
2263
|
});
|
2251
|
});
|
2264
|
|
2252
|
|
|
|
2253
|
+$searchBox.keyup(function(e) {
|
|
|
2254
|
+ if (e.keyCode === 13) {
|
|
|
2255
|
+ if (security.hasDangerInput()) {
|
|
|
2256
|
+ return false;
|
|
|
2257
|
+ }
|
|
|
2258
|
+ $indexSearch.submit();
|
|
|
2259
|
+ }
|
|
|
2260
|
+});
|
|
|
2261
|
+
|
2265
|
$('.index-channel img').on('load error', function() {
|
2262
|
$('.index-channel img').on('load error', function() {
|
2266
|
window.rePosFooter && window.rePosFooter();
|
2263
|
window.rePosFooter && window.rePosFooter();
|
2267
|
});
|
2264
|
});
|
|
@@ -2285,43 +2282,6 @@ $channelLink.on('touchstart', function() { |
|
@@ -2285,43 +2282,6 @@ $channelLink.on('touchstart', function() { |
2285
|
});
|
2282
|
});
|
2286
|
});
|
2283
|
});
|
2287
|
|
2284
|
|
2288
|
-
|
|
|
2289
|
-function updateLayerPosition() {
|
|
|
2290
|
- var winHeight = window.innerHeight,
|
|
|
2291
|
- bodyHeight = $doc.height(),
|
|
|
2292
|
- scrollTopPosition = $win.scrollTop();
|
|
|
2293
|
-
|
|
|
2294
|
- if (layerInit) {
|
|
|
2295
|
-
|
|
|
2296
|
- //keyboard is shown
|
|
|
2297
|
- if (windowViewHeight - winHeight > 200) {
|
|
|
2298
|
- if (scrollTopPosition + windowViewHeight + layerHeight >= bodyHeight) {
|
|
|
2299
|
- layerNewPos = 0;
|
|
|
2300
|
- } else {
|
|
|
2301
|
- layerNewPos = bodyHeight - windowViewHeight - scrollTopPosition - layerHeight;
|
|
|
2302
|
- }
|
|
|
2303
|
- } else {
|
|
|
2304
|
- layerNewPos = bodyHeight - winHeight - scrollTopPosition;
|
|
|
2305
|
- }
|
|
|
2306
|
-
|
|
|
2307
|
- } else {
|
|
|
2308
|
- windowViewHeight = winHeight;
|
|
|
2309
|
- layerNewPos = bodyHeight - winHeight - scrollTopPosition + layerHeight;
|
|
|
2310
|
- layerInit = true;
|
|
|
2311
|
- }
|
|
|
2312
|
-
|
|
|
2313
|
- $appFloatLayer.css({
|
|
|
2314
|
- position: 'relative',
|
|
|
2315
|
- bottom: layerNewPos + 'px'
|
|
|
2316
|
- });
|
|
|
2317
|
-}
|
|
|
2318
|
-
|
|
|
2319
|
-$(window).scroll(function() {
|
|
|
2320
|
- window.requestAnimationFrame(updateLayerPosition);
|
|
|
2321
|
-});
|
|
|
2322
|
-
|
|
|
2323
|
-$doc.on('ready', updateLayerPosition);
|
|
|
2324
|
-
|
|
|
2325
|
});
|
2285
|
});
|
2326
|
define("js/passport/entry", ["jquery"], function(require, exports, module){
|
2286
|
define("js/passport/entry", ["jquery"], function(require, exports, module){
|
2327
|
/**
|
2287
|
/**
|
|
@@ -4879,6 +4839,8 @@ function search() { |
|
@@ -4879,6 +4839,8 @@ function search() { |
4879
|
$productDesc = $('#productDesc');
|
4839
|
$productDesc = $('#productDesc');
|
4880
|
$productDesc.append(data);
|
4840
|
$productDesc.append(data);
|
4881
|
|
4841
|
|
|
|
4842
|
+ window.rePosFooter();
|
|
|
4843
|
+
|
4882
|
lazyLoad($productDesc.find('img.lazy'));
|
4844
|
lazyLoad($productDesc.find('img.lazy'));
|
4883
|
|
4845
|
|
4884
|
//尺码信息左右滑动
|
4846
|
//尺码信息左右滑动
|
|
@@ -5034,6 +4996,9 @@ if (preferenceUrl) { |
|
@@ -5034,6 +4996,9 @@ if (preferenceUrl) { |
5034
|
watchSlidesVisibility: true
|
4996
|
watchSlidesVisibility: true
|
5035
|
});
|
4997
|
});
|
5036
|
}
|
4998
|
}
|
|
|
4999
|
+
|
|
|
5000
|
+ window.rePosFooter();
|
|
|
5001
|
+
|
5037
|
}).fail(function() {
|
5002
|
}).fail(function() {
|
5038
|
$recommendForYou.hide();
|
5003
|
$recommendForYou.hide();
|
5039
|
});
|
5004
|
});
|
|
@@ -5719,7 +5684,6 @@ var diaLog = require("js/me/dialog"); |
|
@@ -5719,7 +5684,6 @@ var diaLog = require("js/me/dialog"); |
5719
|
|
5684
|
|
5720
|
var $navLi = $('#fav-tab > li'),
|
5685
|
var $navLi = $('#fav-tab > li'),
|
5721
|
$favContainer = $('.fav-content > .fav-type'),
|
5686
|
$favContainer = $('.fav-content > .fav-type'),
|
5722
|
- $swiperList = '',
|
|
|
5723
|
swiperObj = {},
|
5687
|
swiperObj = {},
|
5724
|
favTabHammer,
|
5688
|
favTabHammer,
|
5725
|
favContentHammer,
|
5689
|
favContentHammer,
|
|
@@ -5744,22 +5708,30 @@ function showFavTab(index) { |
|
@@ -5744,22 +5708,30 @@ function showFavTab(index) { |
5744
|
}
|
5708
|
}
|
5745
|
|
5709
|
|
5746
|
//初始化swiper
|
5710
|
//初始化swiper
|
5747
|
-function initSwiper() {
|
5711
|
+function initSwiper(data) {
|
5748
|
var i,
|
5712
|
var i,
|
5749
|
- id;
|
5713
|
+ idStrReg = /container-(\d+)['"]{1}/gi,
|
|
|
5714
|
+ idReg = /\d+/,
|
|
|
5715
|
+ idArr = data.match(idStrReg),
|
|
|
5716
|
+ idArrLen = idArr.length,
|
|
|
5717
|
+ containerId;
|
5750
|
|
5718
|
|
5751
|
- $swiperList = $('.swiper-container');
|
|
|
5752
|
- for (i = 0; i < $swiperList.length; i++) {
|
|
|
5753
|
- id = $swiperList.eq(i).attr('data-id');
|
5719
|
+ //$swiperList = $('.swiper-container');
|
|
|
5720
|
+ for (i = 0; i < idArrLen; i++) {
|
|
|
5721
|
+
|
|
|
5722
|
+ /*id = $swiperList.eq(i).attr('data-id');
|
5754
|
|
5723
|
|
5755
|
if (!!swiperObj[id]) {
|
5724
|
if (!!swiperObj[id]) {
|
5756
|
swiperObj[id].destroy(true, true);
|
5725
|
swiperObj[id].destroy(true, true);
|
5757
|
- }
|
|
|
5758
|
- swiperObj[id] = new Swiper('#swiper-container-' + id, {
|
5726
|
+ }*/
|
|
|
5727
|
+
|
|
|
5728
|
+ containerId = idArr[i].match(idReg)[0];
|
|
|
5729
|
+
|
|
|
5730
|
+ swiperObj[containerId] = new Swiper('#swiper-container-' + containerId, {
|
5759
|
slidesPerView: 'auto',
|
5731
|
slidesPerView: 'auto',
|
5760
|
grabCursor: true,
|
5732
|
grabCursor: true,
|
5761
|
slideElement: 'li',
|
5733
|
slideElement: 'li',
|
5762
|
- wrapperClass: 'swiper-wrapper-' + id,
|
5734
|
+ wrapperClass: 'swiper-wrapper-' + containerId,
|
5763
|
lazyLoading: true,
|
5735
|
lazyLoading: true,
|
5764
|
watchSlidesVisibility: true
|
5736
|
watchSlidesVisibility: true
|
5765
|
});
|
5737
|
});
|
|
@@ -5800,7 +5772,7 @@ function loadData($parent, url, page) { |
|
@@ -5800,7 +5772,7 @@ function loadData($parent, url, page) { |
5800
|
$parent.append(data);
|
5772
|
$parent.append(data);
|
5801
|
$parent.closest('.fav-type').find('.fav-content-loading').remove();
|
5773
|
$parent.closest('.fav-type').find('.fav-content-loading').remove();
|
5802
|
if (url === 'favBrand') {
|
5774
|
if (url === 'favBrand') {
|
5803
|
- initSwiper();//如果是收藏品牌需要初始化swiper
|
5775
|
+ initSwiper(data);//如果是收藏品牌需要初始化swiper
|
5804
|
|
5776
|
|
5805
|
brandLockId = false;//请求成功后解锁品牌收藏page++
|
5777
|
brandLockId = false;//请求成功后解锁品牌收藏page++
|
5806
|
} else {
|
5778
|
} else {
|
|
@@ -5990,7 +5962,7 @@ $('#upload-img').uploadifive({ |
|
@@ -5990,7 +5962,7 @@ $('#upload-img').uploadifive({ |
5990
|
fileType: 'image*/*',
|
5962
|
fileType: 'image*/*',
|
5991
|
uploadScript: '/home/suggestimgUpload',
|
5963
|
uploadScript: '/home/suggestimgUpload',
|
5992
|
fileObjName: 'fileData',
|
5964
|
fileObjName: 'fileData',
|
5993
|
- fileSizeLimit: 1024,
|
5965
|
+ fileSizeLimit: 300,
|
5994
|
height: '100%',
|
5966
|
height: '100%',
|
5995
|
width: '100%',
|
5967
|
width: '100%',
|
5996
|
multi: false,
|
5968
|
multi: false,
|
|
@@ -7664,7 +7636,7 @@ function callpay(orderCode) { |
|
@@ -7664,7 +7636,7 @@ function callpay(orderCode) { |
7664
|
function isWXOpen() {
|
7636
|
function isWXOpen() {
|
7665
|
var ua = window.navigator.userAgent.toLowerCase();
|
7637
|
var ua = window.navigator.userAgent.toLowerCase();
|
7666
|
|
7638
|
|
7667
|
- if (ua.match(/MicroMessenger/i).toString() === 'micromessenger') {
|
7639
|
+ if (ua.indexOf('micromessenger') > 0) {
|
7668
|
return true;
|
7640
|
return true;
|
7669
|
} else {
|
7641
|
} else {
|
7670
|
return false;
|
7642
|
return false;
|