Showing
5 changed files
with
14 additions
and
2 deletions
@@ -180,6 +180,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -180,6 +180,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
180 | '点击这里', | 180 | '点击这里', |
181 | '点这里' | 181 | '点这里' |
182 | ]); | 182 | ]); |
183 | + | ||
183 | content = utils.filterAhtml(content); | 184 | content = utils.filterAhtml(content); |
184 | return {header: header, content: utils.imgAlt(content, contents.title, 5)}; | 185 | return {header: header, content: utils.imgAlt(content, contents.title, 5)}; |
185 | } | 186 | } |
@@ -54,10 +54,11 @@ const util = { | @@ -54,10 +54,11 @@ const util = { | ||
54 | 54 | ||
55 | let $ = cheerio.load(html, {decodeEntities: false}); | 55 | let $ = cheerio.load(html, {decodeEntities: false}); |
56 | 56 | ||
57 | - _.each($(`img`).slice(0, num), item => { | 57 | + _.each($('img').slice(0, num), item => { |
58 | let $dom = $(item); | 58 | let $dom = $(item); |
59 | + | ||
59 | $dom.attr('alt', $dom.attr('alt') || alt); | 60 | $dom.attr('alt', $dom.attr('alt') || alt); |
60 | - }) | 61 | + }); |
61 | 62 | ||
62 | html = $.html(); | 63 | html = $.html(); |
63 | $ = ''; | 64 | $ = ''; |
@@ -16,6 +16,7 @@ | @@ -16,6 +16,7 @@ | ||
16 | <a class="author-name" href="{{authorUrl}}">{{name}}</a> | 16 | <a class="author-name" href="{{authorUrl}}">{{name}}</a> |
17 | </div> | 17 | </div> |
18 | {{/if}} | 18 | {{/if}} |
19 | + <div class="article-source">文章来源于:微信</div> | ||
19 | <div class="article-status clearfix"> | 20 | <div class="article-status clearfix"> |
20 | {{#if time}} | 21 | {{#if time}} |
21 | <span class="article-time"> | 22 | <span class="article-time"> |
@@ -99,6 +99,14 @@ | @@ -99,6 +99,14 @@ | ||
99 | } | 99 | } |
100 | } | 100 | } |
101 | 101 | ||
102 | + .article-source { | ||
103 | + float: left; | ||
104 | + height: 64px; | ||
105 | + line-height: 64px; | ||
106 | + color: #999; | ||
107 | + font-size: 13px; | ||
108 | + } | ||
109 | + | ||
102 | .article-status { | 110 | .article-status { |
103 | float: right; | 111 | float: right; |
104 | height: 64px; | 112 | height: 64px; |
-
Please register or login to post a comment