...
|
...
|
@@ -344,10 +344,9 @@ const _processContentData = (list) => { |
|
|
* @returns {*}
|
|
|
*/
|
|
|
|
|
|
const _getHeadData = (id, uid, udid, appType) => {
|
|
|
const _getHeadData = (id, appType, uid, udid) => {
|
|
|
let par = {
|
|
|
id: id,
|
|
|
udid: udid,
|
|
|
app_type: appType
|
|
|
};
|
|
|
|
...
|
...
|
@@ -355,6 +354,10 @@ const _getHeadData = (id, uid, udid, appType) => { |
|
|
par.uid = uid;
|
|
|
}
|
|
|
|
|
|
if (udid) {
|
|
|
par.udid = udid;
|
|
|
}
|
|
|
|
|
|
return serviceAPI.get('/guang/api/*/article/getArticleBaseInfo', par).then((result) => {
|
|
|
if (result && result.code === 200) {
|
|
|
return result.data;
|
...
|
...
|
@@ -458,18 +461,19 @@ const _getArticlePre = (id, appType) => { |
|
|
id: id,
|
|
|
app_type: appType
|
|
|
}).then((result) => {
|
|
|
console.log(result);
|
|
|
console.log(result.message);
|
|
|
if (result && result.code === 200) {
|
|
|
let perArticle = {};
|
|
|
let id = result.data.articleIdPre;
|
|
|
|
|
|
perArticle.href = `${config.siteUrl}/editorial/${result.data.articleIdPre}.html`;
|
|
|
|
|
|
_getHeadData(result.data.articleIdPre, appType).then((list) => {
|
|
|
|
|
|
console.log()
|
|
|
_getHeadData(id, appType).then((list) => {
|
|
|
console.log(list)
|
|
|
perArticle.lastChapter = list.title;
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
console.log(perArticle)
|
|
|
return perArticle;
|
|
|
});
|
|
|
|
...
|
...
|
@@ -491,7 +495,7 @@ const _getArticleNext = (id, appType) => { |
|
|
id: id,
|
|
|
app_type: appType
|
|
|
}).then((result) => {
|
|
|
|
|
|
// console.log(result)
|
|
|
if (result && result.code === 200) {
|
|
|
|
|
|
let nextArticle = {};
|
...
|
...
|
@@ -624,7 +628,7 @@ const shareData = () => { |
|
|
*/
|
|
|
const getDetailData = (id, uid, udid, appType) => {
|
|
|
return co(function *() {
|
|
|
let result = yield Promise.all([_getHeadData(id, uid, udid, appType),
|
|
|
let result = yield Promise.all([_getHeadData(id, appType, uid, udid),
|
|
|
_getArticleData(id),
|
|
|
_getContentData(id),
|
|
|
_getCommentsData(id),
|
...
|
...
|
|