...
|
...
|
@@ -291,7 +291,7 @@ export default { |
|
|
[Types.FETCH_ARTICLE_SINGLE_DETAIL_REQUEST](state, topicId) {
|
|
|
state.fetchArticleSingleDetail = true;
|
|
|
},
|
|
|
[Types.FETCH_ARTICLE_SINGLE_DETAIL_SUCCESS](state, {data, thumb, articleId, result}) {
|
|
|
[Types.FETCH_ARTICLE_SINGLE_DETAIL_SUCCESS](state, {data, thumb, local, articleId, result}) {
|
|
|
state.fetchArticleSingleDetail = false;
|
|
|
|
|
|
let article = data[0] || {
|
...
|
...
|
@@ -310,6 +310,11 @@ export default { |
|
|
article.favoriteCount = 0;
|
|
|
article.praiseCount = 0;
|
|
|
}
|
|
|
article.local = local;
|
|
|
|
|
|
if (local) {
|
|
|
article.authorHeadIco = article.authorHeadIco.replace(/^https?:/, '');
|
|
|
}
|
|
|
|
|
|
if (article.sort === 2) {
|
|
|
let {width, height} = getArticleImageSize({
|
...
|
...
|
@@ -321,7 +326,7 @@ export default { |
|
|
article.imageWidth = parseInt(width, 10);
|
|
|
article.imageHeight = parseInt(height, 10);
|
|
|
|
|
|
if (thumb) {
|
|
|
if (local) {
|
|
|
article.coverImage = (article.coverImage || '').replace(/^https?:/, '');
|
|
|
}
|
|
|
} else {
|
...
|
...
|
@@ -334,7 +339,7 @@ export default { |
|
|
minScale: inx === 0 ? (3 / 4) : 0
|
|
|
});
|
|
|
|
|
|
if (thumb) {
|
|
|
if (local) {
|
|
|
img.contentData = img.contentData.replace(/^https?:/, '');
|
|
|
}
|
|
|
|
...
|
...
|
@@ -345,7 +350,7 @@ export default { |
|
|
|
|
|
const thumbArticle = state.articleSingleDetail[article.articleId];
|
|
|
|
|
|
if (thumbArticle && thumbArticle.thumb) {
|
|
|
if (thumbArticle && thumbArticle.local) {
|
|
|
if (article.sort === 2) {
|
|
|
article.bigImage = article.coverImage;
|
|
|
article.coverImage = thumbArticle.coverImage;
|
...
|
...
|
|