Authored by zhangxiaoru

列表页

... ... @@ -74,7 +74,7 @@ const index = (req, res) => {
liked: true,
like: '8'
},
{
{
id: '2',
msgLeft: '潮品',
msgTitle: '很到位和范围的恢复文件和的减肥了晚餐费',
... ... @@ -136,7 +136,7 @@ const list = (req, res) => {
liked: true,
like: '8'
},
{
{
id: '2',
msgLeft: '潮品',
msgTitle: '很到位和范围的恢复文件和的减肥了晚餐费',
... ... @@ -153,7 +153,7 @@ const list = (req, res) => {
totalRows: 100 // total page number
}
},
helpers: {
// import component, path depends on your project
pagination: require('../../../doraemon/components/pagination/pagination').createPagination
... ... @@ -163,6 +163,6 @@ const list = (req, res) => {
};
module.exports = {
index ,// 组件demo页
index, // 组件demo页
list
};
... ...
... ... @@ -4,30 +4,31 @@
* @date: 2016/07/05
*/
var $ = require('yoho-jquery'),
var $ = require('yoho-jquery'),
lazyLoad = require('yoho-jquery-lazyload');
var prising;
lazyLoad($('#msg-list img.lazy'));
lazyLoad($('#msg-list img.lazy'));
$(".msg-nav li").on('click', function() {
var activeTab = $(this).attr("data-type"),
href = $(this).find('a').attr("href");
$('.msg-nav li').on('click', function() {
var activeTab = $(this).attr('data-type'),
href = $(this).find('a').attr('href');
$(".msg-nav li").removeClass("active");
$(this).addClass("active");
console.log(activeTab)
console.log(href)
$('.msg-nav li').removeClass('active');
$(this).addClass('active');
console.log(activeTab);
console.log(href);
});
$('.editorial-index-page').on('click', '.like-icon', function() {
var $this = $(this),
msgId = $this.closest('.content-msg').data().id,
url;
msgId = $this.closest('.content-msg').data().id;
// url;
//同一资讯多次点击归一处理
// 同一资讯多次点击归一处理
if (prising === msgId) {
return;
}
... ... @@ -38,7 +39,7 @@ $('.editorial-index-page').on('click', '.like-icon', function() {
$this.toggleClass('liked');
//点赞或取消点赞
// 点赞或取消点赞
// if ($this.hasClass('liked')) {
// url = '/guang/info/praise';
// } else {
... ...
... ... @@ -2,11 +2,6 @@
width: 1150px;
margin: 0 auto;
/*.index-content {
width: 1150px;
margin: 0 auto;
}*/
.msg-nav {
height: 35px;
border-bottom: 1px solid #eee;
... ...
... ... @@ -17,12 +17,11 @@
font-size: 18px;
margin-right: 5px;
}
}
}
.paging {
margin: 20px auto;
width: 300px;
height: 40px;
}
}
\ No newline at end of file
}
... ...