Authored by 刘传洋

detail

... ... @@ -45,7 +45,7 @@ exports.index = (req, res, next) => {
guang: {
slider: ret[0],
msgTypes: ret[1],
msgs: (ret[2] && ret[2].msgs) || ret[2],
msgs: ret[2] && ret[2].msgs,
hotTags: ret[3],
ads: ret[4],
exRecos: ret[5],
... ... @@ -57,7 +57,7 @@ exports.index = (req, res, next) => {
page: page,
total: (ret[2] && ret[2].total) || 0
},
headerData: ret[6]['headerData'] || ret[6]
headerData: ret[6]['headerData']
});
}).catch(next);
... ... @@ -85,19 +85,17 @@ exports.tags = (req, res, next) => {
Promise.all([
guangModel.getBanner(channel),
// guangModel.getCategory(type),
guangModel.getArticleList(gender, 0, uid, udid, page, query, '', pageSize),
guangModel.getHotTags(1, 20),
guangModel.getAds(channel),
guangModel.getTjArticles(gender, 1, 10),
headerModel.requestHeaderData(channel)
]).then(ret => {
res.render('tag', {
guang: {
slider: ret[0],
// msgTypes: ret[1],
msgs: (ret[1] && ret[1].msgs) || ret[1],
msgs: ret[1] && ret[1].msgs,
hotTags: ret[2],
ads: ret[3],
exRecos: ret[4],
... ... @@ -110,7 +108,7 @@ exports.tags = (req, res, next) => {
page: page,
total: (ret[1] && ret[1].total) || 0
},
headerData: ret[5]['headerData'] || ret[5]
headerData: ret[5]['headerData']
});
}).catch(next);
};
... ... @@ -157,7 +155,7 @@ exports.editor = (req, res, next) => {
intro: ret[0] && ret[0]['author_desc'],
info: '设计理念:时尚,线条流畅'
},
msgs: (ret[1] && ret[1].msgs) || ret[1],
msgs: ret[1] && ret[1].msgs,
hotTags: ret[2],
ads: ret[3],
exRecos: ret[4],
... ... @@ -170,7 +168,7 @@ exports.editor = (req, res, next) => {
},
guangList: true,
guangListPage: true,
headerData: ret[5]['headerData'] || ret[5]
headerData: ret[5]['headerData']
});
}).catch(next);
};
... ... @@ -191,41 +189,20 @@ exports.detail = (req, res, next) => {
let channel = req.yoho.channel;
if (!_.isNumber(id)) {
// return next(new Error('文章不存在!'));
// return next();
id = parseInt(id);
}
// $id = $this->param('id','');
// $id = 34374;
// if(empty($id)) {
// $id = $this->get('id');
// }
// $page = $this->get('page', 1);//评论分页
// $col = $this->get('col', 0);//收藏
// $pjax = $this->get("_pjax");
// $limit = 20; //评论每页显示条数
if (pjax) {
return guangModel.getArticleComments(id, page, pageSize).then(res => {
return res.render('comment', res);
});
}
// if ($pjax) {
// $this->_view->display('comment', InfoModel::commentList($id, $page, $limit));
// exit;
// }
// $uid = $this->getUid();
// $udid = $this->getUdid();
// 登陆后自动收藏
if (col == 1 && uid > 0) {
guangModel.collectArticle(id, uid);
}
// $gender = Helpers::getGenderByCookie();
// $channel = Helpers::getChannelNameByCookie();
guangModel.getArticleInfo(id).then(info => {
// 判断参数是否有效, 无效会跳转到错误页面
... ... @@ -233,8 +210,6 @@ exports.detail = (req, res, next) => {
return new Error('文章不存在');
}
console.log(info);
let promises = [
headerModel.requestHeaderData(channel),
guangModel.getArticleContent(id),
... ... @@ -246,8 +221,8 @@ exports.detail = (req, res, next) => {
guangModel.getAds(channel)
];
if (info.author_id) {
promises.push(guangModel.getAuthor(info.author_id));
if (info.authorId) {
promises.push(guangModel.getAuthor(info.authorId));
} else {
promises.push({});
}
... ... @@ -258,17 +233,18 @@ exports.detail = (req, res, next) => {
promises.push({});
}
let pathNav = guangModel.getPathNav(channel, info.article_title);
let pathNav = guangModel.getPathNav(channel, info.title);
Promise.all(promises).then(ret => {
res.render('detail', {
guangDetailPage: true,
pathNav: pathNav,
headerData: ret[1]['headerData'] || ret[1],
headerData: ret[0]['headerData'],
guang: {
pathNav: pathNav,
id: id,
header: Object.assign({}, info, info.authorId && ret[8] || {}, { commentNum: ret[3].commentNum }),
header: Object.assign({}, info, info.authorId && ret[8] || {}, { commentNum: (ret[3] && ret[3].commentNum) || 0 }),
content: ret[1],
hotTags: ret[2],
comment: ret[3],
... ... @@ -291,32 +267,167 @@ exports.detail = (req, res, next) => {
}).catch(next);
});
// $data = array(
// 'guangDetailPage' => true,
// 'pathNav' => $info['pathNav'],
// 'guang' => array(
// 'id' => $id,
// 'header' => isset($info['header']) ? $info['header']: array(),
// 'content' => isset($info['content']) ? $info['content'] : array(),
// 'brands' => isset($info['brands']) ? $info['brands'] : array(),
// 'userInfo' => isset($info['userInfo']) ? $info['userInfo'] : array(),
// 'tag' => isset($info['tag']) ? $info['tag'] : array(),
// //分享
// 'shareImg' => $info['header']['shareImg'],
// 'sharedTitle' => $info['header']['title'],
// 'shareDesc' => $info['header']['desc'],
// 'weixinUrl' => $info['header']['weixinUrl'],
// 'relatedPost' => isset($info['relatedPost']) ? $info['relatedPost'] : array(),
// 'commentInfo' => $this->getSession('comment_'.$udid),
// 'comment' => isset($info['comment']) ? $info['comment'] : array(),
// 'exRecos' => isset($info['exRecos']) ? $info['exRecos'] : array(),
// 'hotTags' => isset($info['hotTags']) ? $info['hotTags'] : array(),
// 'ads' => IndexModel::getAds($channel),
// )
// );
// $this->setTitle($info['header']['title'].' | YOHO!BUY有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证');
// $this->setKeywords('Yoho! 有货,潮流,时尚,流行,购物,B2C,正品,购物网站,网上购物,货到付款,品牌服饰,男士护肤,黑框眼镜,匡威,板鞋,i.t,izzue,5cm,eastpak,vans,lylescott,g-shock,new balance,lacoste,melissa,casio,卡西欧手表,舒雅,jasonwood,odm,AAAA,香港购物,日本潮流');
// $this->setDescription('潮流商品搜索,上衣,衬衫,TEE,卫衣,冲锋衣,风衣,羽绒服,裤子,休闲鞋,板鞋,配饰,复古眼镜');
// $this->setWebNavHeader($channel);
// $this->_view->display('info', $data);
};
/**
* 添加评论
*/
exports.comment = (req, res, next) => {
let id = req.body.id || req.query.id;
let uid = 1000; //cookie.getUid(req);
let udid = ghelper.getUdid(req);
let comment = req.body.comment;
let pageSize = req.query.pageSize || 20;
if(!uid) {
req.session['comment_' + udid] = comment;
return res.status(401).end();
}
guangModel.addComment(id, uid, comment).then(ret => {
if(req.session['comment_' + udid]) {
req.session['comment_' + udid] = null;
}
return guangModel.getArticleComments(id, 1, 20);
}).then(commentInfo => {
res.render('detail-comment', {
comment : commentInfo,
layout : false
}, (err, content) => {
return res.send({
code : 200,
data : {
count : commentInfo.commentNum,
content : content
}
});
})
}).catch(err => {
return res.send({
code : 400,
message : '评论失败'
});
});
/*if (!$uid) {
//评论内容存session
$this->setSession('comment_'.$udid, $comment);
$this->helpJsonResult(401, '', '');
}
$result = InfoData::addComment($id, $uid, $comment);
if (isset($result['code']) && $result['code'] == 200) {
if ($this->getSession('comment_'.$udid)) {
$this->setSession('comment_'.$udid, '');
}
$commentInfo = InfoModel::commentList($id, 1, $limit);
$data['content'] = $this->_view->render('comment', $commentInfo);
$data['count'] = $commentInfo['comment']['commentNum'];
$this->helpJsonResult(200, '评论成功', $data);
} else {
$this->helpJsonResult(400, '评论失败', '');
}*/
}
/**
* 赞
*/
exports.praise = (req, res, next) => {
let id = req.body.id || req.query.id;
let uid = cookie.getUid(req);
let udid = ghelper.getUdid(req);
guangModel.praise(id, udid).then(ret => {
res.status(200).send(ret);
}).catch(ret => {
res.status(400).end();
});
/*$result = InfoData::setPraise($id, $udid);
if (isset($result['code']) && $result['code'] == 200) {
$this->helpJsonResult(200, '!', $result['data']);
} else {
$this->helpJsonResult(400, '', '');
}*/
}
/**
* 取消赞
*/
exports.cancelPraise = (req, res, next) =>{
let id = req.body.id || req.query.id;
let udid = ghelper.getUdid(req);
guangModel.cancelPraise(id, udid).then(ret => {
res.status(200).end();
}).catch(ret => {
res.status(400).end();
});
/*$result = InfoData::cancelPraise($id, $udid);
if (isset($result['code']) && $result['code'] == 200) {
$this->helpJsonResult(200, '', $result['data']);
} else {
$this->helpJsonResult(400, '', '');
}*/
}
/**
* 收藏
*/
exports.collect = (req, res, next) =>{
let id = req.body.id || req.query.id;
let uid = cookie.getUid(req);
if (!uid) {
return res.status(401).end()
}
guangModel.collect(id, uid).then(ret => {
res.status(200).end();
}).catch(ret => {
res.status(400).end();
});
/*
if (!$uid) {
$this->helpJsonResult(401, '', '');
}
$result = InfoData::setFavorite($id, $uid);
if (isset($result['code']) && $result['code'] == 200) {
$this->helpJsonResult(200, '', '');
} else {
$this->helpJsonResult(400, '', '');
}*/
}
/**
* 取消收藏
*/
exports.cancelCollect = (req, res, next) =>{
let id = req.body.id || req.query.id;
let uid = cookie.getUid(req);
if (!uid) {
return res.status(401).end();
}
guangModel.cancelCollect(id, uid).then(ret => {
res.status(200).end();
}).catch(ret => {
res.status(400).end();
});
/*$result = InfoData::cancelFavorite($id, $uid);
if (isset($result['code']) && $result['code'] == 200) {
$this->helpJsonResult(200, '', '');
} else {
$this->helpJsonResult(400, '', '');
}*/
}
\ No newline at end of file
... ...
... ... @@ -7,6 +7,7 @@
'use strict';
const moment = require('moment');
const md5 = require('md5');
/* COOKIE标识访问的是男生频道 */
const COOKIE_NAME_BOYS = 'boys';
... ... @@ -46,17 +47,10 @@ const getUdid = (req) => {
let udid = req.cookies.suid;
let realIp;
/* if (!udid) {
$realIP = $this->_request->getServer('HTTP_X_REAL_IP');
if ($realIP) {
$udid = md5($realIP);
}
else {
$realIP = $this->_request->getServer('REMOTE_ADDR', '');
$udid = md5($realIP);
}
}*/
if (!udid) {
realIp = req.header['HTTP_X_REAL_IP'] || req.header['REMOTE_ADDR']; //$this->_request->getServer('HTTP_X_REAL_IP'); //$this->_request->getServer('REMOTE_ADDR', '');
udid = md5(realIp);
}
return udid;
};
... ...
... ... @@ -12,7 +12,7 @@ const moment = require('moment');
const helpers = global.yoho.helpers;
const serviceApi = global.yoho.ServiceAPI;
const searchApi = global.yoho.SearchAPI;
const yohoApi = global.yoho.API;
const cache = global.yoho.cache;
const KEY_WEB_GUANG_BANNER_DATA = 'key_web_guang_banner_data';// 逛的首页banner
... ... @@ -95,6 +95,7 @@ const getPathNav = (channelType, query) => {
const _formatTag = (tagData, isApp, uid) => {
return {
tag: tagData['name'],
name : tagData['name'],
url: helpers.urlFormat('/tags/index', { query: tagData['name']}, 'guang') // urlencode(tagData['name'])
};
};
... ... @@ -268,6 +269,7 @@ const getArticleList = (gender, sortId, uid, udid, page, tag, authorId, limit, u
cache: cache
}).then(res => {
//console.log(JSON.stringify(res));
if (res && res.data) {
let artList, adsList, total = 0;
... ... @@ -406,11 +408,12 @@ const getCategory = currentSortId => {
currentSortId = currentSortId || 0;
return serviceApi.get('guang/api/v1/category/get', {}).then(res => {
let list = [];
if (res && res.code === 200 && res.data) {
for (let cat of res.data) {
if (cat.name === '专题') {
continue;
}
// if (cat.name === '专题') {
// continue;
// }
list.push({
typeId: cat.id,
... ... @@ -504,11 +507,13 @@ const getArticleInfo = aid => {
return {
title: d.article_title,
time: moment(d.publish_time).format('YYYY年MM月DD HH:mm'), // date('Y年m月d日 H:i', $article['publish_time']),
time: moment(d.publish_time * 1000).format('YYYY年MM月DD HH:mm'), // date('Y年m月d日 H:i', $article['publish_time']),
click: d.pageViews,
shareImg: helpers.image(d.cover_image, 600, 600),
desc: d.article_summary,
authorId : d.author_id,
weixinUrl: d.url,
tag : d.tag, //tags 的字符串
tags: tags,
shareImg: 'http:' + helpers.image(d.cover_image, 600, 600)
};
... ... @@ -516,11 +521,62 @@ const getArticleInfo = aid => {
});
};
const _formatProduct = (products, arr) => {
let result = [];
_.forEach(products, (val, key) => {
let goods = {
thumb : helpers.image(val.default_images, 235, 314),
name : val.product_name,
salePrice : val.sales_price,
url : helpers.getUrlBySkc(val.product_id, val.goods_list[0]['goods_id'], val.cn_alphabet),
};
if(val.market_price !== val.sales_price) {
goods.marketPrice = val.market_price;
}
_.forEach(arr, (v, k) => {
if(k == val.product_skn) {
goods.thumb = helpers.image(v, 235, 314);
return false;
}
})
result.push(goods);
});
return result;
}
/**
* 按照skn string 来查询 query=skn1,skn2,skn3
*/
const getProductList = (params, arr) => {
let finalParams = {
method: 'web.search.search',
// method: 'app.search.li',
order: 's_n_desc',
limit: 60
};
Object.assign(finalParams, params);
return yohoApi.get('', finalParams).then(ret => {
if(ret && ret.code === 200 && ret.data && ret.data.product_list) {
return _formatProduct(ret.data.product_list, arr);
}
});
};
const _articleContentFormat = {
goods: goods => {
let result = [],
productSkn = [],
let productSkn = [],
arr = {};
_.forEach(goods, (val, key) => {
... ... @@ -530,45 +586,39 @@ const _articleContentFormat = {
if (productSkn.length > 0) {
return null; // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// return searchApi.get('', {
// query : productSkn.join(',')
// }).then(products => {
// if (isset($product['data']['product_list'])) {
// $result = self::formatProduct($product['data']['product_list'], $arr);
// }
// return {};
// });
// $product = SearchData::searchElasticByCondition(array({'query' : productSkn.join(',')}));
return getProductList({
query: productSkn.join(',')
}, arr);
} else {
return null;
}
},
goodsGroup: goodsGroup => {
$result = $groupSkn = array();
let result = {}, groupSkn = {};
let result = [], groupSkn = {};
_.forEach(goodsGroup, (val, key) => {
if (val && val.list) {
let productSkn = [];
let arr = {};
groupSkn[key] = [];
for (let it of val.list) {
groupSkn[key].push(it.id);
productSkn.push(it.id);
arr[it.id] = it.src;
}
if (productSkn.length) {
return null; // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// $product = SearchData::searchElasticByCondition(array('query' => implode(',', $productSkn)));
// if (isset($product['data']['product_list'])) {
// $result[$key]['recos'] = array_slice(self::formatProduct($product['data']['product_list'], $arr), 0, 4);
// }
//包含多个对象,每对象里list都取数据,最终每个list只取前4个
let pms = getProductList({
query : productSkn.join(',')
}, arr).then(products => {
let p = products.slice(0, 4);
//console.log(JSON.stringify(p));
return p;
});
result.push(pms);
}
}
});
... ... @@ -606,9 +656,7 @@ const _articleContentFormat = {
*/
const getArticleContent = aid => {
let result = {
content: []
},
let content = [],
index = 0;
return serviceApi.get('guang/service/v2/article/getArticleContent', {
... ... @@ -617,31 +665,26 @@ const getArticleContent = aid => {
let gpromises = [], ggpromises = [];
if (res && res.contents) {
for (let cnt of res.contents) {
_.forEach(cnt, (it, key) => {
if(res && res.code === 200 && res.data) {
_.forEach(res.data, (it) => {
_.forEach(it, (val, key) => {
if (key === 'goods') {
// goods.push(_articleContentFormat.goods(it.data));
gpromises.push(_articleContentFormat.goods(it.data));
gpromises.push(_articleContentFormat.goods(val.data));
} else if (key === 'goodsGroup') {
for (let gg of it.data) {
ggpromises.push(_articleContentFormat.goodsGroup(gg.recos));
// goodsGroup.push(_articleContentFormat.goodsGroup(gg.recos));
}
//可能包含多个list,则有多个promise
ggpromises = ggpromises.concat(_articleContentFormat.goodsGroup(val.data));
} else {
let other = _.isFunction(_articleContentFormat[key]) ? _articleContentFormat[key](it.data) : '';
result.content.push(other);
let other = _.isFunction(_articleContentFormat[key]) ? _articleContentFormat[key](val.data) : '';
content.push(other);
}
});
}
});
}
index = gpromises.length;
return Promise.all(gpromises.concat(ggpromises)).then(ret => {
return ret;
});
return Promise.all(gpromises.concat(ggpromises));
}).then(res => {
... ... @@ -653,19 +696,31 @@ const getArticleContent = aid => {
goodsResult = res.slice(0, index);
goodsGroupResult = res.slice(index);
for(let gl of goodsResult) {
goods = goods.concat(gl);
}
for(let ggl of goodsGroupResult) {
goodsGroup = goodsGroup.concat(ggl);
}
if (goods.length > 0) {
result.content['relatedReco'] = {
recos: goods
};
content.push({
relatedReco : {
recos: goods
}
});
}
if (goodsGroup.length > 0) {
result.content['relatedReco'] = {
recos: goodsGroup
};
content.push({
relatedReco : {
recos: goodsGroup
}
});
}
return result;
return content;
});
};
... ... @@ -677,7 +732,7 @@ const getArticleContent = aid => {
* @param bool $onlyUrl
* @return mixed
*/
const getArticleBaseInfo = (aId, uid, udid) => {
const getArticleBaseInfo = (aid, uid, udid) => {
return serviceApi.get('guang/api/v1/article/getArticleBaseInfo', {
id: aid,
uid: uid,
... ... @@ -702,12 +757,15 @@ const getArticleRelateBrand = aid => {
article_id: aid
}).then(res => {
return _.map(res, it => {
return {
thumb: it.thumb, // Helpers::getUrlSafe($val['thumb']);
url: it.url // Helpers::getUrlSafe($val['url']);
};
});
if(res && res.code === 200 && res.data) {
return _.map(res.data, it => {
it.thumb = it.thumb; // Helpers::getUrlSafe($val['thumb']);
it.url = it.url; // Helpers::getUrlSafe($val['url']);
return it;
});
}
});
};
... ... @@ -719,7 +777,7 @@ const getArticleRelateBrand = aid => {
* @param bool $onlyUrl
* @return mixed
*/
const getRelateArticleList = (aId, tag, size) => {
const getRelateArticleList = (aid, tag, size) => {
size = size || 3;
return serviceApi.get('guang/service/v2/article/getOtherArticle', {
... ... @@ -727,16 +785,12 @@ const getRelateArticleList = (aId, tag, size) => {
tags: tag,
limit: size
}).then(res => {
return res;
if (res && res.code === 200 && res.data) {
return _.map(res.data, it => {
if (res && res.relate) {
return _.map(res.relate, it => {
return {
id: it.id,
title: it.title,
thumb: helpers.image(it.thumb, 264, 173, 1),
url: helpers.urlFormat(`/${it.id}.html`, null, 'guang')
};
it.thumb = helpers.image(it.thumb, 264, 173, 1);
it.url = helpers.urlFormat(`/detail/${it.id}.html`, null, 'guang')
return it;
});
}
});
... ... @@ -781,6 +835,66 @@ const getArticleComments = (aid, page, pageSize) => {
});
};
/**
* 文章评论提交
* @param $id
* @param $uid
* @return mixed
*/
const addComment = (aid, uid, content) => {
return serviceApi.get('guang/api/v1/comments/add', {
article_id: aid,
uid: uid,
content : content
}).then(res => {
if(res && res.code === 200) {
return res.data;
} else {
return Promise.reject('评论失败');
}
});
};
/**
* 文章点赞
* @param $id
* @param $uid
* @return mixed
*/
const praise = (aid, udid) => {
return serviceApi.get('guang/api/v2/praise/setPraise', {
article_id: aid,
udid: udid
}).then(res => {
if(res && res.code === 200) {
return res.data;
} else {
return Promise.reject('点赞失败');
}
});
};
/**
* 文章点赞
* @param $id
* @param $uid
* @return mixed
*/
const cancelPraise = (aid, udid) => {
return serviceApi.get('guang/api/v2/praise/cancel', {
article_id: aid,
udid: udid
}).then(res => {
if(res && res.code === 200) {
return res.data;
} else {
return Promise.reject('点赞失败');
}
});
};
/**
* 收藏文章
... ... @@ -788,13 +902,37 @@ const getArticleComments = (aid, page, pageSize) => {
* @param $uid
* @return mixed
*/
const collectArticle = (aid, uid) => {
const collect = (aid, uid) => {
return serviceApi.get('guang/api/v1/favorite/setFavorite', {
article_id: aid,
uid: uid
}).then(res => {
return res;
if(res && res.code === 200) {
return res.data;
} else {
return Promise.reject('收藏失败');
}
});
};
/**
* 取消收藏文章
* @param $id
* @param $uid
* @return mixed
*/
const cancelCollect = (aid, uid) => {
return serviceApi.get('guang/api/v1/favorite/cancelFavorite', {
article_id: aid,
uid: uid
}).then(res => {
if(res && res.code === 200) {
return res.data;
} else {
return Promise.reject('取消收藏失败');
}
});
};
... ... @@ -807,15 +945,19 @@ module.exports = {
getTjArticles: getTjArticles,
getPathNav: getPathNav,
getAuthor: getAuthor,
getArticleComments: getArticleComments,
collectArticle: collectArticle,
getArticleInfo: getArticleInfo,
getArticleContent: getArticleContent,
getArticleBaseInfo: getArticleBaseInfo,
getArticleRelateBrand: getArticleRelateBrand,
getRelateArticleList: getRelateArticleList,
getArticleComments: getArticleComments
getArticleComments: getArticleComments,
addComment : addComment,
praise : praise,
cancelPraise : cancelPraise,
collect : collect,
cancelCollect : cancelCollect
};
... ...
... ... @@ -14,12 +14,16 @@ const guangController = require(`${cRoot}/index`);
router.get('/', guangController.index);
router.get('/index/index', guangController.index);
router.get('/detail/:id', guangController.detail); // guang/info/index
router.get('/info/index', guangController.detail);
router.get('/tags/index', guangController.tags);
router.get('/Index/editor', guangController.editor);
// ajax
// router.get('/getbrandFloorDataAjax', guangController.getbrandFloorDataAjax);
// router.post('/common/getNewArrival', guangController.getNewArrival);
// router.get('/guide', guangController.getIndexGuide);
router.post('/info/comment', guangController.comment); //添加评论
router.get('/info/praise', guangController.praise); //点赞
router.get('/info/cancelPraise', guangController.cancelPraise);
router.get('/info/collect', guangController.collect);
router.get('/info/cancelCollect', guangController.cancelCollect);
module.exports = router;
... ...
{{> comment}}
\ No newline at end of file
... ...
... ... @@ -85,7 +85,7 @@
</li>
<li id="collect-btn" class="sort-collect{{#isCollected}} collected{{/isCollected}}">
<a href="javascript:;">
<i class="iconfont">&#xe616;</i>
<i class="iconfont">&#xe611;</i>
<span>收藏</span>
<span class="cancel-collect">取消收藏</span>
</a>
... ...
<span class="share-wrapper share-to pull-left clearfix">
<i class="weibo" data-type="weibo" title="分享到新浪微博"></i>
<i class="weixin" data-type="weixin" title="分享到微信朋友圈"></i>
<i class="tweibo" data-type="tweibo" title="分享到腾讯微博"></i>
<i class="qzone" data-type="qzone" title="分享到QQ空间"></i>
<i class="qq" data-type="qq" title="分享到QQ好友"></i>
<i class="renren" data-type="renren" title="分享到人人"></i>
<i class="douban" data-type="douban" title="分享到豆瓣"></i>
<div class="weixin-share-box"></div>
</span>
<input id="share-img" type="hidden" value="{{shareImg}}">
<input id="share-desc" type="hidden" value="{{shareDesc}}">
<input id="weixin-url" type="hidden" value="{{weixinUrl}}">
\ No newline at end of file
... ...
... ... @@ -9,7 +9,7 @@ var $ = require('yoho-jquery');
var msg = require('./msg');
require('yoho-jquery-pjax');
require('yoho-slider');
require('../plugins/slider');
require('./img-blink');
... ...