diff --git a/src/components/UserCard/index.vue b/src/components/UserCard/index.vue index 7291fe9..d24bb25 100644 --- a/src/components/UserCard/index.vue +++ b/src/components/UserCard/index.vue @@ -52,6 +52,7 @@ const props = defineProps({ const centent = ref('') const emits = defineEmits(["update:modelValue", 'load', 'input', 'change']) const load = () => { +return emits('load') } diff --git a/src/views/chat/index.vue b/src/views/chat/index.vue index 0cf39be..9012ae7 100644 --- a/src/views/chat/index.vue +++ b/src/views/chat/index.vue @@ -61,11 +61,7 @@ const appInfoStore = appDetail() const route = useRoute() // 好友列表数据 -const userList = ref([ - { user_id: 'u1', user_name: '张三', user_avatar: '' }, - { user_id: 'u2', user_name: '李四', user_avatar: '' }, - { user_id: 'u3', user_name: '王五', user_avatar: '' }, -]) +const userList = ref([]) const activeUser = ref({}) const messages = ref([]) @@ -711,14 +707,14 @@ const onEmojiSelect = (emoji) => { // 获取用户列表 const params = reactive({ page: 1, - page_size: 20, + page_size: 2000, app_id: route.query.app_id }) const getUsers = (append = false) => { getUserList(params).then((res) => { if (append) { - userList.value = userList.value.concat(res.list || []) + userList.value = res.list // userList.value.concat(res.list || []) } else { userList.value = res.list || [] }