...
|
...
|
@@ -822,6 +822,42 @@ const cancelCollect = (aid, uid) => serviceApi.get('guang/api/v1/favorite/cancel |
|
|
uid: uid
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
* 获取制指定文章的动态信息
|
|
|
* @param ids
|
|
|
* @returns {Promise.<T>|*}
|
|
|
*/
|
|
|
const getDynamicDataById = id => {
|
|
|
return serviceApi.get('', {
|
|
|
id: id
|
|
|
}).then(res => {
|
|
|
|
|
|
if (res && res.code === 200 && res.data) {
|
|
|
return res.data;
|
|
|
}
|
|
|
|
|
|
return Promise.reject('获取失败');
|
|
|
});
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 获取制指定文章的动态信息
|
|
|
* @param ids
|
|
|
* @returns {Promise.<T>|*}
|
|
|
*/
|
|
|
const getDynamicDataByIds = ids => {
|
|
|
return serviceApi.get('', {
|
|
|
ids: ids
|
|
|
}).then(res => {
|
|
|
|
|
|
if (res && res.code === 200 && res.data) {
|
|
|
return res.data;
|
|
|
}
|
|
|
|
|
|
return Promise.reject('获取失败');
|
|
|
});
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
|
|
getArticleList,
|
|
|
getHotTags,
|
...
|
...
|
@@ -843,7 +879,10 @@ module.exports = { |
|
|
praise,
|
|
|
cancelPraise,
|
|
|
collect,
|
|
|
cancelCollect
|
|
|
cancelCollect,
|
|
|
|
|
|
getDynamicDataById,
|
|
|
getDynamicDataByIds
|
|
|
};
|
|
|
|
|
|
|
...
|
...
|
|