Authored by TaoHuang

fix error

... ... @@ -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) {
... ...
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;
... ...