diff --git a/src/components/postReply/tpr-main.vue b/src/components/postReply/tpr-main.vue index bd6415b2..5d895ebe 100644 --- a/src/components/postReply/tpr-main.vue +++ b/src/components/postReply/tpr-main.vue @@ -53,17 +53,11 @@ const loading = ref(false); async function showReply(): Promise { if (reply.value.length > 0) return; + if (isLast.value) return; await loadReply(); } async function loadReply(): Promise { - if (isLast.value) { - showSnackbar({ - text: "没有更多了", - color: "info", - }); - return; - } loading.value = true; const resp = await Mys.Post.reply(props.postId, props.gid, true, lastId.value); if ("retcode" in resp) { @@ -77,6 +71,12 @@ async function loadReply(): Promise { lastId.value = resp.last_id; reply.value = reply.value.concat(resp.list); loading.value = false; + if (isLast.value) { + showSnackbar({ + text: "没有更多了", + color: "info", + }); + } } async function handleSubReply(item: TGApp.Plugins.Mys.Reply.ReplyFull): Promise { diff --git a/src/components/postReply/tpr-reply.vue b/src/components/postReply/tpr-reply.vue index 49ea9753..9aeb66ae 100644 --- a/src/components/postReply/tpr-reply.vue +++ b/src/components/postReply/tpr-reply.vue @@ -4,6 +4,9 @@ class="tpr-bubble" v-if="props.modelValue.user.reply_bubble !== null" :title="props.modelValue.user.reply_bubble.name" + :style="{ + backgroundColor: props.modelValue.user.reply_bubble.bg_color, + }" > bubble