Authored by 郭成尧

del-mlellipsis-code

... ... @@ -6,7 +6,6 @@
require('cart/select-coupon.page.css');
const qs = require('yoho-qs');
let $ = require('yoho-jquery'),
ellipsis = require('yoho-mlellipsis'),
loading = require('plugin/loading'),
tip = require('plugin/tip'),
conponTmpl = require('cart/select-coupon/coupon.hbs'),
... ... @@ -40,8 +39,6 @@ function fixedLayOut() {
});
}
ellipsis.init();
function goToBack() {
history.go(-1);
}
... ...
... ... @@ -5,7 +5,6 @@
*/
require('cart/select-coupon.page.css');
let $ = require('yoho-jquery'),
ellipsis = require('yoho-mlellipsis'),
loading = require('plugin/loading'),
tip = require('plugin/tip'),
conponTmpl = require('cart/select-coupon/coupon.hbs'),
... ... @@ -39,8 +38,6 @@ function fixedLayOut() {
});
}
ellipsis.init();
function goToBack() {
history.go(-1);
}
... ...
... ... @@ -7,7 +7,6 @@
module.exports = function(likeParameter) {
let $ = require('yoho-jquery'),
Hammer = require('yoho-hammer'),
ellipsis = require('yoho-mlellipsis'),
tip = require('plugin/tip'),
loading = require('plugin/loading'),
lazyLoad = require('yoho-jquery-lazyload');
... ... @@ -42,8 +41,6 @@ module.exports = function(likeParameter) {
channel = window.cookie('_Channel');
ellipsis.init();
// ajax url
if (kidsType) {
... ... @@ -203,13 +200,6 @@ module.exports = function(likeParameter) {
loading.hideLoadingMask();
page++;
// $('.good-detail-text .name').each(function() {
// let $this = $(this),
// $title = $this.find('a');
// $title[0].mlellipsis(2);
// });
// 为您优选埋点 start
$(data).closest('.good-info').each(function() {
PRDID.push($(this).data('id'));
... ...
... ... @@ -6,7 +6,6 @@
require('guang/info-index.page.css');
let $ = require('yoho-jquery'),
ellipsis = require('yoho-mlellipsis'),
lazyLoad = require('yoho-jquery-lazyload');
let $authorIntro = $('.author .intro');
... ... @@ -269,16 +268,6 @@ $('.wei-share').on('touchend', function(e) {
position: 'static'
});
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'));
// offset.left约等于marginLeft的值则表示介绍被换行,则清除intro的paddingTop让其更靠近头像和作者名
... ...
... ... @@ -41,15 +41,6 @@ lazyLoad($('img.lazy'));
$('.logo').attr('src', logoImg);
// if ($('.good-detail-text .name').length > 0) {
// $('.good-detail-text .name').each(function() {
// $goodName = $(this);
// $title = $goodName.find('a');
// $title[0].mlellipsis(2);
// });
// }
// 获取截取文字和完整文字
setTimeout(function() {
$intro.css('height', 'auto');
... ...
... ... @@ -96,14 +96,6 @@ ListData.prototype.getListData = function(page) {
}
}
// if ($('.good-detail-text').length > 0) {
// $('.good-detail-text .name').each(function() {
// $this = $(this);
// $title = $this.find('a');
// $title[0].mlellipsis(2);
// });
// }
loading.hideLoadingMask();
},
error: function() {
... ...
... ... @@ -5,7 +5,6 @@
*/
let $ = require('yoho-jquery'),
ellipsis = require('yoho-mlellipsis'),
cookie = require('yoho-cookie'),
Swiper = require('yoho-swiper'),
... ... @@ -21,11 +20,7 @@ let installment = {
self.paramsInit();
$(window).on('mousewheel', false);
ellipsis.init();
self.setDetailText();
$('body').attr('ontouchstart', true);
$('img.lazy').lazyload({
effect: 'fadeIn'
});
... ... @@ -112,16 +107,6 @@ let installment = {
noSwiping: true
});
},
setDetailText: function() { // 标题限制行数
// let $this, $title;
// $('.good-detail-text .name').each(function() {
// $this = $(this);
// $title = $this.find('a');
// $title[0].mlellipsis(2);
// });
},
tabChangeAction: function(dom) {
let self = this,
labId = 1,
... ... @@ -132,7 +117,6 @@ let installment = {
window.setCookie('installmentTab', index);
if (index === 1) {
self.setDetailText();
labId = 2;
$('img.lazy').lazyload({
effect: 'fadeIn'
... ...
... ... @@ -7,7 +7,6 @@ import {
} from './model';
let lazyLoad = require('yoho-jquery-lazyload');
let ellipsis = require('yoho-mlellipsis');
export class IndexView extends View {
constructor() {
... ... @@ -17,8 +16,6 @@ export class IndexView extends View {
init() {
let $loadMoreInfo = $('#load-more-info');
ellipsis.init();
this.indexModel = new IndexModel();
this.selector = {
searching: false,
... ...
... ... @@ -8,7 +8,6 @@ require('product/sale/break-code-index.page.css');
let $ = require('yoho-jquery'),
Swiper = require('yoho-swiper2'),
ellipsis = require('yoho-mlellipsis'),
lazyLoad = require('yoho-jquery-lazyload'),
tip = require('plugin/tip'),
filter = require('plugin/filter'),
... ... @@ -66,8 +65,6 @@ let goodsType = ['coat', 'trouser', 'shoes', 'other'];
require('common');
require('common/suspend-cart'); // 悬浮购物车
ellipsis.init();
// 获取url里面的参数的值
function getUrlParam(name) {
// 构造一个含有目标参数的正则表达式对象
... ... @@ -275,13 +272,6 @@ function search(opt) {
// lazy good-infos who append in
lazyLoad($container.find('.good-info:gt(' + (num - 1) + ') .lazy'));
}
// $('.good-detail-text .name').each(function() {
// let $this = $(this),
// $title = $this.find('a');
// $title[0].mlellipsis(2);
// });
}
nav.reload = false;
... ...
... ... @@ -6,7 +6,6 @@
let $ = require('yoho-jquery'),
Swiper = require('yoho-swiper'),
ellipsis = require('yoho-mlellipsis'),
lazyLoad = require('yoho-jquery-lazyload');
let tip = require('plugin/tip'),
... ... @@ -61,8 +60,6 @@ let $listNav = $('#list-nav'),
require('common/suspend-cart'); // 悬浮购物车
require('common');
ellipsis.init();
$('#today a').text(month + '月' + date + '号');
if ($('.swiper-container .swiper-slide').length > 1) {
... ...
... ... @@ -8,9 +8,7 @@ require('product/sale/index.page.css');
let $ = require('yoho-jquery'),
Swiper = require('yoho-swiper2'),
ellipsis = require('yoho-mlellipsis'),
lazyload = require('yoho-jquery-lazyload');
let search = require('./sale/search');
let defaultOpt = require('common/query-param');
... ... @@ -18,7 +16,6 @@ require('common');
search.start();
lazyload($('img.lazy'));
ellipsis.init();
$('.swiper-container').each(function() {
if ($(this).find('.swiper-slide').length > 1) {
... ... @@ -59,14 +56,6 @@ $(function() {
if (/good-info/.test(res)) {
$vipFloor.html(res).addClass('goods-container');
lazyload($vipFloor.find('img.lazy'));
// $('.good-detail-text .name').each(function() {
// let $this = $(this),
// $title = $this.find('a');
// $title[0].mlellipsis(2);
// });
$vipFloor.css('padding-bottom', '0.75rem');
}
});
... ...
... ... @@ -4,7 +4,6 @@
* @date: 2016/5/23
*/
let $ = require('yoho-jquery'),
ellipsis = require('yoho-mlellipsis'),
lazyLoad = require('yoho-jquery-lazyload'),
tip = require('plugin/tip'),
filter = require('plugin/filter'),
... ... @@ -86,8 +85,6 @@ let $listNav = $('#list-nav'),
require('common');
ellipsis.init();
// 获取url里面的参数的值
function getUrlParam(name) {
// 构造一个含有目标参数的正则表达式对象
... ... @@ -333,13 +330,6 @@ function search(opt, params, isScroll) {
loading.hideLoadingMask();
window.rePosFooter();
// $('.good-detail-text .name').each(function() {
// let $this = $(this),
// $title = $this.find('a');
// $title[0].mlellipsis(2);
// });
},
error: function() {
tip.show('网络断开连接了~');
... ...
... ... @@ -6,7 +6,6 @@
let $ = require('yoho-jquery'),
Hammer = require('yoho-hammer'),
ellipsis = require('yoho-mlellipsis'),
lazyLoad = require('yoho-jquery-lazyload');
// 品牌页参数
... ... @@ -112,8 +111,6 @@ if (!firstScreen) {
window.rePosFooter();
}
ellipsis.init();
// pageCache 获取是否收藏
(function() {
if ($('.domain').val()) {
... ... @@ -694,13 +691,6 @@ function search(opt) {
firstScreen = false;
// $('.good-detail-text .name').each(function() {
// $this = $(this);
// $title = $this.find('a');
// $title[0].mlellipsis(2);
// });
// 用于统计点击了商品列表的第几个商品,序号从1开始计算。
if (window._yas) {
switch (navType) {
... ...
... ... @@ -10,7 +10,6 @@ require('common/_invite-share.css');
require('common/invite-share');
let $ = require('yoho-jquery'),
Hammer = require('yoho-hammer'),
ellipsis = require('yoho-mlellipsis'),
lazyLoad = require('yoho-jquery-lazyload');
... ... @@ -91,8 +90,6 @@ let $listNav = $('#list-nav'),
require('common');
ellipsis.init();
C_ID = window._ChannelVary[window.cookie('_Channel')];
// pageCache 获取是否收藏
... ... @@ -533,13 +530,6 @@ 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) {
switch (navType) {
... ...