修复已知问题

This commit is contained in:
bobobobo
2026-01-29 00:27:31 +08:00
parent 990f2df972
commit 41c1e5ba89
36 changed files with 1353 additions and 169 deletions

View File

@@ -6,6 +6,7 @@
height: avatarSize,
borderRadius: '80rpx'
}"
@click="onTopAvatar"
>
<template v-if="isUniFrameWork">
<image
@@ -42,14 +43,26 @@
</template>
<script setup lang="ts">
import TUICore, { TUIConstants } from '@tencentcloud/tui-core-lite'
import { ref, toRefs } from '../../../adapter-vue'
import { isUniFrameWork } from '../../../utils/env'
import TUIChatEngine, {
TUIFriendService
} from '@tencentcloud/chat-uikit-engine-lite'
import { useAuthUser } from '../../../../composables/useAuthUser'
import { navigateTo } from '@/utils/router'
import { useUI } from '../../../../utils/use-ui'
const { tencentUserSig } = useAuthUser()
const { showLoading, hideLoading } = useUI()
interface IProps {
url: string
size?: string
borderRadius?: string
useSkeletonAnimation?: boolean
id?: string
type?: string
}
interface IEmits {
@@ -66,7 +79,9 @@
url: 'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png',
size: '36px',
borderRadius: '5px',
useSkeletonAnimation: false
useSkeletonAnimation: false,
id: '',
type: ''
})
const {
@@ -97,6 +112,52 @@
}
emits('onError', e)
}
/** 点击头像跳转 */
const onTopAvatar = () => {
console.log(props.type)
if (props.id) {
showLoading()
TUICore.callService({
serviceName: TUIConstants.TUISearch.SERVICE.NAME,
method: TUIConstants.TUISearch.SERVICE.METHOD.SEARCH_USER,
params: {
userID: props.id
}
})
.then(res => {
console.log(res.data, '==')
const searchList = res.data
if (searchList.length > 0) {
TUIFriendService.checkFriend({
type: TUIChatEngine.TYPES.SNS_CHECK_TYPE_BOTH,
userIDList: [searchList[0].userID]
})
.then(v => {
const isShow =
v.data.successUserIDList[0].relation ===
TUIChatEngine.TYPES.SNS_TYPE_BOTH_WAY
hideLoading()
navigateTo('/pages/adduser/details', {
id: searchList[0].userID,
state: props.type,
type: isShow
? '1'
: searchList[0].userID == tencentUserSig.value.userId
? '99'
: ''
})
})
.catch(() => {
hideLoading()
})
}
})
.catch(() => {
hideLoading()
})
}
}
</script>
<style scoped lang="scss">
@@ -122,9 +183,7 @@
width: 100%;
height: 100%;
background-color: #ececec;
transition:
opacity 0.3s,
background-color 0.1s ease-out;
transition: opacity 0.3s, background-color 0.1s ease-out;
&.skeleton-animation {
animation: breath 2s linear 0.3s infinite;