我的收藏和品牌无数据时提示语及idArr无空时报错修复
Showing
1 changed file
with
2 additions
and
2 deletions
@@ -45,7 +45,7 @@ function initSwiper(data) { | @@ -45,7 +45,7 @@ function initSwiper(data) { | ||
45 | idStrReg = /container-(\d+)['"]{1}/gi, | 45 | idStrReg = /container-(\d+)['"]{1}/gi, |
46 | idReg = /\d+/, | 46 | idReg = /\d+/, |
47 | idArr = data.match(idStrReg), | 47 | idArr = data.match(idStrReg), |
48 | - idArrLen = idArr.length, | 48 | + idArrLen = idArr && idArr.length || 0, |
49 | containerId; | 49 | containerId; |
50 | 50 | ||
51 | // $swiperList = $('.swiper-container'); | 51 | // $swiperList = $('.swiper-container'); |
@@ -95,7 +95,7 @@ function loadData($parent, url, page) { | @@ -95,7 +95,7 @@ function loadData($parent, url, page) { | ||
95 | if (data.total === 0) { | 95 | if (data.total === 0) { |
96 | 96 | ||
97 | $loadingMask.addClass('hide'); | 97 | $loadingMask.addClass('hide'); |
98 | - $parent.closest('.fav-type').find('.fav-null-box').removeClass('hide'); | 98 | + $parent.closest('.fav-type').find('.fav-null-box').removeClass('hide').addClass('show'); |
99 | window.rePosFooter(); | 99 | window.rePosFooter(); |
100 | } else if (data.more === true) { | 100 | } else if (data.more === true) { |
101 | 101 |
-
Please register or login to post a comment