|
|
|
|
@ -22,7 +22,7 @@ import { deepClone } from '../utils'
|
|
|
|
|
|
|
|
|
|
const appellation = ref('')
|
|
|
|
|
|
|
|
|
|
const { account, teamId, ignoreAlias, nickFromMsg } = withDefaults(
|
|
|
|
|
const { pid,account, teamId, ignoreAlias, nickFromMsg } = withDefaults(
|
|
|
|
|
defineProps<{
|
|
|
|
|
account: string
|
|
|
|
|
teamId?: string
|
|
|
|
|
@ -30,6 +30,7 @@ const { account, teamId, ignoreAlias, nickFromMsg } = withDefaults(
|
|
|
|
|
nickFromMsg?: string
|
|
|
|
|
color?: string
|
|
|
|
|
fontSize?: number
|
|
|
|
|
pid?: number
|
|
|
|
|
}>(),
|
|
|
|
|
{
|
|
|
|
|
teamId: undefined,
|
|
|
|
|
@ -37,34 +38,38 @@ const { account, teamId, ignoreAlias, nickFromMsg } = withDefaults(
|
|
|
|
|
nickFromMsg: '-',
|
|
|
|
|
color: '#333',
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
pid:0
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
const subtitle = ref('');
|
|
|
|
|
const uninstallAppellationWatch = autorun(() => {
|
|
|
|
|
// async function getUserInfo() {
|
|
|
|
|
// try {
|
|
|
|
|
// const res = await uni.$UIKitStore.userStore.getUserActive('10023')
|
|
|
|
|
// return res
|
|
|
|
|
// } catch (error) {
|
|
|
|
|
// console.error('getUserInfo error:', error)
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// getUserInfo().then(res => {
|
|
|
|
|
// if(res.serverExtension){
|
|
|
|
|
// subtitle.value = '@' + JSON.parse(res.serverExtension).fullName;
|
|
|
|
|
// }else{
|
|
|
|
|
// subtitle.value = '';
|
|
|
|
|
// }
|
|
|
|
|
// appellation.value = res.name;
|
|
|
|
|
// })
|
|
|
|
|
appellation.value = deepClone(
|
|
|
|
|
uni.$UIKitStore.uiStore.getAppellation({
|
|
|
|
|
account,
|
|
|
|
|
teamId,
|
|
|
|
|
ignoreAlias,
|
|
|
|
|
nickFromMsg,
|
|
|
|
|
if(pid){
|
|
|
|
|
async function getUserInfo() {
|
|
|
|
|
try {
|
|
|
|
|
const res = await uni.$UIKitStore.userStore.getUserActive(pid.split('|')[2])
|
|
|
|
|
return res
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error('getUserInfo error:', error)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
getUserInfo().then(res => {
|
|
|
|
|
if(res.serverExtension){
|
|
|
|
|
subtitle.value = '@' + JSON.parse(res.serverExtension).fullName;
|
|
|
|
|
}else{
|
|
|
|
|
subtitle.value = '';
|
|
|
|
|
}
|
|
|
|
|
appellation.value = res.name;
|
|
|
|
|
})
|
|
|
|
|
)
|
|
|
|
|
}else{
|
|
|
|
|
appellation.value = deepClone(
|
|
|
|
|
uni.$UIKitStore.uiStore.getAppellation({
|
|
|
|
|
account,
|
|
|
|
|
teamId,
|
|
|
|
|
ignoreAlias,
|
|
|
|
|
nickFromMsg,
|
|
|
|
|
})
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
|
uninstallAppellationWatch()
|
|
|
|
|
|