Authored by yyq

Merge branch 'feature/0415' into feature/0430

... ... @@ -35,7 +35,7 @@ export default {
computed: {
invisibleClass() {
return {
invisible: !this.data.hasAttention
invisible: this.data.isAuthor === 'Y'
};
}
},
... ...
... ... @@ -52,7 +52,8 @@ export default {
authorUid: this.data.authorUid,
authorType: this.data.authorType,
authorHeadIco: this.data.authorHeadIco,
hasAttention: this.data.hasAttention
hasAttention: this.data.hasAttention,
isAuthor: this.data.isAuthor
};
},
slideData() {
... ...
... ... @@ -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 :share="share" class="widget-follow" :class="{invisible: currentAuthor.isAuthor === 'Y'}" :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"
... ... @@ -95,6 +95,7 @@ export default {
authorName: '',
authorHeadIco: '',
hasAttention: 'N',
isAuthor: 'N',
isShare: false,
authorType: 1
}
... ... @@ -188,6 +189,7 @@ export default {
this.currentAuthor.authorHeadIco = item.data.authorHeadIco;
this.currentAuthor.hasAttention = item.data.hasAttention;
this.currentAuthor.authorType = item.data.authorType;
this.currentAuthor.isAuthor = item.data.isAuthor;
this.showHeader = true;
... ...
... ... @@ -5,14 +5,15 @@
<div class="h-name flex">
<span class="h-name-b">{{authorBaseData.nickName}}</span>
<span v-if="authorBaseData.sex" class="iconfont icon-women author-sex-icon" :class="`icon-${authorBaseData.sex}`"></span>
<div v-if="!isOwner" class="h-follow flex">
<WidgetFollow class="widget-follow" :class="{invisible: !tabFixed}" :author-uid="authorInfo.authorUid" :author-type="authorInfo.authorType" :follow="authorBaseData.isAttention" @on-follow="follow => onFollow(follow)" :pos-id="sceneId"></WidgetFollow>
</div>
</div>
<div class="h-more">
<div class="flex">
<WidgetAvatar class="h-headico" :src="authorBaseData.headIco" :width="100" :height="100"></WidgetAvatar>
</div>
<div v-if="!isOwner" class="h-follow flex">
<WidgetFollow class="widget-follow" :author-uid="authorInfo.authorUid" :author-type="authorInfo.authorType" :follow="authorBaseData.isAttention" @on-follow="follow => onFollow(follow)" :pos-id="sceneId"></WidgetFollow>
</div>
</div>
</div>
</LayoutHeader>
... ... @@ -112,21 +113,6 @@ export default {
this.init(this.$route.params);
this.listMinHeight = this.$el.offsetHeight - this.$refs.tabBlock.offsetHeight - $dom.offsetHeight;
if ($dom.offsetHeight) {
this._animeDuration = 300;
import('animejs').then(({default: anime}) => {
this._animeEl = anime({
targets: $dom,
translateY: -$dom.offsetHeight,
easing: 'easeInOutSine',
duration: this._animeDuration,
autoplay: false
});
});
}
this.beforeRouteEnter = this.beforeRouteUpdate;
},
computed: {
list() {
... ... @@ -168,10 +154,6 @@ export default {
this.emptyTip = '';
if (this.scrollY > 0) {
if (this._animeEl) {
this._animePlayed = false;
this._animeEl.seek(0);
}
this.$refs.scroll.scrollTo(0, 0);
}
... ... @@ -215,25 +197,6 @@ export default {
this.tabFixed = animePlayed;
let start;
let self = this;
function step(timestamp) {
if (!start) {
start = timestamp
};
let progress = Math.floor(timestamp - start);
self._animeEl.seek(animePlayed ? progress : self._animeDuration - progress);
if (progress < self._animeDuration) {
window.requestAnimationFrame(step);
}
};
window.requestAnimationFrame(step);
this._animePlayed = animePlayed;
},
onScrollEndHandle(scroll) {
... ...