Skip to content

Commit 619102a

Browse files
committed
fix: 完善详情页骨架屏展示
1 parent 0c3942e commit 619102a

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

src/pages/detail/index.vue

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@
2424
<rich-text :nodes="item.content" bindtap="tap" />
2525
</div>
2626
<div class="topic-detail-replay-item-content topic-detail-replay-item-bottom">
27-
<div class="topic-replay-agree">
28-
{{ item.ups.length }} 赞
29-
<span class="divider">|</span>
30-
</div>
27+
<div class="topic-replay-agree">{{ item.ups.length }} 赞</div>
3128
</div>
3229
</div>
3330
</div>
@@ -63,16 +60,12 @@ export default {
6360
},
6461
methods: {
6562
getTopicDetail(id, accesstoken) {
66-
wx.showLoading({
67-
title: '加载中',
68-
});
6963
this.$ajax({
7064
url: `https://cnodejs.org/api/v1/topic/${id}`,
7165
data: {
7266
accesstoken,
7367
},
7468
}).then((res) => {
75-
wx.hideLoading();
7669
this.isLoading = false;
7770
wx.stopPullDownRefresh();
7871
this.detail = formatRichText(res.data);
@@ -89,6 +82,9 @@ export default {
8982
}
9083
this.getTopicDetail(this.$root.$mp.query.id, accesstoken);
9184
},
85+
onUnload() {
86+
this.detail.content = '';
87+
},
9288
};
9389
</script>
9490

0 commit comments

Comments
 (0)