2025-10-10
项目收藏
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<!-- 可滚动的内容区域 -->
|
||||
<view class="content-container">
|
||||
<view>
|
||||
<view id="fixedHeadId" style="padding: 32rpx 32rpx 0;">
|
||||
<view id="fixedHeadId" style="padding: 32rpx 32rpx 0;" class="u-m-b-20">
|
||||
<view class="head-box1">
|
||||
<view class="title">
|
||||
容讯聊天室
|
||||
@@ -49,7 +49,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="menu-list">
|
||||
<!-- 全部/已投资/未读/不感兴趣 -->
|
||||
<!-- <view class="menu-list">
|
||||
<view class="menu-item" v-for="(item,index) in menuList" @click="handleMenuChange(index)">
|
||||
<view class="menu-title">{{item.name + '(' + item.count +')'}}
|
||||
</view>
|
||||
@@ -57,11 +58,12 @@
|
||||
:src="currentMenu==index?'/static/icon/Chevron down.png':'/static/icon/Chevron right Menu.png'"
|
||||
mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y="true" class="message-list" :style="'height:'+height+'px'">
|
||||
<view class="message-item" v-for="item in messageList">
|
||||
<scroll-view scroll-y="true" class="message-list" :style="'height:'+height+'px'"
|
||||
@scrolltolower="loadData">
|
||||
<view class="message-item" v-for="(item, index) in messageList">
|
||||
<u-swipe-action bgColor="#F8FBFF" :index="item.groupId" class="other-program"
|
||||
@content-click="handleChat(item)" v-if="item.program.linkmanId !== params.userId"
|
||||
:options="options">
|
||||
@@ -75,7 +77,7 @@
|
||||
{{ item.program.startDate + "至" + item.program.endDate }}
|
||||
</view> -->
|
||||
<view class="item-unread" v-if="item.userUnread.length!=0">
|
||||
未读: {{item.userUnread.length}}
|
||||
消息未读: {{item.userUnread.length}}
|
||||
</view>
|
||||
</u-swipe-action>
|
||||
<u-swipe-action bgColor="#F8FBFF" class="my-program" @content-click="handleChat(item)" v-else
|
||||
@@ -87,10 +89,11 @@
|
||||
{{'咨询人:' + maskPhoneNumber(item.user.username) }}
|
||||
</view>
|
||||
<view class="item-unread" v-if="item.chargeUnread.length!=0">
|
||||
未读: {{item.chargeUnread.length}}
|
||||
消息未读: {{item.chargeUnread.length}}
|
||||
</view>
|
||||
</u-swipe-action>
|
||||
</view>
|
||||
<u-loadmore :status="status" color="#fff" />
|
||||
<view class="placeholder-box"></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@@ -128,11 +131,11 @@
|
||||
|
||||
// 搜索
|
||||
const keyword = ref('')
|
||||
|
||||
|
||||
// 系统消息
|
||||
const handleNavigateTo = () => {
|
||||
uni.navigateTo({
|
||||
url:'/pages/message/systemMessage'
|
||||
url: '/pages/message/systemMessage'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -157,6 +160,13 @@
|
||||
currentMenu.value = val
|
||||
}
|
||||
|
||||
// 进入聊天
|
||||
const handleChat = (item) => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/message/chat?groupId=' + item.groupId
|
||||
})
|
||||
}
|
||||
|
||||
// 消息
|
||||
const messageList = ref([])
|
||||
const user = ref()
|
||||
@@ -167,6 +177,8 @@
|
||||
userId: '',
|
||||
customerId: '',
|
||||
})
|
||||
const pages = ref(0)
|
||||
const status = ref('loadmore')
|
||||
const options = [
|
||||
{
|
||||
text: '收藏',
|
||||
@@ -182,21 +194,24 @@
|
||||
}
|
||||
]
|
||||
|
||||
const handleChat = (item) => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/message/chat?groupId=' + item.groupId
|
||||
})
|
||||
}
|
||||
|
||||
const loadData = () => {
|
||||
if (status.value == 'nomore') return
|
||||
groupAPI.getList(params.value).then((res) => {
|
||||
messageList.value = res.data.list
|
||||
console.log(messageList.value);
|
||||
pages.value = res.data.pages
|
||||
messageList.value = messageList.value.concat(res.data.list)
|
||||
params.value.page++
|
||||
if (params.value.page > pages.value) {
|
||||
status.value = 'nomore'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onPullDownRefresh(async () => {
|
||||
await loadData()
|
||||
// 重新刷新,将参数初始化
|
||||
params.value.page = 1
|
||||
messageList.value = []
|
||||
status.value = 'loadmore'
|
||||
loadData()
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
|
||||
@@ -319,26 +334,34 @@
|
||||
}
|
||||
|
||||
.message-list {
|
||||
margin-top: 10rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.message-item {
|
||||
|
||||
// border: 1px solid #000;
|
||||
.other-message {
|
||||
.other-program {
|
||||
padding: 20rpx 0rpx 20rpx 20rpx;
|
||||
background-color: #F8FBFF;
|
||||
;
|
||||
border-bottom: 2rpx solid #f1f4ff;
|
||||
|
||||
.item-unread{
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
|
||||
.my-program {
|
||||
padding: 20rpx 0rpx 20rpx 20rpx;
|
||||
background-color: #F8FBFF;
|
||||
border-bottom: 2rpx solid #f1f4ff;
|
||||
|
||||
.item-unread{
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.placeholder-box{
|
||||
|
||||
.placeholder-box {
|
||||
width: 100%;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user