...
|
...
|
@@ -105,6 +105,7 @@ const _formatArticle = (articleData, showTag, showAuthor) => { |
|
|
height = 360,
|
|
|
isSquareImage = true;
|
|
|
|
|
|
|
|
|
if (articleData.conver_image_type === 2) {
|
|
|
width = 360;
|
|
|
height = 240;
|
...
|
...
|
@@ -133,7 +134,7 @@ const _formatArticle = (articleData, showTag, showAuthor) => { |
|
|
};
|
|
|
}
|
|
|
|
|
|
// result.author = articleData.author.name;
|
|
|
result.author = articleData.author.name;
|
|
|
|
|
|
let authorId = articleData.author.author_id;
|
|
|
|
...
|
...
|
@@ -253,11 +254,11 @@ const getArticleList = (gender, sortId, uid, udid, page, tag, authorId, limit, u |
|
|
let list = res.data.list;
|
|
|
|
|
|
if (list.artList) {
|
|
|
artList = _.map(list.artList, it => _formatArticle(it, true, false, uid));
|
|
|
artList = _.map(list.artList, it => _formatArticle(it, true, false));
|
|
|
}
|
|
|
|
|
|
if (list.adlist) {
|
|
|
adsList = _.map(list.artList, it => _formatAd(it, uid));
|
|
|
adsList = _.map(list.artList, it => _formatAd(it));
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -438,7 +439,6 @@ const getArticleInfo = aid => { |
|
|
}).then(res => {
|
|
|
if (res && res.code === 200 && res.data) {
|
|
|
let d = res.data;
|
|
|
|
|
|
let tags = [];
|
|
|
|
|
|
if (d.tags) {
|
...
|
...
|
@@ -466,6 +466,7 @@ const _formatProduct = (products, arr) => { |
|
|
let result = [];
|
|
|
|
|
|
_.forEach(products, val => {
|
|
|
|
|
|
let goods = {
|
|
|
thumb: helpers.image(val.default_images, 235, 314),
|
|
|
name: val.product_name,
|
...
|
...
|
@@ -738,30 +739,28 @@ const getArticleComments = (aid, page, pageSize) => { |
|
|
pageSize: pageSize
|
|
|
}).then(res => {
|
|
|
|
|
|
if (res && res.code === 200) {
|
|
|
let num = (res.data && res.data.total) || 0;
|
|
|
let list = [];
|
|
|
let num = (res.data && res.data.total) || 0;
|
|
|
let list = [];
|
|
|
|
|
|
if (num > 0 && res.data.list) {
|
|
|
let iList = res.data.list;
|
|
|
if (num > 0 && res.data.list) {
|
|
|
let iList = res.data.list;
|
|
|
|
|
|
for (let i = 0; i < iList.length; i++) {
|
|
|
let it = iList[i];
|
|
|
for (let i = 0; i < iList.length; i++) {
|
|
|
let it = iList[i];
|
|
|
|
|
|
list.push({
|
|
|
avatar: helpers.image(it.avator, 100, 100),
|
|
|
name: it.username,
|
|
|
content: it.content,
|
|
|
time: it.create_time
|
|
|
});
|
|
|
}
|
|
|
list.push({
|
|
|
avatar: helpers.image(it.avator, 100, 100),
|
|
|
name: it.username,
|
|
|
content: it.content,
|
|
|
time: it.create_time
|
|
|
});
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
commentNum: num,
|
|
|
list: list
|
|
|
};
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
commentNum: num,
|
|
|
list: list
|
|
|
};
|
|
|
});
|
|
|
};
|
|
|
|
...
|
...
|
|