This commit is contained in:
bobobobo
2026-02-10 22:58:31 +08:00
parent 89b7566aa1
commit 9245fefc9a
8 changed files with 113 additions and 41 deletions

View File

@@ -165,7 +165,7 @@
import { uploadSingleFile } from '../../../../utils/uploadFile'
import { validateGroupNumber } from '../../../../utils/validate'
import { useUI } from '../../../../utils/use-ui'
import { getRandomGroup } from '../../../../api'
import { getRandomGroup } from '../../../../api'
const { showToast } = useUI()
const TUIGroupServer = Server.getInstance()
@@ -243,9 +243,7 @@ import { getRandomGroup } from '../../../../api'
})
const submitDisabledStatus = computed(() => {
return (
groupInfo.profile.name === ''&& !groupInfo.isEdit
)
return groupInfo.profile.name === '' && !groupInfo.isEdit
})
const selected = (type: any) => {
@@ -306,24 +304,24 @@ import { getRandomGroup } from '../../../../api'
// return showToast(isGroupID.message)
// }
const id = await getRandomGroup()
const res = await TUIGroupService.createGroup({
...options,
groupID: id.data,
avatar: groupAvatar.value
})
const { type } = res.data.group
if (type === TUIChatEngine.TYPES.GRP_AVCHATROOM) {
await TUIGroupService.joinGroup({
groupID: res.data.group.groupID,
applyMessage: ''
getRandomGroup().then(async (id: any) => {
const res = await TUIGroupService.createGroup({
...options,
groupID: id.data,
avatar: groupAvatar.value
})
const { type } = res.data.group
if (type === TUIChatEngine.TYPES.GRP_AVCHATROOM) {
await TUIGroupService.joinGroup({
groupID: res.data.group.groupID,
applyMessage: ''
})
}
handleCompleteCreate(res.data.group)
Toast({
message: TUITranslateService.t('TUIGroup.群组创建成功'),
type: TOAST_TYPE.SUCCESS
})
}
handleCompleteCreate(res.data.group)
Toast({
message: TUITranslateService.t('TUIGroup.群组创建成功'),
type: TOAST_TYPE.SUCCESS
})
} catch (err: any) {
if (err.code === 10025) {