...
|
...
|
@@ -55,16 +55,17 @@ const _processListData = (list) => { |
|
|
listData = _.assign(listData, {
|
|
|
total: list.total
|
|
|
});
|
|
|
|
|
|
// console.log(list)
|
|
|
|
|
|
_.forEach(list.list.artList, (data, index) => {
|
|
|
_.forEach(list.list.artList, (data) => {
|
|
|
|
|
|
if (data.author) {
|
|
|
listData = _.assign(listData, {
|
|
|
authorName: data.author.name
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
data.publishTime = data.publishTime.replace(/年|月/g, '/');
|
|
|
data.publishTime = data.publishTime.replace(/日/g, '');
|
|
|
|
...
|
...
|
@@ -72,6 +73,7 @@ const _processListData = (list) => { |
|
|
|
|
|
});
|
|
|
listData.tabs = list.list.artList;
|
|
|
// console.log(listData)
|
|
|
|
|
|
return listData;
|
|
|
};
|
...
|
...
|
@@ -262,7 +264,7 @@ const _processHeadData = (list) => { |
|
|
const _getRelatedData = (sknList) => {
|
|
|
// console.log(id);
|
|
|
return api.get('', {
|
|
|
//query: '51152761,51178582,51146105,51149561,51149414,51082157,51079256,',
|
|
|
// query: '51152761,51178582,51146105,51149561,51149414,51082157,51079256,',
|
|
|
qurey: sknList,
|
|
|
method: 'app.search.li'
|
|
|
}).then((result) => {
|
...
|
...
|
@@ -336,34 +338,35 @@ const _processContentData = (list) => { |
|
|
|
|
|
if (value.goodsGroup) {
|
|
|
|
|
|
_.forEach(value.goodsGroup.data, function(data) {
|
|
|
// console.log(data)
|
|
|
_.forEach(data.list, function(value) {
|
|
|
sknList += value.id + ',';
|
|
|
|
|
|
formatData.push(value);
|
|
|
|
|
|
});
|
|
|
});
|
|
|
// _.forEach(value.goodsGroup.data, function(data) {
|
|
|
// // console.log(data)
|
|
|
// // _.forEach(data.list, function(value) {
|
|
|
// // sknList += value.id + ',';
|
|
|
|
|
|
// // formatData.push(value);
|
|
|
|
|
|
// // });
|
|
|
// });
|
|
|
}
|
|
|
});
|
|
|
|
|
|
_getRelatedData(sknList).then((result) => {
|
|
|
|
|
|
_.forEach(formatData, function(data, index) {
|
|
|
//console.log(formatData)
|
|
|
// console.log(formatData)
|
|
|
|
|
|
data[index] = _.assign(result[index]);
|
|
|
|
|
|
|
|
|
});
|
|
|
//console.log(formatData)
|
|
|
|
|
|
// console.log(formatData)
|
|
|
return formatData;
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
return contentData;
|
|
|
return contentData;
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -511,7 +514,7 @@ const cancelCollect = (id, uid, appType) => { |
|
|
*/
|
|
|
const setPraise = (id, udid, appType) => {
|
|
|
|
|
|
return serviceAPI.get('/guang/api/*/praise/setPraise', {
|
|
|
return serviceAPI.get('/guang/api/v2/praise/setPraise', {
|
|
|
article_id: id,
|
|
|
udid: udid,
|
|
|
app_type: appType
|
...
|
...
|
@@ -526,7 +529,7 @@ const setPraise = (id, udid, appType) => { |
|
|
*/
|
|
|
const cancelPraise = (id, udid, appType) => {
|
|
|
|
|
|
return serviceAPI.get('/guang/api/*/praise/cancel', {
|
|
|
return serviceAPI.get('/guang/api/v2/praise/cancel', {
|
|
|
article_id: id,
|
|
|
udid: udid,
|
|
|
app_type: appType
|
...
|
...
|
|