Authored by TaoHuang

Merge remote-tracking branch 'origin/release/6.8.7' into release/6.8.7

... ... @@ -5,6 +5,7 @@
:thumbs="articleThumbList"
:on-fetch="onFetch"
:pos-id="sceneId"
:user-uid="userUid"
>
</Article>
</template>
... ... @@ -23,7 +24,8 @@ export default {
return {
page: 1,
id: 0,
sceneId: YAS.scene.list
sceneId: YAS.scene.list,
userUid: -1
};
},
created() {
... ... @@ -72,6 +74,7 @@ export default {
this.page++;
this.$sdk.getUser().then(user => {
if (user && user.uid) {
this.userUid = +user.uid;
this.fetchArticleProductFavs({
articles: result.data.detailList
});
... ...
... ... @@ -5,7 +5,7 @@
<span class="user-name">{{data.authorName}}</span>
</div>
<div class="opts">
<WidgetFollow :class="invisibleClass" :share="share" :author-uid="data.authorUid" :authorType="data.authorType" :follow="data.hasAttention === 'Y'" @on-follow="onFollow" :pos-id="posId"></WidgetFollow>
<WidgetFollow v-if="!data.isMine" :class="invisibleClass" :share="share" :author-uid="data.authorUid" :authorType="data.authorType" :follow="data.hasAttention === 'Y'" @on-follow="onFollow" :pos-id="posId"></WidgetFollow>
<i class="iconfont icon-more1" @click="onMore"></i>
</div>
</div>
... ...
... ... @@ -34,7 +34,8 @@ export default {
type: String,
thumb: Boolean,
posId: Number,
articleId: Number
articleId: Number,
userUid: Number
},
computed: {
articleState() {
... ... @@ -47,6 +48,7 @@ export default {
authorType: this.data.authorType,
authorHeadIco: this.data.authorHeadIco,
hasAttention: this.data.hasAttention,
isMine: this.userUid === +this.data.authorUid && this.data.authorType === 1
};
},
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 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);
... ...
... ... @@ -53,7 +53,7 @@ export default {
params = params || {};
this.list[0].hide = params.hasAttention !== 'Y';
this.list[2].hide = params.authorUid !== uid || params.authorType !== 1;
this.list[2].hide = +params.authorUid !== uid || params.authorType !== 1;
this.list = [...this.list];
this._params = params;
... ... @@ -72,11 +72,10 @@ export default {
},
actionCancelFav() {
let {authorUid, authorType} = this._params;
return this.$emit('on-follow', this._params);
this.followUser({
followUid: authorUid,
status: false,
status: 1,
authorType
}).then(res => {
if (res.code === 200) {
... ... @@ -137,15 +136,15 @@ export default {
.action-list {
width: 100%;
padding: 20px 40px;
padding: 20px 0 20px 60px;
border-bottom: 1PX solid #d7d7d7;
display: flex;
justify-content: space-around;
}
.action-item {
width: 128px;
padding: 12px 0;
margin-right: 40px;
.icon {
width: 88px;
... ...
... ... @@ -5,7 +5,8 @@
type="userArticle"
:thumbs="articleUserThumbList"
:on-fetch="onFetch"
:pos-id="sceneId">
:pos-id="sceneId"
:user-uid="userUid">
</Article>
</template>
... ... @@ -27,7 +28,8 @@ export default {
authorType: 0,
type: '',
userName: '',
sceneId: YAS.scene.authorList
sceneId: YAS.scene.authorList,
userUid: -1
};
},
created() {
... ... @@ -101,6 +103,7 @@ export default {
this.page++;
this.$sdk.getUser().then(user => {
if (user && user.uid) {
this.userUid = +user.uid;
this.fetchArticleProductFavs({
articles: result.data.detailList
});
... ...