no message

This commit is contained in:
A1300399510
2024-01-15 19:02:10 +08:00
parent 6a7d5f221e
commit e01ac5326b
12 changed files with 479 additions and 119 deletions

View File

@@ -52,7 +52,7 @@
</div>
</div>
<div class="comment-text" @click="openAnswerCommentsChild(index)">{{ item["content"] }}</div>
<!-- <div class="comments-input-box flexacenter" v-if="item['childState']"> -->
<div class="alreadyVoted" v-if="item.voteoption">已投{{ item.voteoption }}</div>
<div class="comments-input-box flexacenter" v-if="item['childState']">
<div class="comments-input flexflex">
<textarea class="flex1" placeholder="回复" v-model="commentInput"></textarea>
@@ -105,6 +105,7 @@
<div class="comments-reply" v-if="ite?.reply?.nickname">@{{ ite?.reply?.nickname }}</div>
{{ ite["content"] }}
</div>
<div class="alreadyVoted" v-if="ite.voteoption">已投{{ ite.voteoption }}</div>
<div class="comments-input-box flexacenter" v-if="ite['childState']">
<div class="comments-input flexflex">
<textarea class="flex1" placeholder="回复" v-model="commentInput"></textarea>
@@ -139,17 +140,11 @@ const props = defineProps({
watch(
() => props.token,
newV => {
console.log(newV)
getCommentList()
},
{
immediate: false,
}
() => getCommentList(),
{ immediate: false }
)
onMounted(() => {
window.addEventListener("scroll", handleScroll)
})
onMounted(() => window.addEventListener("scroll", handleScroll))
const sendMessage = inject("sendMessage")
const TAHomePage = inject("TAHomePage")
@@ -159,7 +154,6 @@ let commentComments = ref(0) // 所有的评论数
let commentPage = ref(1)
let commentList = ref([])
let commentLoading = false
let token = "4ZKbui89pS81jKgWpT41kLgcglLOJa8UQCmuucFl-cyzQKdjr0iEMTl4grDC04TSnq1vC90fZ2pVdeP6IUYPN2Y4Ng~~"
let isEmptyState = ref(false) // 评论是否为空
// 获取详情评论数据
@@ -255,7 +249,7 @@ const submitAnswerComments = (index, i) => {
detailsSubmitommentListHttp({
content,
token,
token: props.token,
parentid,
}).then(res => {
if (res.code != 200) {
@@ -297,6 +291,7 @@ const submitAnswerComments = (index, i) => {
commentCount.value++
}
}
commentComments.value++
commentList.value = targetCommentList
@@ -323,7 +318,7 @@ const alsoCommentsData = (index, ind) => {
limit: 10,
page,
parentid,
token,
token: props.token,
}).then(res => {
if (res.code != 200) return
let data = res.data
@@ -398,6 +393,7 @@ provide("reportAlertShow", reportAlertShow)
height: 60px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(215, 215, 215, 1);
border-right: none;
border-radius: 6px;
margin-bottom: 30px;
margin-right: 30px;
@@ -459,7 +455,7 @@ provide("reportAlertShow", reportAlertShow)
.comment-header {
display: flex;
justify-content: space-between;
padding-right: 30px;
// padding-right: 30px;
margin-bottom: 10px;
.comment-header-left {
@@ -576,6 +572,16 @@ provide("reportAlertShow", reportAlertShow)
}
}
.alreadyVoted {
font-size: 12px;
color: #aaaaaa;
background-color: rgba(246, 246, 246, 1);
line-height: 17px;
width: fit-content;
margin-bottom: 15px;
word-break: break-word;
}
.comments-input-box {
margin-top: 13px;
margin-bottom: 10px;
@@ -585,6 +591,7 @@ provide("reportAlertShow", reportAlertShow)
flex: 1;
height: 60px;
border: 1px solid rgba(215, 215, 215, 1);
border-right: none;
border-radius: 8px;
margin-right: 16px;
position: relative;
@@ -614,7 +621,8 @@ provide("reportAlertShow", reportAlertShow)
.comments-btn {
width: 58px;
height: 58px;
background-color: #31d72e;
// background-color: #31d72e;
background-color: var(--main-color);
border-radius: 0 7px 7px 0;
font-size: 14px;
color: #ffffff;