...
|
...
|
@@ -9,7 +9,7 @@ |
|
|
</div>
|
|
|
</template>
|
|
|
<template v-if="showHeader" v-slot:opts>
|
|
|
<WidgetFollow :share="share" class="widget-follow" :author-uid="currentAuthor.authorUid" :follow="currentAuthor.hasAttention === 'Y'" @on-follow="follow => onFollow(currentAuthor, follow)" :pos-id="posId"></WidgetFollow>
|
|
|
<WidgetFollow v-show="showHeaderAttention" :share="share" class="widget-follow" :author-uid="currentAuthor.authorUid" :follow="currentAuthor.hasAttention === 'Y'" @on-follow="follow => onFollow(currentAuthor, follow)" :pos-id="posId"></WidgetFollow>
|
|
|
</template>
|
|
|
</LayoutHeader>
|
|
|
<LayoutRecycleList :size="10" :thumbs="thumbs" ref="scroll" @scroll="onScroll" :offset="2000" :on-fetch="onFetch"
|
...
|
...
|
@@ -22,6 +22,7 @@ |
|
|
:share="share"
|
|
|
:article-id="data.data.articleId"
|
|
|
:pos-id="posId"
|
|
|
:user-uid="userUid"
|
|
|
@on-follow="follow => onFollow(data.data, follow)"
|
|
|
@on-resize="onResize"
|
|
|
@on-unlock-height="onUnlockHeight"
|
...
|
...
|
@@ -72,7 +73,8 @@ export default { |
|
|
return [];
|
|
|
}
|
|
|
},
|
|
|
posId: Number
|
|
|
posId: Number,
|
|
|
userUid: Number
|
|
|
},
|
|
|
mounted() {
|
|
|
this.scrollEvent = throttle(this.onDounceScroll.bind(this), 100);
|
...
|
...
|
@@ -97,7 +99,7 @@ export default { |
|
|
hasAttention: 'N',
|
|
|
isShare: false,
|
|
|
authorType: 1
|
|
|
},
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
activated() {
|
...
|
...
|
@@ -106,7 +108,12 @@ export default { |
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['yoho'])
|
|
|
...mapState(['yoho']),
|
|
|
showHeaderAttention() {
|
|
|
return !(this.currentAuthor.authorUid &&
|
|
|
+this.currentAuthor.authorUid === this.userUid &&
|
|
|
+this.currentAuthor.authorType === 1);
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations(['ASYNC_ARTICLE_COMMENT', 'CHANGE_AUTHOR_FOLLOW']),
|
...
|
...
|
@@ -138,13 +145,8 @@ export default { |
|
|
});
|
|
|
},
|
|
|
async onShowMore({article, index}) {
|
|
|
if (this.yoho && this.yoho.context.isLogin && !this._userUid) {
|
|
|
let user = await this.$sdk.getUser();
|
|
|
|
|
|
this._userUid = user.uid;
|
|
|
}
|
|
|
|
|
|
this.$refs.moreAction.show(article, this._userUid, index);
|
|
|
console.log(article, this.userUid);
|
|
|
this.$refs.moreAction.show(article, this.userUid, index);
|
|
|
},
|
|
|
onDelete(index) {
|
|
|
this.$refs.scroll.delete(index);
|
...
|
...
|
|