|
@@ -53,8 +53,6 @@ const _processListData = (list) => { |
|
@@ -53,8 +53,6 @@ const _processListData = (list) => { |
53
|
return listData;
|
53
|
return listData;
|
54
|
};
|
54
|
};
|
55
|
|
55
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
/**
|
56
|
/**
|
59
|
* 首页、列表页列表相关
|
57
|
* 首页、列表页列表相关
|
60
|
* @param type
|
58
|
* @param type
|
|
@@ -121,7 +119,7 @@ const getListData = (appType, pageNum, limit, udid, gender, tag, authorId) => { |
|
@@ -121,7 +119,7 @@ const getListData = (appType, pageNum, limit, udid, gender, tag, authorId) => { |
121
|
*/
|
119
|
*/
|
122
|
const _getAuthorData = (id) => {
|
120
|
const _getAuthorData = (id) => {
|
123
|
|
121
|
|
124
|
- return serviceAPI.get('/guang/service/*/author/getAuthor', {
|
122
|
+ return serviceAPI.get('guang/service/*/author/getAuthor', {
|
125
|
author_id: id
|
123
|
author_id: id
|
126
|
}).then((result) => {
|
124
|
}).then((result) => {
|
127
|
if (result && result.code === 200) {
|
125
|
if (result && result.code === 200) {
|
|
@@ -182,7 +180,6 @@ const _processHeadData = (list) => { |
|
@@ -182,7 +180,6 @@ const _processHeadData = (list) => { |
182
|
|
180
|
|
183
|
}
|
181
|
}
|
184
|
|
182
|
|
185
|
-
|
|
|
186
|
if (index === 2) {
|
183
|
if (index === 2) {
|
187
|
newData.headData = _.assign(newData.headData, {
|
184
|
newData.headData = _.assign(newData.headData, {
|
188
|
commentNum: data.total
|
185
|
commentNum: data.total
|
|
@@ -358,7 +355,7 @@ const _getHeadData = (id, appType, uid, udid) => { |
|
@@ -358,7 +355,7 @@ const _getHeadData = (id, appType, uid, udid) => { |
358
|
par.udid = udid;
|
355
|
par.udid = udid;
|
359
|
}
|
356
|
}
|
360
|
|
357
|
|
361
|
- return serviceAPI.get('/guang/api/*/article/getArticleBaseInfo', par).then((result) => {
|
358
|
+ return serviceAPI.get('guang/api/*/article/getArticleBaseInfo', par).then((result) => {
|
362
|
if (result && result.code === 200) {
|
359
|
if (result && result.code === 200) {
|
363
|
return result.data;
|
360
|
return result.data;
|
364
|
} else {
|
361
|
} else {
|
|
@@ -374,7 +371,7 @@ const _getHeadData = (id, appType, uid, udid) => { |
|
@@ -374,7 +371,7 @@ const _getHeadData = (id, appType, uid, udid) => { |
374
|
* @returns {*}
|
371
|
* @returns {*}
|
375
|
*/
|
372
|
*/
|
376
|
const _getContentData = (id) => {
|
373
|
const _getContentData = (id) => {
|
377
|
- return serviceAPI.get('/guang/service/*/article/getArticleContent', {
|
374
|
+ return serviceAPI.get('guang/service/*/article/getArticleContent', {
|
378
|
article_id: id
|
375
|
article_id: id
|
379
|
}).then((result) => {
|
376
|
}).then((result) => {
|
380
|
if (result && result.code === 200) {
|
377
|
if (result && result.code === 200) {
|
|
@@ -392,7 +389,7 @@ const _getContentData = (id) => { |
|
@@ -392,7 +389,7 @@ const _getContentData = (id) => { |
392
|
* @returns {*}
|
389
|
* @returns {*}
|
393
|
*/
|
390
|
*/
|
394
|
const _getArticleData = (id) => {
|
391
|
const _getArticleData = (id) => {
|
395
|
- return serviceAPI.get('/guang/service/v2/article/getArticle', {
|
392
|
+ return serviceAPI.get('guang/service/v2/article/getArticle', {
|
396
|
article_id: id
|
393
|
article_id: id
|
397
|
}).then((result) => {
|
394
|
}).then((result) => {
|
398
|
if (result && result.code === 200) {
|
395
|
if (result && result.code === 200) {
|
|
@@ -410,7 +407,7 @@ const _getArticleData = (id) => { |
|
@@ -410,7 +407,7 @@ const _getArticleData = (id) => { |
410
|
* @returns {*}
|
407
|
* @returns {*}
|
411
|
*/
|
408
|
*/
|
412
|
const _getCommentsData = (id) => {
|
409
|
const _getCommentsData = (id) => {
|
413
|
- return serviceAPI.get('/guang/api/*/comments/getList', {
|
410
|
+ return serviceAPI.get('guang/api/*/comments/getList', {
|
414
|
article_id: id
|
411
|
article_id: id
|
415
|
}).then((result) => {
|
412
|
}).then((result) => {
|
416
|
if (result && result.code === 200) {
|
413
|
if (result && result.code === 200) {
|
|
@@ -457,7 +454,7 @@ const _getRelateBrand = (id) => { |
|
@@ -457,7 +454,7 @@ const _getRelateBrand = (id) => { |
457
|
* @returns {*}
|
454
|
* @returns {*}
|
458
|
*/
|
455
|
*/
|
459
|
const _getArticlePre = (id, appType) => {
|
456
|
const _getArticlePre = (id, appType) => {
|
460
|
- return serviceAPI.get('/guang/api/*/article/getArticlePre', {
|
457
|
+ return serviceAPI.get('guang/api/*/article/getArticlePre', {
|
461
|
id: id,
|
458
|
id: id,
|
462
|
app_type: appType
|
459
|
app_type: appType
|
463
|
}).then((result) => {
|
460
|
}).then((result) => {
|
|
@@ -491,7 +488,7 @@ const _getArticlePre = (id, appType) => { |
|
@@ -491,7 +488,7 @@ const _getArticlePre = (id, appType) => { |
491
|
* @returns {*}
|
488
|
* @returns {*}
|
492
|
*/
|
489
|
*/
|
493
|
const _getArticleNext = (id, appType) => {
|
490
|
const _getArticleNext = (id, appType) => {
|
494
|
- return serviceAPI.get('/guang/api/*/article/getArticleNext', {
|
491
|
+ return serviceAPI.get('guang/api/*/article/getArticleNext', {
|
495
|
id: id,
|
492
|
id: id,
|
496
|
app_type: appType
|
493
|
app_type: appType
|
497
|
}).then((result) => {
|
494
|
}).then((result) => {
|
|
@@ -534,7 +531,7 @@ const setCollect = (id, uid, appType) => { |
|
@@ -534,7 +531,7 @@ const setCollect = (id, uid, appType) => { |
534
|
message: '未登录'
|
531
|
message: '未登录'
|
535
|
});
|
532
|
});
|
536
|
}
|
533
|
}
|
537
|
- return serviceAPI.get('/guang/api/*/favorite/setFavorite', {
|
534
|
+ return serviceAPI.get('guang/api/*/favorite/setFavorite', {
|
538
|
article_id: id,
|
535
|
article_id: id,
|
539
|
uid: uid,
|
536
|
uid: uid,
|
540
|
app_type: appType
|
537
|
app_type: appType
|
|
@@ -554,7 +551,7 @@ const cancelCollect = (id, uid, appType) => { |
|
@@ -554,7 +551,7 @@ const cancelCollect = (id, uid, appType) => { |
554
|
message: '未登录'
|
551
|
message: '未登录'
|
555
|
});
|
552
|
});
|
556
|
}
|
553
|
}
|
557
|
- return serviceAPI.get('/guang/api/*/favorite/cancelFavorite', {
|
554
|
+ return serviceAPI.get('guang/api/*/favorite/cancelFavorite', {
|
558
|
article_id: id,
|
555
|
article_id: id,
|
559
|
uid: uid,
|
556
|
uid: uid,
|
560
|
app_type: appType
|
557
|
app_type: appType
|
|
@@ -569,7 +566,7 @@ const cancelCollect = (id, uid, appType) => { |
|
@@ -569,7 +566,7 @@ const cancelCollect = (id, uid, appType) => { |
569
|
*/
|
566
|
*/
|
570
|
const setPraise = (id, udid, appType) => {
|
567
|
const setPraise = (id, udid, appType) => {
|
571
|
|
568
|
|
572
|
- return serviceAPI.get('/guang/api/v2/praise/setPraise', {
|
569
|
+ return serviceAPI.get('guang/api/v2/praise/setPraise', {
|
573
|
article_id: id,
|
570
|
article_id: id,
|
574
|
udid: udid,
|
571
|
udid: udid,
|
575
|
app_type: appType
|
572
|
app_type: appType
|
|
@@ -584,7 +581,7 @@ const setPraise = (id, udid, appType) => { |
|
@@ -584,7 +581,7 @@ const setPraise = (id, udid, appType) => { |
584
|
*/
|
581
|
*/
|
585
|
const cancelPraise = (id, udid, appType) => {
|
582
|
const cancelPraise = (id, udid, appType) => {
|
586
|
|
583
|
|
587
|
- return serviceAPI.get('/guang/api/v2/praise/cancel', {
|
584
|
+ return serviceAPI.get('guang/api/v2/praise/cancel', {
|
588
|
article_id: id,
|
585
|
article_id: id,
|
589
|
udid: udid,
|
586
|
udid: udid,
|
590
|
app_type: appType
|
587
|
app_type: appType
|
|
@@ -605,7 +602,7 @@ const addComment = (id, uid, comment) => { |
|
@@ -605,7 +602,7 @@ const addComment = (id, uid, comment) => { |
605
|
message: '未登录'
|
602
|
message: '未登录'
|
606
|
});
|
603
|
});
|
607
|
}
|
604
|
}
|
608
|
- return serviceAPI.get('/guang/api/*/comments/add', {
|
605
|
+ return serviceAPI.get('guang/api/*/comments/add', {
|
609
|
article_id: id,
|
606
|
article_id: id,
|
610
|
uid: uid,
|
607
|
uid: uid,
|
611
|
content: comment
|
608
|
content: comment
|
|
@@ -613,7 +610,7 @@ const addComment = (id, uid, comment) => { |
|
@@ -613,7 +610,7 @@ const addComment = (id, uid, comment) => { |
613
|
};
|
610
|
};
|
614
|
|
611
|
|
615
|
const shareData = () => {
|
612
|
const shareData = () => {
|
616
|
- return serviceAPI.get('/guang/api/*/share/guang', {}).then((result) => {
|
613
|
+ return serviceAPI.get('guang/api/*/share/guang', {}).then((result) => {
|
617
|
if (result && result.code === 200) {
|
614
|
if (result && result.code === 200) {
|
618
|
return camelCase(result.data);
|
615
|
return camelCase(result.data);
|
619
|
} else {
|
616
|
} else {
|