新增页面

This commit is contained in:
2022-02-15 11:55:48 +08:00
parent 53e800738b
commit ad58731a78
4 changed files with 50 additions and 19 deletions

View File

@@ -196,7 +196,7 @@ const joinGroup = (groupId, message) => {
const quitGroup = (groupId) => { const quitGroup = (groupId) => {
return request({ return request({
method: 'POST', method: 'DELETE',
url: 'im/groups/' + groupId + '/quit' url: 'im/groups/' + groupId + '/quit'
}) })
} }

View File

@@ -52,8 +52,8 @@
"path": "pages/record/foods", "path": "pages/record/foods",
"name": "RecordFoods", "name": "RecordFoods",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
@@ -467,33 +467,40 @@
} }
} }
} }
}, },
{ {
"path": "pages/im/group/apply", "path": "pages/im/group/apply",
"name": "imGroupApply", "name": "imGroupApply",
"style": { "style": {
"navigationBarTitleText": "申请加群" "navigationBarTitleText": "申请加群"
} }
}, },
{ {
"path": "pages/im/group/info", "path": "pages/im/group/info",
"name": "imGroupInfo", "name": "imGroupInfo",
"style": { "style": {
"navigationBarTitleText": "群信息" "navigationBarTitleText": "群信息"
}
},
{
"path": "pages/im/group/invite",
"name": "imGroupInvite",
"style": {
"navigationBarTitleText": "邀请好友"
} }
}, },
{ {
"path": "pages/im/group/users", "path": "pages/im/group/users",
"name": "imGroupUsers", "name": "imGroupUsers",
"style": { "style": {
"navigationBarTitleText": "群成员" "navigationBarTitleText": "群成员"
} }
}, },
{ {
"path": "pages/im/group/announcement", "path": "pages/im/group/announcement",
"name": "imGroupAnnouncement", "name": "imGroupAnnouncement",
"style": { "style": {
"navigationBarTitleText": "群公告", "navigationBarTitleText": "群公告",
"app-plus": { "app-plus": {
"titleNView": { "titleNView": {
"type": "default", "type": "default",
@@ -511,7 +518,7 @@
"path": "pages/im/group/announceCreate", "path": "pages/im/group/announceCreate",
"name": "imGroupAnnouncementCreate", "name": "imGroupAnnouncementCreate",
"style": { "style": {
"navigationBarTitleText": "发布群公告" "navigationBarTitleText": "发布群公告"
} }
}, },
{ {

View File

@@ -202,9 +202,8 @@
} }
}, },
inviteUser() { inviteUser() {
uni.showToast({ uni.navigateTo({
icon: 'none', url: '/pages/im/group/invite?targetId=' + this.targetId
title: '开发中'
}) })
}, },
loadMore() { loadMore() {
@@ -247,7 +246,6 @@
}, },
// 修改群头像 // 修改群头像
onGroupAvatar() { onGroupAvatar() {
console.log('onGroupAvatar');
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
sourceType: ['album'], sourceType: ['album'],
@@ -362,10 +360,15 @@
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '退出群聊成功' title: '退出群聊成功'
}) })
// 移除指定的会话
RongIMLib.removeConversation(this.conversationType, this.targetId)
uni.switchTab({ uni.switchTab({
url: '/pages/im/index' url: '/pages/im/index'
}) })
}).catch(err => {
console.log(err);
}) })
} }
} }

21
pages/im/group/invite.vue Normal file
View File

@@ -0,0 +1,21 @@
<template>
<view class="">
</view>
</template>
<script>
export default {
data() {
return {
targetId: ''
}
},
onLoad(e) {
this.targetId = e.targetId
}
}
</script>
<style>
</style>