2025-09-28 聊天修改
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
} from '@dcloudio/uni-app';
|
||||
import { onReady as onUniReady } from '@dcloudio/uni-app';
|
||||
import { groupAPI } from '../../api/group';
|
||||
import { getUserInfo } from '../../util/common';
|
||||
const instance = getCurrentInstance();
|
||||
|
||||
const height = ref(0)
|
||||
@@ -92,23 +93,23 @@
|
||||
|
||||
// 项目
|
||||
const messageList = ref([])
|
||||
|
||||
const mockData = () => {
|
||||
for (var i = 0; i < 20; i++) {
|
||||
messageList.value.push({
|
||||
messageName: "test" + i
|
||||
})
|
||||
}
|
||||
}
|
||||
const user = ref()
|
||||
const size = 10
|
||||
const params = ref({
|
||||
page: 1,
|
||||
size: size,
|
||||
userId: '',
|
||||
customerId: '',
|
||||
})
|
||||
|
||||
const handleChat = (item) => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/program/chat?groupId=' + item.groupId
|
||||
url: '/pages/message/chat?groupId=' + item.groupId
|
||||
})
|
||||
}
|
||||
|
||||
const loadData = () => {
|
||||
groupAPI.getList().then((res) => {
|
||||
groupAPI.getList(params.value).then((res) => {
|
||||
messageList.value = res.data.list
|
||||
})
|
||||
}
|
||||
@@ -120,7 +121,8 @@
|
||||
|
||||
onUniReady(() => {
|
||||
loadHeight()
|
||||
|
||||
user.value = getUserInfo()
|
||||
params.value.userId = user.value.id
|
||||
loadData()
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user