@jx3box/jx3box-common-ui 9.3.7 → 9.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/service/author.js +2 -2
- package/src/SuspendCommon.vue +6 -7
package/package.json
CHANGED
package/service/author.js
CHANGED
|
@@ -48,8 +48,8 @@ function getDouyu(ids) {
|
|
|
48
48
|
}
|
|
49
49
|
// 获取用户勋章
|
|
50
50
|
function getUserMedals(uid, params) {
|
|
51
|
-
return $
|
|
52
|
-
.get("/api/
|
|
51
|
+
return $next({ mute: true })
|
|
52
|
+
.get("/api/next2/user/" + uid + "/medals", {
|
|
53
53
|
params
|
|
54
54
|
})
|
|
55
55
|
.then((res) => {
|
package/src/SuspendCommon.vue
CHANGED
|
@@ -495,6 +495,7 @@ export default {
|
|
|
495
495
|
},
|
|
496
496
|
//获取收藏信息
|
|
497
497
|
getCollectInfo() {
|
|
498
|
+
if(!this.drawerConfig.id && !this.drawerConfig.postType) return;
|
|
498
499
|
getCollectList(this.drawerConfig.id, this.drawerConfig.postType).then(res => {
|
|
499
500
|
this.collectInfo = res.data.data
|
|
500
501
|
this.isCollect = this.collectInfo?.id > 0
|
|
@@ -569,31 +570,29 @@ export default {
|
|
|
569
570
|
getSubscribeInfo() {
|
|
570
571
|
let drawerConfig = this.drawerConfig
|
|
571
572
|
// 作者相关接口
|
|
572
|
-
if (drawerConfig.subscribeType === 'author') {
|
|
573
|
-
|
|
573
|
+
if (drawerConfig.subscribeType === 'author' && drawerConfig.author.author_id) {
|
|
574
|
+
getSubscribeStatus(drawerConfig.author.author_id).then(res => {
|
|
574
575
|
this.isSubscribe = res.data.data?.subscribed
|
|
575
576
|
this.subscribeInfo = res.data.data
|
|
576
577
|
})
|
|
577
578
|
}
|
|
578
579
|
//帖子
|
|
579
|
-
if (drawerConfig.subscribeType === 'community') {
|
|
580
|
+
if (drawerConfig.subscribeType === 'community' && drawerConfig.id) {
|
|
580
581
|
getSubscribePostStatus(drawerConfig.id).then(res => {
|
|
581
|
-
|
|
582
582
|
this.isSubscribe = res.data.data?.subscribed
|
|
583
583
|
this.subscribeInfo = res.data.data
|
|
584
584
|
})
|
|
585
585
|
}
|
|
586
586
|
//文章
|
|
587
|
-
if (drawerConfig.subscribeType === 'posts') {
|
|
587
|
+
if (drawerConfig.subscribeType === 'posts' && drawerConfig.id && drawerConfig.postType) {
|
|
588
588
|
getSubscribeArticleStatus(drawerConfig.postType, drawerConfig.id).then(res => {
|
|
589
589
|
this.isSubscribe = res.data.data?.subscribed
|
|
590
590
|
this.subscribeInfo = res.data.data
|
|
591
591
|
})
|
|
592
592
|
}
|
|
593
593
|
//百科
|
|
594
|
-
if (drawerConfig.subscribeType === 'wiki') {
|
|
594
|
+
if (drawerConfig.subscribeType === 'wiki' && drawerConfig.id && drawerConfig.postType) {
|
|
595
595
|
getSubscribeWikiStatus(drawerConfig.postType, drawerConfig.id).then(res => {
|
|
596
|
-
|
|
597
596
|
this.isSubscribe = res.data.data?.subscribed
|
|
598
597
|
this.subscribeInfo = res.data.data
|
|
599
598
|
|