修复已知问题
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
item.type === TYPES.MSG_GRP_TIP ||
|
||||
isCreateGroupCustomMessage(item)
|
||||
"
|
||||
:content="item"
|
||||
:content="item.getMessageContent()"
|
||||
/>
|
||||
<div
|
||||
v-else-if="!item.isRevoked && !isPluginMessage(item)"
|
||||
|
||||
@@ -5,44 +5,50 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from '../../../../adapter-vue';
|
||||
const props = defineProps({
|
||||
content: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const tipContent = computed(() => `${props.content.nick || props.content.from} 创建群聊`);
|
||||
import { computed } from '../../../../adapter-vue'
|
||||
const props = defineProps({
|
||||
content: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
|
||||
const tipContent = computed(() => {
|
||||
if (props.content?.businessID == 'group_create') {
|
||||
return `${props.content?.showName} 创建群聊`
|
||||
}
|
||||
return props.content?.text || props.content?.custom || ''
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "../../../../assets/styles/common";
|
||||
@import '../../../../assets/styles/common';
|
||||
|
||||
.message-tip {
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
overflow-wrap: anywhere;
|
||||
display: flex;
|
||||
place-content: center center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin-bottom: 10px;
|
||||
.message-tip {
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
overflow-wrap: anywhere;
|
||||
display: flex;
|
||||
place-content: center center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin-bottom: 10px;
|
||||
|
||||
&-highlight {
|
||||
animation: highlight 1000ms infinite;
|
||||
&-highlight {
|
||||
animation: highlight 1000ms infinite;
|
||||
|
||||
@keyframes highlight {
|
||||
50% {
|
||||
color: #ff9c19;
|
||||
@keyframes highlight {
|
||||
50% {
|
||||
color: #ff9c19;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes highlight {
|
||||
50% {
|
||||
color: #ff9c19;
|
||||
@keyframes highlight {
|
||||
50% {
|
||||
color: #ff9c19;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -31,10 +31,27 @@
|
||||
@click="handleMenu(childrenItem)"
|
||||
>
|
||||
<Icon
|
||||
v-if="childrenItem.icon"
|
||||
v-if="
|
||||
childrenItem.icon &&
|
||||
!['isAddUser', 'isScan'].includes(
|
||||
childrenItem.data.name
|
||||
)
|
||||
"
|
||||
class="list-item-icon"
|
||||
:file="childrenItem.icon"
|
||||
/>
|
||||
<image
|
||||
v-if="childrenItem.data.name == 'isAddUser'"
|
||||
src="/TUIKit/assets/icon/user-add.svg"
|
||||
mode="heightFix"
|
||||
style="height: 37rpx"
|
||||
/>
|
||||
<image
|
||||
v-if="childrenItem.data.name == 'isScan'"
|
||||
src="/TUIKit/assets/icon/scan.svg"
|
||||
mode="heightFix"
|
||||
style="height: 37rpx"
|
||||
/>
|
||||
<h1 class="list-item-title">
|
||||
{{ childrenItem.text }}
|
||||
</h1>
|
||||
@@ -108,6 +125,7 @@
|
||||
listener = { onClicked: () => {} }
|
||||
} = item
|
||||
if (children) {
|
||||
// TUIKit\assets\icon\user-add.svg
|
||||
const addUserItem = {
|
||||
data: { name: 'isAddUser' },
|
||||
icon: '/TUIKit/assets/icon/user-add.svg',
|
||||
|
||||
@@ -163,7 +163,10 @@
|
||||
import { createImGroup } from '../../../../api/tui-kit'
|
||||
import { chooseImage } from '../../../../utils/media'
|
||||
import { uploadSingleFile } from '../../../../utils/uploadFile'
|
||||
import { validateGroupNumber } from '../../../../utils/validate'
|
||||
import { useUI } from '../../../../utils/use-ui'
|
||||
|
||||
const { showToast } = useUI()
|
||||
const TUIGroupServer = Server.getInstance()
|
||||
const TUIConstants = TUIGroupServer.constants
|
||||
|
||||
@@ -229,9 +232,7 @@
|
||||
placeholder: TUITranslateService.t('TUIGroup.请输入群名称')
|
||||
}
|
||||
const groupIDInput = {
|
||||
name: `${TUITranslateService.t(
|
||||
'TUIGroup.群ID'
|
||||
)}(${TUITranslateService.t('TUIGroup.选填')})`,
|
||||
name: `群号码`,
|
||||
key: 'groupID',
|
||||
placeholder: '搜索加入群使用'
|
||||
}
|
||||
@@ -241,7 +242,10 @@
|
||||
})
|
||||
|
||||
const submitDisabledStatus = computed(() => {
|
||||
return groupInfo.profile.name === '' && !groupInfo.isEdit
|
||||
return (
|
||||
groupInfo.profile.name === '' ||
|
||||
(groupInfo.profile.groupID === '' && !groupInfo.isEdit)
|
||||
)
|
||||
})
|
||||
|
||||
const selected = (type: any) => {
|
||||
@@ -296,11 +300,15 @@
|
||||
if (options.type === TUIChatEngine.TYPES.GRP_COMMUNITY) {
|
||||
delete options.groupID
|
||||
}
|
||||
const isGroupID = validateGroupNumber(options.groupID)
|
||||
|
||||
if (!isGroupID.valid) {
|
||||
return showToast(isGroupID.message)
|
||||
}
|
||||
const res = await TUIGroupService.createGroup({
|
||||
...options,
|
||||
avatar: groupAvatar.value
|
||||
})
|
||||
console.log(res)
|
||||
const { type } = res.data.group
|
||||
if (type === TUIChatEngine.TYPES.GRP_AVCHATROOM) {
|
||||
await TUIGroupService.joinGroup({
|
||||
@@ -314,10 +322,14 @@
|
||||
type: TOAST_TYPE.SUCCESS
|
||||
})
|
||||
} catch (err: any) {
|
||||
Toast({
|
||||
message: err.message,
|
||||
type: TOAST_TYPE.ERROR
|
||||
})
|
||||
if (err.code === 10025) {
|
||||
showToast('该群组号已存在', 'error')
|
||||
} else {
|
||||
Toast({
|
||||
message: err.message,
|
||||
type: TOAST_TYPE.ERROR
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user