Authored by 王水玲

星潮bug修改

@@ -8,13 +8,18 @@ var $ = require('jquery'), @@ -8,13 +8,18 @@ var $ = require('jquery'),
8 tip = require('../plugin/tip'), 8 tip = require('../plugin/tip'),
9 loading = require('../plugin/loading'), 9 loading = require('../plugin/loading'),
10 lazyLoad = require('yoho.lazyload'), 10 lazyLoad = require('yoho.lazyload'),
  11 + ellipsis = require('mlellipsis'),
11 stopLoading = false; 12 stopLoading = false;
12 13
13 var page = 1; 14 var page = 1;
14 15
  16 +ellipsis.init();
  17 +
15 $('body').addClass('star-class-body'); 18 $('body').addClass('star-class-body');
16 19
17 function massageAJAX(page) { 20 function massageAJAX(page) {
  21 + var $this, $title, $cont;
  22 +
18 loading.showLoadingMask(); 23 loading.showLoadingMask();
19 $.ajax({ 24 $.ajax({
20 type: 'GET', 25 type: 'GET',
@@ -32,6 +37,17 @@ function massageAJAX(page) { @@ -32,6 +37,17 @@ function massageAJAX(page) {
32 } 37 }
33 38
34 $('.collocation-list').append(data); 39 $('.collocation-list').append(data);
  40 +
  41 + // 限制标题字数
  42 + $('.cont-area').each(function() {
  43 + $this = $(this);
  44 + $title = $this.find('.title');
  45 + $cont = $this.find('.cont-txt');
  46 +
  47 + $title[0].mlellipsis(2);
  48 + $cont[0].mlellipsis(2);
  49 + });
  50 +
35 loading.hideLoadingMask(); 51 loading.hideLoadingMask();
36 lazyLoad($('img.lazy')); 52 lazyLoad($('img.lazy'));
37 }, 53 },
@@ -118,4 +134,4 @@ $(document).on('touchstart', '.collection', function(event) { @@ -118,4 +134,4 @@ $(document).on('touchstart', '.collection', function(event) {
118 tip.show('网络断开连接了~'); 134 tip.show('网络断开连接了~');
119 } 135 }
120 }); 136 });
121 -});  
  137 +});
@@ -263,7 +263,9 @@ $('.pop-intimacy .pop-close, .classroom-mask').on('click', function() { @@ -263,7 +263,9 @@ $('.pop-intimacy .pop-close, .classroom-mask').on('click', function() {
263 // overflow: 'visible' 263 // overflow: 'visible'
264 // }); 264 // });
265 265
266 - location.reload(); 266 + // location.reload();
  267 +
  268 + history.go(0);
267 }); 269 });
268 270
269 function setAvatar() { 271 function setAvatar() {
@@ -735,11 +735,6 @@ @@ -735,11 +735,6 @@
735 line-height: 46px; 735 line-height: 46px;
736 color: #b0b0b0; 736 color: #b0b0b0;
737 margin-top: 10px; 737 margin-top: 10px;
738 - overflow : hidden;  
739 - text-overflow: ellipsis;  
740 - display: -webkit-box;  
741 - -webkit-line-clamp: 2;  
742 - -webkit-box-orient: vertical;  
743 } 738 }
744 739
745 img { 740 img {
@@ -749,16 +744,8 @@ @@ -749,16 +744,8 @@
749 .title { 744 .title {
750 font-size: 40px; 745 font-size: 40px;
751 line-height: 48px; 746 line-height: 48px;
752 -  
753 - a {  
754 - color: #fff;  
755 - width: 100%;  
756 - overflow: hidden;  
757 - text-overflow: ellipsis;  
758 - display: -webkit-box;  
759 - -webkit-line-clamp: 2;  
760 - -webkit-box-orient: vertical;  
761 - } 747 + color: #fff;
  748 + width: 100%;
762 } 749 }
763 750
764 .count-area { 751 .count-area {
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <a href="{{url}}"><img class="lazy" src ="" data-original="{{img}}" /></a> 4 <a href="{{url}}"><img class="lazy" src ="" data-original="{{img}}" /></a>
5 {{/if}} 5 {{/if}}
6 <div class="cont-area"> 6 <div class="cont-area">
7 - <h2 class="title"><a href="{{url}}">{{title}}</a></h2> 7 + <a href="{{url}}"><h2 class="title">{{title}}</h2></a>
8 <p class="cont-txt">{{content}}</p> 8 <p class="cont-txt">{{content}}</p>
9 <div class="count-area"> 9 <div class="count-area">
10 <span class="time"><i class="iconfont time-ico">&#xe603;</i>{{time}}</span> 10 <span class="time"><i class="iconfont time-ico">&#xe603;</i>{{time}}</span>