Authored by 郭成尧

top

... ... @@ -33,13 +33,12 @@ module.exports = {
brandList: (req, res) => {
let params = req.query;
brandModel.getBrandListData().then(result => {
brandModel.getBrandListData(params).then(result => {
res.render('brand/brand-list', {
module: 'channel',
page: 'brand',
page: 'brand-list',
result: result
});
});
}
};
... ...
<div id="brand">
<resources v-bind:content="'men'"></resources>
<letter-list></letter-list>
</div>
\ No newline at end of file
... ...

1.24 KB | W: | H:

600 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
/**
* Created by PhpStorm.
* User: Targaryen
* Date: 2016/7/20
* Time: 14:13
*/
const $ = require('yoho-jquery');
const Vue = require('yoho-vue');
const resources = require('channel/resources.vue');
const letterList = require('channel/letter-list.vue');
require('common/vue-filter');
new Vue({
el: '#brand',
components: {
resources,
letterList
}
});
... ...
... ... @@ -4,16 +4,22 @@
* Date: 2016/7/19
* Time: 16:05
*/
const Vue = require('yoho-vue');
const $ = require('yoho-jquery');
const letterList = require('channel/letter-list.vue');
const $expand = $('.expand'),
$collapse = $('.collapse'),
$brandIntro = $('.brand-intro'),
exCoTm = 6; // 展开隐藏的倍数
new Vue({
el: '#brand',
components: {
letterList: letterList
}
$expand.on('click', function() {
$brandIntro.removeClass('line-clamp').animate({height: $brandIntro.height() * exCoTm});
$expand.hide();
$collapse.show();
});
$collapse.on('click', function() {
$brandIntro.addClass('line-clamp').animate({height: $brandIntro.height() / exCoTm});
$collapse.hide();
$expand.show();
});
require('./brand/index');
require('./brand/brand-list');
... ...
/**
* Created by PhpStorm.
* User: Targaryen
* Date: 2016/7/20
* Time: 13:23
*/
/**
* Created by PhpStorm.
* User: Targaryen
* Date: 2016/7/19
* Time: 10:16
*/
var $ = require('yoho-jquery');
var $expand = $('.expand'),
$collapse = $('.collapse'),
$brandIntro = $('.brand-intro'),
exCoTm = 6; // 展开隐藏的倍数
$expand.on('click', function() {
$brandIntro.removeClass('line-clamp').animate({height: $brandIntro.height() * exCoTm});
$expand.hide();
$collapse.show();
});
$collapse.on('click', function() {
$brandIntro.addClass('line-clamp').animate({height: $brandIntro.height() / exCoTm});
$collapse.hide();
$expand.show();
});
... ... @@ -27,7 +27,7 @@
height: 60px;
font-size: 16px;
line-height: 32px;
overflow : hidden;
overflow: hidden;
text-overflow: ellipsis;
}
... ... @@ -42,7 +42,7 @@
.expand {
width: 60px;
height: 60px;
background-color: $white;
background: url("/channel/expand.png") no-repeat;
position: absolute;
bottom: 20px;
right: 5%;
... ... @@ -51,7 +51,7 @@
.collapse {
width: 60px;
height: 60px;
background-color: $black;
background: url("/channel/collapse.png") no-repeat;
position: absolute;
bottom: 20px;
right: 5%;
... ...
@import "brand";
@import "brand-list";
... ...
... ... @@ -14,6 +14,7 @@
border-radius: 8px;
background: #fff;
opacity: 0.8;
top: 0;
li {
list-style: none;
... ...