Authored by ccbikai(👎🏻🍜)

Merge branch 'release/5.2' into gray

@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 <div class="field"> 15 <div class="field">
16 <label for="identityCardNo">身份证号:</label> 16 <label for="identityCardNo">身份证号:</label>
17 17
18 - <input id="identityCardNo" name="identityCardNo" type="text" placeholder="请填写身份证号" maxlength="18"/> 18 + <input id="identityCardNo" name="identityCardNo" type="tel" placeholder="请填写身份证号" maxlength="18"/>
19 <div class="clearfix"></div> 19 <div class="clearfix"></div>
20 </div> 20 </div>
21 21
@@ -184,7 +184,7 @@ const search = (req, res, next) => { @@ -184,7 +184,7 @@ const search = (req, res, next) => {
184 184
185 params.isApp = req.yoho.isApp; 185 params.isApp = req.yoho.isApp;
186 searchModel.getSearchData(params).then((result) => { 186 searchModel.getSearchData(params).then((result) => {
187 - if (result.list.length > 0) { 187 + if (result.list && result.list.length > 0) {
188 res.render('search/page', { 188 res.render('search/page', {
189 layout: false, 189 layout: false,
190 new: result.list, 190 new: result.list,
1 -<div class="banner-center banner-center-swiper">  
2 - {{#if singleOne}}  
3 - {{#data}} 1 +{{#if singleOne}}
  2 +{{#data}}
4 <div class="banner-list"> 3 <div class="banner-list">
5 <a href="{{url}}"> 4 <a href="{{url}}">
6 <img src="{{image src 640 200}}" alt=""> 5 <img src="{{image src 640 200}}" alt="">
7 </a> 6 </a>
8 </div> 7 </div>
9 - {{/data}}  
10 - {{else}} 8 +{{/data}}
  9 +{{else}}
  10 +<div class="banner-center banner-center-swiper">
11 <ul class="banner-list swiper-wrapper clearfix"> 11 <ul class="banner-list swiper-wrapper clearfix">
12 {{#data}} 12 {{#data}}
13 <li class="swiper-slide"> 13 <li class="swiper-slide">
@@ -17,9 +17,9 @@ @@ -17,9 +17,9 @@
17 </li> 17 </li>
18 {{/data}} 18 {{/data}}
19 </ul> 19 </ul>
20 - {{/if}}  
21 <div class="swiper-pagination" {{#unless singleOne}}style="display:block"{{/unless}}> 20 <div class="swiper-pagination" {{#unless singleOne}}style="display:block"{{/unless}}>
22 <div class="pagination-inner"> 21 <div class="pagination-inner">
23 </div> 22 </div>
24 </div> 23 </div>
25 </div> 24 </div>
  25 +{{/if}}
  1 +{{#if banner_image.[1]}}
1 <div class="banner-center banner-center-swiper" style="border: 0;"> 2 <div class="banner-center banner-center-swiper" style="border: 0;">
2 - {{#if banner_image.[1]}}  
3 <ul class="banner-list swiper-wrapper clearfix"> 3 <ul class="banner-list swiper-wrapper clearfix">
4 {{#banner_image}} 4 {{#banner_image}}
5 <li class="swiper-slide"> 5 <li class="swiper-slide">
@@ -9,17 +9,17 @@ @@ -9,17 +9,17 @@
9 </li> 9 </li>
10 {{/banner_image}} 10 {{/banner_image}}
11 </ul> 11 </ul>
12 - {{else}}  
13 - {{#banner_image}}  
14 - <div class="banner-list">  
15 - <a href="{{url}}">  
16 - <img src="{{image src 640 200}}" alt="">  
17 - </a>  
18 - </div>  
19 - {{/banner_image}}  
20 - {{/if}}  
21 <div class="swiper-pagination" {{#if banner_image.[1]}}style="display:block"{{/if}}> 12 <div class="swiper-pagination" {{#if banner_image.[1]}}style="display:block"{{/if}}>
22 <div class="pagination-inner"> 13 <div class="pagination-inner">
23 </div> 14 </div>
24 </div> 15 </div>
25 </div> 16 </div>
  17 +{{else}}
  18 +{{#banner_image}}
  19 +<div class="banner-list single-one">
  20 + <a href="{{url}}">
  21 + <img src="{{image src 640 200}}" alt="">
  22 + </a>
  23 +</div>
  24 +{{/banner_image}}
  25 +{{/if}}
@@ -112,16 +112,22 @@ if ($('.banner-swiper').find('li').size() > 1) { @@ -112,16 +112,22 @@ if ($('.banner-swiper').find('li').size() > 1) {
112 } 112 }
113 113
114 // single_image的轮播 114 // single_image的轮播
115 -if ($('.banner-center-swiper').find('li').size() > 1) { 115 +
  116 +
  117 +$('.banner-center-swiper').each(function() {
  118 + if ($(this).find('li').size() > 1) {
116 new Swiper('.banner-center-swiper', { 119 new Swiper('.banner-center-swiper', {
117 loop: true, 120 loop: true,
118 autoplay: 3000, 121 autoplay: 3000,
119 autoplayDisableOnInteraction: false, 122 autoplayDisableOnInteraction: false,
120 paginationClickable: true, 123 paginationClickable: true,
121 slideElement: 'li', 124 slideElement: 'li',
122 - pagination: '.banner-center .pagination-inner' 125 + pagination: '.banner-center .pagination-inner',
123 }); 126 });
124 -} 127 + } else {
  128 + $(this).unbind();
  129 + }
  130 +});
125 131
126 // 热门品牌滑动 132 // 热门品牌滑动
127 new Swiper('.brands-swiper', { 133 new Swiper('.brands-swiper', {
@@ -245,6 +251,7 @@ var checkShop = function() { @@ -245,6 +251,7 @@ var checkShop = function() {
245 $('.recom-shop').each(function() { 251 $('.recom-shop').each(function() {
246 shopIds.push($(this).attr('shopId')); 252 shopIds.push($(this).attr('shopId'));
247 }); 253 });
  254 + shopIds.length &&
248 $.ajax({ 255 $.ajax({
249 type: 'POST', 256 type: 'POST',
250 url: '/channel/shopRecom', 257 url: '/channel/shopRecom',
@@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
2 position: relative; 2 position: relative;
3 height: 200px; 3 height: 200px;
4 overflow: hidden; 4 overflow: hidden;
  5 + margin-bottom: -2PX;
  6 + z-index: 2;
5 7
6 img { 8 img {
7 display: block; 9 display: block;
@@ -75,3 +77,8 @@ @@ -75,3 +77,8 @@
75 } 77 }
76 } 78 }
77 } 79 }
  80 +
  81 +.single-one {
  82 + margin-bottom: -2PX;
  83 + z-index: 2;
  84 +}
1 .banner-top { 1 .banner-top {
2 position: relative; 2 position: relative;
  3 + margin-bottom: -2PX;
3 4
4 .swiper-pagination { 5 .swiper-pagination {
5 position: absolute; 6 position: absolute;