Authored by 2586703@qq.com

detail.js

var yohobuyMobile;
require('./public/js/article-type-three');
require('./public/js/related-post');
require('./public/js/detail');
module.exports = yohobuyMobile;
... ...
... ... @@ -31,13 +31,13 @@
</script>
<script src="//localhost:5000/dist/all-debug.js"></script>
<script type="text/javascript">
seajs.use(['yohobuy-mobile/1.0.0/public/js/article-type-three-debug','yohobuy-mobile/1.0.0/public/js/related-post-debug'], function(article,relatedPost) {
seajs.use(['yohobuy-mobile/1.0.0/public/js/article-type-three-debug','yohobuy-mobile/1.0.0/public/js/detail-debug'], function(article,detail) {
if (article) {
article.init();
}
if(relatedPost) {
relatedPost.init();
if(detail) {
detail.init();
}
});
</script>
... ...
... ... @@ -15,7 +15,8 @@
"dependencies": {
"jquery": "1.8.3",
"jquery-pjax": "1.0.1",
"mlellipsis": "0.0.2"
"mlellipsis": "0.0.2",
"lazyload": "1.9.5"
},
"devDependencies": {
"expect.js": "0.3.1"
... ...
... ... @@ -27,7 +27,7 @@ module.exports = function() {
list: [
{
thumb: 'http://placehold.it/98x134',
type: 'cloth',
type: 'shoe',
products: [
{
thumb: 'http://placehold.it/276x366',
... ...
/**
* 相关文章
* detail相关js
* @author: yue.liu@yoho.cn
* @date;2015/3/31
*/
... ... @@ -13,5 +13,4 @@ exports.init = function() {
$(".post-list").find("span").each(function(){
$(this).mlellipsis(2);
})
}
}
\ No newline at end of file
... ...