Authored by liangxs

coupon bug 修改

@@ -40,11 +40,9 @@ $receive.on('click', function() { @@ -40,11 +40,9 @@ $receive.on('click', function() {
40 success: function(data) { 40 success: function(data) {
41 var msg = data.msg, 41 var msg = data.msg,
42 status = data.status, 42 status = data.status,
43 - newUrl;  
44 -  
45 - if (data.noLogin === true) {  
46 newUrl = data.url + '?code=' + getUrlParam('code'); 43 newUrl = data.url + '?code=' + getUrlParam('code');
47 44
  45 + if (data.noLogin === true) {
48 if ($('#intimacy-link').length <= 0) { 46 if ($('#intimacy-link').length <= 0) {
49 $('body').append('<a href=\'' + newUrl + '\' style="display:none;" id="intimacy-link">' + 47 $('body').append('<a href=\'' + newUrl + '\' style="display:none;" id="intimacy-link">' +
50 '<span class="intimacy-link"></span></a>'); 48 '<span class="intimacy-link"></span></a>');
@@ -79,7 +77,7 @@ $('.coupon-floor a, .banner-top a').on('click', function() { @@ -79,7 +77,7 @@ $('.coupon-floor a, .banner-top a').on('click', function() {
79 } 77 }
80 }); 78 });
81 79
82 -if ($('.banner-swiper').find('li').size() > 1) { 80 +if ($('.banner-swiper').find('li').length > 1) {
83 bannerSwiper = new Swiper('.banner-swiper', { 81 bannerSwiper = new Swiper('.banner-swiper', {
84 lazyLoading: true, 82 lazyLoading: true,
85 lazyLoadingInPrevNext: true, 83 lazyLoadingInPrevNext: true,
@@ -95,3 +93,17 @@ if ($('.banner-swiper').find('li').size() > 1) { @@ -95,3 +93,17 @@ if ($('.banner-swiper').find('li').size() > 1) {
95 $('.coupon-message-op-rel').on('click', function() { 93 $('.coupon-message-op-rel').on('click', function() {
96 location.reload(); 94 location.reload();
97 }); 95 });
  96 +
  97 +if ($('#noData').length > 0) {
  98 + if (location.href.indexOf('?openby:yohobuy=') <= 0){
  99 + tip.show('网络异常!');
  100 + }else{
  101 + console.log(location.href.indexOf('?openby:yohobuy='))
  102 + }
  103 +}
  104 +
  105 +$mask.on('click',function () {s
  106 + $mask.hide();
  107 + $message.hide();
  108 +});
  109 +
1 -.coupon-area { 1 +.coupon-area-page {
2 max-width: 640px; 2 max-width: 640px;
3 overflow: hidden; 3 overflow: hidden;
4 -  
5 - .banner-top {  
6 - float: left;  
7 - }  
8 } 4 }
9 5
10 .just-img{ 6 .just-img{
11 width: 100%; 7 width: 100%;
12 float: left; 8 float: left;
13 - margin: 20px 0; 9 + margin:0;
14 } 10 }
15 .coupon-floor { 11 .coupon-floor {
16 float: left; 12 float: left;
1 {{>layout/header}} 1 {{>layout/header}}
2 -<div class="coupon-area"> 2 +<div class="coupon-area-page yoho-page">
3 {{# content}} 3 {{# content}}
4 {{#if isSingleImage}} 4 {{#if isSingleImage}}
5 <a href="{{url}}"><img src="{{src}}" class="just-img"/></a> 5 <a href="{{url}}"><img src="{{src}}" class="just-img"/></a>
@@ -52,6 +52,9 @@ @@ -52,6 +52,9 @@
52 <input id="shareImg" type="hidden" value="{{shareImg}}"> 52 <input id="shareImg" type="hidden" value="{{shareImg}}">
53 <input id="shareTitle" type="hidden" value="{{shareTitle}}"> 53 <input id="shareTitle" type="hidden" value="{{shareTitle}}">
54 {{/ share}} 54 {{/ share}}
  55 + {{#if noData}}
  56 + <input id="noData" type="hidden">
  57 + {{/if}}
55 {{/ content}} 58 {{/ content}}
56 </div> 59 </div>
57 <div class="floor-mask"></div> 60 <div class="floor-mask"></div>