Authored by 郝肖肖

源流优选 tab li样式

... ... @@ -7,17 +7,30 @@
const mRoot = '../models';
const plusstarModel = require(`${mRoot}/plusstar`);
const headerModel = require('../../../doraemon/models/header'); // 头部model
/**
* 潮流优选首页
*/
exports.index = (req, res, next) => {
let isApp = req.query.app_version || req.query.appVersion || false;
let parameter = {};
let title = '潮流优选';
if (isApp === false) {
parameter = {
pageHeader: headerModel.setNav({
navTitle: title
}),
pageFooter: true
};
}
plusstarModel.getAllChannels({}).then(result => {
res.render('plusstar/index', {
res.render('plusstar/index', Object.assign({
page: 'plusstar-index',
result: result,
title: '潮流优选'
});
title: title
}, parameter));
}).catch(next);
};
... ...
... ... @@ -51,7 +51,7 @@
</a>
</div>
<div class="goods">
<div class="goods clearfix">
<!--商品--->
{{#each result.goods.data}}
{{> common/goods}}
... ...
... ... @@ -11,10 +11,18 @@ lazyLoad($('img.lazy'));
plusstar = {
init: function() {
var that = this, $liDom;
var that = this,
$liDom,
$tabUlDom;
$tabUlDom = $('.plusstar-page .tab-nav ul');
$tabUlDom.find('li').css({
width: 100 / $tabUlDom.find('li').length + '%'
});
// 事情委托机制
$('.plusstar-page .tab-nav ul').bind('click', function(event) {
$tabUlDom.bind('click', function(event) {
$liDom = $(event.target).closest('li');
if ($liDom.hasClass('focus')) {
... ... @@ -38,7 +46,7 @@ plusstar = {
$liDom = $('.plusstar-page .tab-nav ul li:eq(0)');
break;
}
$('.plusstar-page .tab-nav ul').find('li').removeClass('focus');
$tabUlDom.find('li').removeClass('focus');
$liDom.addClass('focus');
that.tabNav($liDom.data('code'));
... ...
... ... @@ -117,13 +117,16 @@
.good-detail-text {
.name a {
display: block;
margin: 15px 0 10px;
min-height: 50px;
color: #444;
font-size: 22px;
line-height: 30px;
padding: 5px 0; /* 商品标题限制行数的bug修复 增加元素的clientHeight */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.price {
... ...