Authored by 杨延青

Merge branch 'feature/0330' into 'release/6.8.8'

img parise



See merge request !28
... ... @@ -74,6 +74,13 @@ export default {
});
this.posting = false;
let toastInfo = {
txt: '评论成功',
type: 'success',
time: 1000
};
if (result.code === 200) {
const waitData = this.addType === 0 ? this.fetchArticleUpdate({articleId: this.destId}) : Promise.resolve();
... ... @@ -86,12 +93,13 @@ export default {
this.reportComment(this.destId);
} else {
this.$createToast({
Object.assign(toastInfo, {
txt: result.message || '服务器开小差了',
type: 'warn',
time: 1000
}).show();
});
}
this.$createToast(toastInfo).show();
},
reportComment(comId) {
this.$store.dispatch('reportYas', {
... ...
... ... @@ -242,6 +242,14 @@ export default {
throw new Error(message);
}
if (increHeight) {
for (let i = index + 1; i < this.items.length; i++) {
if (this.items[i].top) {
this.items[i].top += increHeight;
}
}
}
return increHeight;
},
updateIndex(scrollTop) {
... ...
... ... @@ -26,8 +26,8 @@ export default {
data() {
return {
imgSrc: this.src,
defaultSrc: '//img11.static.yhbimg.com/yhb-img01/2016/07/05/13/017ec560b82c132ab2fdb22f7cf6f42b83.png?imageView/2/w/{width}/h/{height}'
};
defaultSrc: '//img12.static.yhbimg.com/article/2019/02/26/16/02456ade977d8dfdbc4ca548b196c1d62b.png?imageView/2/w/{width}/h/{height}'
}
},
computed: {
imageSrc() {
... ...
... ... @@ -209,7 +209,9 @@ export default {
},
onExpand() {
this.animateing = true;
this.$emit('on-expand');
this.$nextTick(() => {
this.$emit('on-expand');
});
},
onShowComment() {
if (this.articleState.commentCount) {
... ...
<template>
<div class="article-item-slide-wrap">
<div class="article-item-slide" :style="slideItemStyle" @click="praiseArticle">
<div class="article-item-slide" :style="slideItemStyle" @touchend="praiseArticle">
<ArticleItemSlideImage v-if="data.blockList.length === 1" :lazy="false" :data="data.blockList[0]" :thumb-size="firstBlockSize"></ArticleItemSlideImage>
<Slide :key="`slide${data.articleId}`" v-else ref="slide" :data="data.blockList" :refresh-reset-current="false" :initial-index="slideIndex - 1" :threshold="0.2" :auto-play="false" :loop="false" :options="scrollOption" @change="onChange">
<SlideItem class="slide-item" :style="slideItemStyle" v-for="(item, inx) in data.blockList" :key="inx">
... ... @@ -32,7 +32,7 @@ import {mapState, createNamespacedHelpers} from 'vuex';
import lottieJson from '../../../../statics/lottie/detail-heart.json';
const {mapMutations} = createNamespacedHelpers('article');
const dblclickDdelay = 500;
const dblclickDdelay = 200;
export default {
name: 'ArticleItemSlide',
... ...
... ... @@ -175,6 +175,10 @@ export default {
if (scrollTop <= 0) {
this.showHeader = false;
} else if (item) {
if (item.data && item.data.dataType === 2) {
return this.showHeader = false;
}
if (this.currentId !== item.data.articleId) {
this.currentId = item.data.articleId;
}
... ...
<template>
<Layout class="author-fans-page">
<LayoutHeader slot='header' theme="white" class="author-page-header">{{isMine ? '我的' : 'TA'}}粉丝</LayoutHeader>
<UserList :follow-name="isMine ? '回粉' : '关注'" :on-fetch="onFetch"></UserList>
<LayoutHeader slot='header' theme="white" class="author-page-header">{{isMine ? '我' : 'TA'}}的粉丝</LayoutHeader>
<UserList ref="userList" :follow-name="isMine ? '回粉' : '关注'" :on-fetch="onFetch"></UserList>
</Layout>
</template>
... ... @@ -31,6 +31,13 @@ export default {
this._baseParams.authorUid = this.$route.params.id;
}
},
activated() {
this.$refs.userList.init();
},
beforeRouteUpdate(to, from, next) {
this.$refs.userList.init();
next();
},
methods: {
...mapActions(['authorFansList', 'authorMineFansList']),
onFetch({page, lastedTime}) {
... ...
<template>
<Layout class="author-follow-page">
<LayoutHeader slot='header' theme="white" class="author-page-header">{{isMine ? '我的' : 'TA'}}关注</LayoutHeader>
<UserList :on-fetch="onFetch"></UserList>
<LayoutHeader slot='header' theme="white" class="author-page-header">{{isMine ? '我' : 'TA'}}的关注</LayoutHeader>
<UserList ref="userList" :on-fetch="onFetch"></UserList>
</Layout>
</template>
... ... @@ -31,6 +31,13 @@ export default {
this._baseParams.authorUid = this.$route.params.id;
}
},
activated() {
this.$refs.userList.init();
},
beforeRouteUpdate(to, from, next) {
this.$refs.userList.init();
next();
},
methods: {
...mapActions(['authorAttentionList', 'authorMineAttentionList']),
onFetch({page, lastedTime}) {
... ...
... ... @@ -7,7 +7,7 @@
@scroll-end="fetchList">
<div class="user-list">
<div v-for="(item, index) in list" :key="index" class="user-item">
<WidgetAvatar class="head-ico" :src="item.headIcon" :width="100" :height="100" @click="toUserPage(item)"></WidgetAvatar>
<WidgetAvatar class="head-ico" :src="item.headIcon" :width="100" :height="100" @click.native="toUserPage(item)"></WidgetAvatar>
<div class="user-info" @click="toUserPage(item)">
<p class="name">{{item.nickName}}</p>
<p v-if="item.articleCount || item.fansCount" class="extra">
... ... @@ -53,9 +53,15 @@ export default {
};
},
mounted() {
this.fetchList();
this.init();
},
methods: {
init() {
this._page = 1;
this.list = [];
this.noMore = false;
this.fetchList();
},
fetchList() {
let page = this._page || 1;
... ...
... ... @@ -21,22 +21,34 @@ export default [{
alias: '/author/follow/:type/:id',
name: 'author.follow',
component: () => import(/* webpackChunkName: "authorFollow" */ './author-follow'),
meta: {
keepAlive: true
},
},
{
path: '/author/fans/:type/:id',
alias: '/author/fans/:type/:id',
name: 'author.fans',
component: () => import(/* webpackChunkName: "authorFans" */ './author-fans'),
meta: {
keepAlive: true
},
},
{
path: '/mine/follow',
alias: '/mine/follow',
name: 'mine.follow',
component: () => import(/* webpackChunkName: "authorFollow" */ './author-follow'),
meta: {
keepAlive: true
},
},
{
path: '/mine/fans',
alias: '/mine/fans',
name: 'mine.fans',
component: () => import(/* webpackChunkName: "authorFans" */ './author-fans'),
meta: {
keepAlive: true
},
}];
... ...