Authored by 毕凯

Merge branch 'feature/goodslist' into release/4.5

... ... @@ -185,11 +185,21 @@ window.onload = function() {
//接口暴露在HTML中,使用压缩名
exports.i = function(useIscroll) {
var isIphone = navigator.userAgent.indexOf('iPhone') > 0 ? true : false;
var $this, $title;
pageInIscroll = isIphone && useIscroll;
ellipsis.init();
if ($('.good-detail-text .name').length > 0) {
$('.good-detail-text .name').each(function() {
$this = $(this);
$title = $this.find('a');
$title[0].mlellipsis(2);
});
}
lazyLoad($('.lazy'));
//title mlellipsis
... ...
... ... @@ -9,6 +9,7 @@ module.exports = function(specificGender) {
Hammer = require('yoho.hammer'),
tip = require('../plugin/tip'),
loading = require('../plugin/loading'),
ellipsis = require('mlellipsis'),
lazyLoad = require('yoho.lazyload');
var navHammer,
... ... @@ -31,6 +32,8 @@ module.exports = function(specificGender) {
var $footer;
ellipsis.init();
//ajax url
if (kidsType) {
url = '/product/recom/maylikekids';
... ... @@ -144,6 +147,13 @@ module.exports = function(specificGender) {
searching = false;
loading.hideLoadingMask();
page++;
$('.good-detail-text .name').each(function() {
var $this = $(this),
$title = $this.find('a');
$title[0].mlellipsis(2);
});
},
error: function() {
tip.show('网络断开连接了~');
... ...
... ... @@ -6,6 +6,7 @@
var $ = require('jquery'),
Hammer = require('yoho.hammer'),
ellipsis = require('mlellipsis'),
lazyLoad = require('yoho.lazyload');
... ... @@ -63,6 +64,8 @@ var $listNav = $('#list-nav'),
introHammer,
brandColHammer;
ellipsis.init();
$input.on('input', function() {
if ($input.val() === '') {
$icon.css('color', '#b2b2b2');
... ... @@ -95,7 +98,9 @@ function search(opt) {
ext,
att,
nav, navType,
page;
page,
$this,
$title;
if (searching) {
return;
... ... @@ -233,6 +238,12 @@ function search(opt) {
window.rePosFooter();
$('.good-detail-text .name').each(function() {
$this = $(this);
$title = $this.find('a');
$title[0].mlellipsis(2);
});
// 用于统计点击了商品列表的第几个商品,序号从1开始计算。
if (window._yas) {
... ...
... ... @@ -6,6 +6,7 @@
var $ = require('jquery'),
Swiper = require('yoho.iswiper'),
ellipsis = require('mlellipsis'),
lazyLoad = require('yoho.lazyload');
var swiper;
... ... @@ -54,6 +55,8 @@ var $listNav = $('#list-nav'),
require('../suspend-cart'); //悬浮购物车
ellipsis.init();
if ($('.swiper-container .swiper-slide').length > 1) {
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
... ... @@ -212,6 +215,13 @@ function search(opt) {
loading.hideLoadingMask();
window.rePosFooter();
$('.good-detail-text .name').each(function() {
var $this = $(this),
$title = $this.find('a');
$title[0].mlellipsis(2);
});
},
error: function() {
tip.show('网络断开连接了~');
... ...
... ... @@ -6,6 +6,7 @@
var $ = require('jquery'),
Swiper = require('yoho.iswiper'),
ellipsis = require('mlellipsis'),
lazyLoad = require('yoho.lazyload');
var swiper,
... ... @@ -60,6 +61,8 @@ var $listNav = $('#list-nav'),
require('../suspend-cart'); //悬浮购物车
ellipsis.init();
$('#today a').text(month + '月' + date + '号');
if ($('.swiper-container .swiper-slide').length > 1) {
... ... @@ -237,6 +240,13 @@ function search(opt) {
loading.hideLoadingMask();
window.rePosFooter();
$('.good-detail-text .name').each(function() {
var $this = $(this),
$title = $this.find('a');
$title[0].mlellipsis(2);
});
},
error: function() {
tip.show('网络断开连接了~');
... ...
.good-info {
float: left;
width: 276px;
height: 486px;
margin: 0 15px 15px;
height: 506px;
margin: 10px 15px 40px 15px;
.tag-container {
height: 28px;
... ... @@ -96,13 +96,15 @@
.good-detail-text {
.name a {
display: block;
line-height: 56px;
overflow: hidden;
white-space: nowrap;
min-height: 60px;
/* line-height: 29px;*/
/*overflow: hidden;*/
/* white-space: nowrap;
text-overflow: ellipsis;
text-decoration: none;
text-decoration: none;*/
font-size: 22px;
color: #444;
margin: 20px 0;
}
.price {
line-height: 22px;
... ...