提交
This commit is contained in:
@@ -11,14 +11,17 @@
|
||||
<view class="msg-body">
|
||||
<view class="msg-header">
|
||||
<text class="msg-name">{{item.sender_user.nickname}}</text>
|
||||
<!-- <text class="msg-time">{{item.created_at}}</text> -->
|
||||
<text class="msg-time">{{item.created_at}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="msg-text">
|
||||
<text>{{ item.type==1?'点赞了': item.type==2?'收藏了':'评论了' }} </text>
|
||||
<text>{{ formatContent(item.post && item.post.content) }}</text>
|
||||
</view>
|
||||
|
||||
<view class="msg-text1">
|
||||
<text>{{ item.comment.content }} </text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
@@ -127,4 +130,7 @@
|
||||
color: #666;
|
||||
line-height: 38rpx;
|
||||
}
|
||||
.msg-text1{
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
+58
-55
@@ -1,81 +1,83 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" title="回复我的"></uni-nav-bar>
|
||||
|
||||
<view class="reply-list">
|
||||
<view class="reply-card" v-for="(reply, index) in replyList" :key="index">
|
||||
<!-- 主回复 -->
|
||||
<view class="reply-item">
|
||||
<view class="reply-heard">
|
||||
<image :src="reply.avatar" class="avatar"></image>
|
||||
<z-paging ref="paging" :auto="false" v-model="contList" @query="queryList" empty-view-text="暂无数据!">
|
||||
<template #top>
|
||||
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" title="回复我的"></uni-nav-bar>
|
||||
</template>
|
||||
<view class="reply-list">
|
||||
<view class="reply-card" v-for="(reply, index) in contList" :key="index">
|
||||
<!-- 主回复 -->
|
||||
<view class="reply-item">
|
||||
<view class="reply-heard">
|
||||
<image :src="reply.user.avatar_pull" class="avatar"></image>
|
||||
<view class="reply-content">
|
||||
<view class="username">{{ reply.user.nickname }}</view>
|
||||
<view class="time">{{ reply.created_at}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reply-content">
|
||||
<view class="username">{{ reply.username }}</view>
|
||||
<view class="time">{{ reply.time }}</view>
|
||||
<text class="reply-text">{{ reply.content }}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="reply-content">
|
||||
<text class="reply-text">{{ reply.content }}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 子回复 -->
|
||||
<view class="sub-reply" v-for="(subReply, subIndex) in reply.subReplies" :key="subIndex">
|
||||
<view class="reply-heard">
|
||||
<image :src="subReply.avatar" class="avatar"></image>
|
||||
<view class="reply-header">
|
||||
<view class="username">{{ subReply.username }}</view>
|
||||
<!-- 子回复 -->
|
||||
<view class="sub-reply" v-for="(subReply, subIndex) in reply.child" :key="subIndex">
|
||||
<view class="reply-heard">
|
||||
<image :src="subReply.user.avatar_pull" class="avatar"></image>
|
||||
<view class="reply-header">
|
||||
<view class="username">{{ subReply.user.nickname }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reply-content">
|
||||
<text class="reply-text">{{ subReply.content }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reply-content">
|
||||
<text class="reply-text">{{ subReply.content }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request,showToast } from '@/api/apiT.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
replyList: [
|
||||
{
|
||||
avatar: '/static/image/user.png',
|
||||
username: '用户名用户名',
|
||||
time: '2025年12月04日10:56:44',
|
||||
content: '这是回复这是回复这是回复这是回复这是回复这是回复这是回复这是回复这是回复这是回复这是回复这是回复',
|
||||
subReplies: [
|
||||
{
|
||||
avatar: '/static/image/user.png',
|
||||
username: '田户名田户名',
|
||||
time: '2025年12月04日10:56:44',
|
||||
content: '西门子全新款饮机品牌西门子全新款饮机品牌西门子全新...'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
avatar: '/static/image/user.png',
|
||||
username: '用户名用户名',
|
||||
time: '2025年12月04日10:56:44',
|
||||
content: '这是回复这是回复这是回复这是回复这是回复这是回复这是回复这是回复这是回复这是回复这是回复这是回复',
|
||||
subReplies: [
|
||||
{
|
||||
avatar: '/static/image/user.png',
|
||||
username: '用户名用户名',
|
||||
time: '2025年12月04日10:56:44',
|
||||
content: '西门子全新款饮机品牌西门子全新款饮机品牌西门子全新...'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
contList: []
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
this.$refs.paging.reload()
|
||||
},
|
||||
methods: {
|
||||
leftClick() {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/mine',// 替换为你要跳转的页面路径
|
||||
});
|
||||
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
this.loading = true;
|
||||
var that = this;
|
||||
request({
|
||||
url:'common/post/comment/list?scene=self',
|
||||
method:'get',
|
||||
data: {
|
||||
current:pageNo,
|
||||
size:10
|
||||
}
|
||||
}).then(res => {
|
||||
|
||||
if(res.data.code ==200){
|
||||
var datas = res.data.data.records;
|
||||
this.$refs.paging.complete(datas);
|
||||
}else{
|
||||
// this.$refs.paging.complete(null);
|
||||
// that.listlength=0
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
//
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,6 +124,7 @@
|
||||
}
|
||||
|
||||
.reply-content {
|
||||
margin-top: 20rpx;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user