diff --git a/im-uniapp/App.vue b/im-uniapp/App.vue index 4274b60..06e58a0 100644 --- a/im-uniapp/App.vue +++ b/im-uniapp/App.vue @@ -15,6 +15,8 @@ init() { // 加载数据 store.dispatch("load").then(() => { + // 审核 + this.initAudit(); // 初始化websocket this.initWebSocket(); }).catch((e) => { @@ -239,6 +241,21 @@ // this.audioTip = uni.createInnerAudioContext(); // this.audioTip.src = "/static/audio/tip.wav"; // this.audioTip.play(); + }, + initAudit() { + if (store.state.userStore.userInfo.type == 1) { + // 显示群组功能 + uni.setTabBarItem({ + index: 2, + text: "群聊" + }) + } else { + // 隐藏群组功能 + uni.setTabBarItem({ + index: 2, + text: "搜索" + }) + } } }, onLaunch() { diff --git a/im-uniapp/components/user-search/user-search.vue b/im-uniapp/components/user-search/user-search.vue new file mode 100644 index 0000000..fadd7f6 --- /dev/null +++ b/im-uniapp/components/user-search/user-search.vue @@ -0,0 +1,118 @@ + + + + + \ No newline at end of file diff --git a/im-uniapp/pages.json b/im-uniapp/pages.json index 6949536..520b23c 100644 --- a/im-uniapp/pages.json +++ b/im-uniapp/pages.json @@ -61,7 +61,7 @@ "pagePath": "pages/group/group", "iconPath": "static/tarbar/group.png", "selectedIconPath": "static/tarbar/group_active.png", - "text": "群聊" + "text": "搜索" }, { "pagePath": "pages/mine/mine", diff --git a/im-uniapp/pages/group/group.vue b/im-uniapp/pages/group/group.vue index 537b283..a215665 100644 --- a/im-uniapp/pages/group/group.vue +++ b/im-uniapp/pages/group/group.vue @@ -1,5 +1,5 @@