Authored by 陈峰

Merge branch 'master' of http://git.yoho.cn/fe/yoho-community-web

... ... @@ -10,7 +10,11 @@ export default {
name: 'WidgetFollow',
props: {
authorUid: [Number, String],
follow: Boolean
follow: Boolean,
authorType: {
type: [Number, String],
default: 1
}
},
data() {
return {
... ... @@ -41,7 +45,11 @@ export default {
return;
}
this.loading = true;
const result = await this.followUser({followUid: this.authorUid, status: this.followStatus ? 1 : 0});
const result = await this.followUser({
followUid: this.authorUid,
status: this.followStatus ? 1 : 0,
authorType: this.authorType
});
this.loading = false;
if (result.code === 200) {
... ...
... ... @@ -80,7 +80,7 @@ export default {
width: 100%;
font-size: 20px;
color: #444;
height: 60px;
/*height: 58px;*/
word-break: break-all;
white-space: normal;
}
... ...
<template>
<div>
<WidgetTopic v-for="(i, index) in list" :topic="i.name" :key="index"></WidgetTopic>
<WidgetTopic class="item" v-for="(i, index) in list" :topic="i.name" :key="index"></WidgetTopic>
</div>
</template>
... ... @@ -14,4 +14,7 @@ export default {
</script>
<style :lang="scss" scoped>
.item {
margin-bottom: 10px;
}
</style>
... ...
export default {
async followUser(actions, {followUid, status}) {
async followUser(actions, {followUid, status, authorType}) {
const result = await this.$api.post('/api/grass/updateAttention', {
followUid,
status,
attentionType: 1
attentionType: 1,
authorType
});
return result;
... ...