Authored by 毕凯

Merge branch 'feature/goodslist' into release/4.5

@@ -185,11 +185,21 @@ window.onload = function() { @@ -185,11 +185,21 @@ window.onload = function() {
185 //接口暴露在HTML中,使用压缩名 185 //接口暴露在HTML中,使用压缩名
186 exports.i = function(useIscroll) { 186 exports.i = function(useIscroll) {
187 var isIphone = navigator.userAgent.indexOf('iPhone') > 0 ? true : false; 187 var isIphone = navigator.userAgent.indexOf('iPhone') > 0 ? true : false;
  188 + var $this, $title;
188 189
189 pageInIscroll = isIphone && useIscroll; 190 pageInIscroll = isIphone && useIscroll;
190 191
191 ellipsis.init(); 192 ellipsis.init();
192 193
  194 + if ($('.good-detail-text .name').length > 0) {
  195 + $('.good-detail-text .name').each(function() {
  196 + $this = $(this);
  197 + $title = $this.find('a');
  198 +
  199 + $title[0].mlellipsis(2);
  200 + });
  201 + }
  202 +
193 lazyLoad($('.lazy')); 203 lazyLoad($('.lazy'));
194 204
195 //title mlellipsis 205 //title mlellipsis
@@ -9,6 +9,7 @@ module.exports = function(specificGender) { @@ -9,6 +9,7 @@ module.exports = function(specificGender) {
9 Hammer = require('yoho.hammer'), 9 Hammer = require('yoho.hammer'),
10 tip = require('../plugin/tip'), 10 tip = require('../plugin/tip'),
11 loading = require('../plugin/loading'), 11 loading = require('../plugin/loading'),
  12 + ellipsis = require('mlellipsis'),
12 lazyLoad = require('yoho.lazyload'); 13 lazyLoad = require('yoho.lazyload');
13 14
14 var navHammer, 15 var navHammer,
@@ -31,6 +32,8 @@ module.exports = function(specificGender) { @@ -31,6 +32,8 @@ module.exports = function(specificGender) {
31 32
32 var $footer; 33 var $footer;
33 34
  35 + ellipsis.init();
  36 +
34 //ajax url 37 //ajax url
35 if (kidsType) { 38 if (kidsType) {
36 url = '/product/recom/maylikekids'; 39 url = '/product/recom/maylikekids';
@@ -144,6 +147,13 @@ module.exports = function(specificGender) { @@ -144,6 +147,13 @@ module.exports = function(specificGender) {
144 searching = false; 147 searching = false;
145 loading.hideLoadingMask(); 148 loading.hideLoadingMask();
146 page++; 149 page++;
  150 +
  151 + $('.good-detail-text .name').each(function() {
  152 + var $this = $(this),
  153 + $title = $this.find('a');
  154 +
  155 + $title[0].mlellipsis(2);
  156 + });
147 }, 157 },
148 error: function() { 158 error: function() {
149 tip.show('网络断开连接了~'); 159 tip.show('网络断开连接了~');
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 6
7 var $ = require('jquery'), 7 var $ = require('jquery'),
8 Hammer = require('yoho.hammer'), 8 Hammer = require('yoho.hammer'),
  9 + ellipsis = require('mlellipsis'),
9 lazyLoad = require('yoho.lazyload'); 10 lazyLoad = require('yoho.lazyload');
10 11
11 12
@@ -63,6 +64,8 @@ var $listNav = $('#list-nav'), @@ -63,6 +64,8 @@ var $listNav = $('#list-nav'),
63 introHammer, 64 introHammer,
64 brandColHammer; 65 brandColHammer;
65 66
  67 +ellipsis.init();
  68 +
66 $input.on('input', function() { 69 $input.on('input', function() {
67 if ($input.val() === '') { 70 if ($input.val() === '') {
68 $icon.css('color', '#b2b2b2'); 71 $icon.css('color', '#b2b2b2');
@@ -95,7 +98,9 @@ function search(opt) { @@ -95,7 +98,9 @@ function search(opt) {
95 ext, 98 ext,
96 att, 99 att,
97 nav, navType, 100 nav, navType,
98 - page; 101 + page,
  102 + $this,
  103 + $title;
99 104
100 if (searching) { 105 if (searching) {
101 return; 106 return;
@@ -233,6 +238,12 @@ function search(opt) { @@ -233,6 +238,12 @@ function search(opt) {
233 238
234 window.rePosFooter(); 239 window.rePosFooter();
235 240
  241 + $('.good-detail-text .name').each(function() {
  242 + $this = $(this);
  243 + $title = $this.find('a');
  244 +
  245 + $title[0].mlellipsis(2);
  246 + });
236 247
237 // 用于统计点击了商品列表的第几个商品,序号从1开始计算。 248 // 用于统计点击了商品列表的第几个商品,序号从1开始计算。
238 if (window._yas) { 249 if (window._yas) {
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 6
7 var $ = require('jquery'), 7 var $ = require('jquery'),
8 Swiper = require('yoho.iswiper'), 8 Swiper = require('yoho.iswiper'),
  9 + ellipsis = require('mlellipsis'),
9 lazyLoad = require('yoho.lazyload'); 10 lazyLoad = require('yoho.lazyload');
10 11
11 var swiper; 12 var swiper;
@@ -54,6 +55,8 @@ var $listNav = $('#list-nav'), @@ -54,6 +55,8 @@ var $listNav = $('#list-nav'),
54 55
55 require('../suspend-cart'); //悬浮购物车 56 require('../suspend-cart'); //悬浮购物车
56 57
  58 +ellipsis.init();
  59 +
57 if ($('.swiper-container .swiper-slide').length > 1) { 60 if ($('.swiper-container .swiper-slide').length > 1) {
58 swiper = new Swiper('.swiper-container', { 61 swiper = new Swiper('.swiper-container', {
59 lazyLoading: true, 62 lazyLoading: true,
@@ -212,6 +215,13 @@ function search(opt) { @@ -212,6 +215,13 @@ function search(opt) {
212 loading.hideLoadingMask(); 215 loading.hideLoadingMask();
213 216
214 window.rePosFooter(); 217 window.rePosFooter();
  218 +
  219 + $('.good-detail-text .name').each(function() {
  220 + var $this = $(this),
  221 + $title = $this.find('a');
  222 +
  223 + $title[0].mlellipsis(2);
  224 + });
215 }, 225 },
216 error: function() { 226 error: function() {
217 tip.show('网络断开连接了~'); 227 tip.show('网络断开连接了~');
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 6
7 var $ = require('jquery'), 7 var $ = require('jquery'),
8 Swiper = require('yoho.iswiper'), 8 Swiper = require('yoho.iswiper'),
  9 + ellipsis = require('mlellipsis'),
9 lazyLoad = require('yoho.lazyload'); 10 lazyLoad = require('yoho.lazyload');
10 11
11 var swiper, 12 var swiper,
@@ -60,6 +61,8 @@ var $listNav = $('#list-nav'), @@ -60,6 +61,8 @@ var $listNav = $('#list-nav'),
60 61
61 require('../suspend-cart'); //悬浮购物车 62 require('../suspend-cart'); //悬浮购物车
62 63
  64 +ellipsis.init();
  65 +
63 $('#today a').text(month + '月' + date + '号'); 66 $('#today a').text(month + '月' + date + '号');
64 67
65 if ($('.swiper-container .swiper-slide').length > 1) { 68 if ($('.swiper-container .swiper-slide').length > 1) {
@@ -237,6 +240,13 @@ function search(opt) { @@ -237,6 +240,13 @@ function search(opt) {
237 loading.hideLoadingMask(); 240 loading.hideLoadingMask();
238 241
239 window.rePosFooter(); 242 window.rePosFooter();
  243 +
  244 + $('.good-detail-text .name').each(function() {
  245 + var $this = $(this),
  246 + $title = $this.find('a');
  247 +
  248 + $title[0].mlellipsis(2);
  249 + });
240 }, 250 },
241 error: function() { 251 error: function() {
242 tip.show('网络断开连接了~'); 252 tip.show('网络断开连接了~');
1 .good-info { 1 .good-info {
2 float: left; 2 float: left;
3 width: 276px; 3 width: 276px;
4 - height: 486px;  
5 - margin: 0 15px 15px; 4 + height: 506px;
  5 + margin: 10px 15px 40px 15px;
6 6
7 .tag-container { 7 .tag-container {
8 height: 28px; 8 height: 28px;
@@ -96,13 +96,15 @@ @@ -96,13 +96,15 @@
96 .good-detail-text { 96 .good-detail-text {
97 .name a { 97 .name a {
98 display: block; 98 display: block;
99 - line-height: 56px;  
100 - overflow: hidden;  
101 - white-space: nowrap; 99 + min-height: 60px;
  100 +/* line-height: 29px;*/
  101 + /*overflow: hidden;*/
  102 +/* white-space: nowrap;
102 text-overflow: ellipsis; 103 text-overflow: ellipsis;
103 - text-decoration: none; 104 + text-decoration: none;*/
104 font-size: 22px; 105 font-size: 22px;
105 color: #444; 106 color: #444;
  107 + margin: 20px 0;
106 } 108 }
107 .price { 109 .price {
108 line-height: 22px; 110 line-height: 22px;