2025-09-29
聊天记录上拉获取记录
This commit is contained in:
@@ -164,6 +164,7 @@
|
||||
</view>
|
||||
</u-modal>
|
||||
|
||||
<u-toast ref="pdMsgRef" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -173,6 +174,8 @@
|
||||
import { programAPI } from '../../api/program';
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { groupAPI } from '../../api/group';
|
||||
|
||||
const pdMsgRef = ref()
|
||||
|
||||
const userId = ref()
|
||||
const programId = ref()
|
||||
@@ -229,11 +232,17 @@
|
||||
} else {
|
||||
// 开启群组聊天
|
||||
groupAPI.add({ programId: programId.value, userId: userId.value }).then(res => {
|
||||
console.log(res);
|
||||
if(res.code==200){
|
||||
// 创建成功,进入聊天
|
||||
uni.redirectTo({
|
||||
url: '/pages/message/chat?groupId=' + res.data.groupId
|
||||
})
|
||||
}else{
|
||||
pdMsgRef.value.show({
|
||||
title: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user