Authored by yyq

fix detail

... ... @@ -147,20 +147,22 @@ export default {
}
}
if (!get(result, 'data.total')) {
this.empty = true;
} else {
this.empty = false;
}
return result;
},
async fetchComments(pre) {
const result = await this.fetchCommentsAsync(pre);
let dirty = false;
let dirty = true;
if (result.code === 200) {
const comments = get(result, 'data.commentInfos', []);
if (!get(result, 'data.total')) {
this.empty = true;
} else {
if (comments.length) {
this.empty = false;
this.$emit('on-page-change', {
page: result.data.page,
size: result.data.total
... ... @@ -190,8 +192,8 @@ export default {
this.commentList = this.commentList.concat(comments);
}
}
dirty = true;
}
} else {
dirty = false;
}
this.firstLoading = false;
... ...