发送红包接口有问题,添加群恢复

This commit is contained in:
bobobobo
2026-01-08 01:44:39 +08:00
parent 1634425c17
commit c0619ea4ec
20 changed files with 2070 additions and 1531 deletions

View File

@@ -30,13 +30,13 @@
<Icon :file="rightIcon" />
</span>
</li>
<li class="group-list-item" @click="cbPopupShow.open('bottom')">
<!-- <li class="group-list-item" @click="cbPopupShow.open('bottom')">
<label class="group-list-item-label">申请加群方式</label>
<span class="group-h5-list-item-content">
<p class="content">{{ applyJoinOptionName }}</p>
<Icon :file="rightIcon" />
</span>
</li>
</li> -->
<li class="group-list-introduction">
<div class="group-list-item">
<label class="group-list-item-label">
@@ -261,59 +261,55 @@
const createGroup = async (options: any) => {
try {
const data = {
applyJoinOption: applyJoinOption.value,
faceUrl: groupAvatar.value,
groupName: options.name,
groupType: options.type,
memberList: options.memberList.map((item: IUserProfile) => {
return { memberAccount: item.userID }
})
}
const res = await createImGroup(data)
const e = res.data
// const type = e.groupType
// if (type === TUIChatEngine.TYPES.GRP_AVCHATROOM) {
// await TUIGroupService.joinGroup({
// groupID: e.groupID,
// applyMessage: ''
// const data = {
// applyJoinOption: applyJoinOption.value,
// faceUrl: groupAvatar.value,
// groupName: options.name,
// groupType: options.type,
// memberList: options.memberList.map((item: IUserProfile) => {
// return { memberAccount: item.userID }
// })
// }
const newRes = await TUIGroupService.getGroupProfile({
groupID: e.groupId
})
// const res = await createImGroup(data)
// const e = res.data
handleCompleteCreate(newRes.data.group)
Toast({
message: TUITranslateService.t('TUIGroup.群组创建成功'),
type: TOAST_TYPE.SUCCESS
})
// const newRes = await TUIGroupService.getGroupProfile({
// groupID: e.groupId
// })
// ========= 原本逻辑
// options.memberList = options.memberList.map(
// (item: IUserProfile) => {
// return { userID: item.userID }
// }
// )
// if (options.type === TUIChatEngine.TYPES.GRP_COMMUNITY) {
// delete options.groupID
// }
// const res = await TUIGroupService.createGroup(options)
// console.log(res)
// const { type } = res.data.group
// if (type === TUIChatEngine.TYPES.GRP_AVCHATROOM) {
// await TUIGroupService.joinGroup({
// groupID: res.data.group.groupID,
// applyMessage: ''
// })
// }
// handleCompleteCreate(res.data.group)
// handleCompleteCreate(newRes.data.group)
// Toast({
// message: TUITranslateService.t('TUIGroup.群组创建成功'),
// type: TOAST_TYPE.SUCCESS
// })
// ========= 原本逻辑
options.memberList = options.memberList.map(
(item: IUserProfile) => {
return { userID: item.userID }
}
)
if (options.type === TUIChatEngine.TYPES.GRP_COMMUNITY) {
delete options.groupID
}
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({
groupID: res.data.group.groupID,
applyMessage: ''
})
}
handleCompleteCreate(res.data.group)
Toast({
message: TUITranslateService.t('TUIGroup.群组创建成功'),
type: TOAST_TYPE.SUCCESS
})
} catch (err: any) {
Toast({
message: err.message,