diff --git a/ling_chair_http/handler.js b/ling_chair_http/handler.js index 5fe2923..f76f725 100644 --- a/ling_chair_http/handler.js +++ b/ling_chair_http/handler.js @@ -232,7 +232,23 @@ class ContactsList { ChatMsgAdapter.switchTo(name, "single") }) } + }) + client.emit("user.getGroups", { + name: localStorage.userName, + accessToken: await CurrentUser.getAccessToken(), + }, async (re) => { + if (re.code !== 0) + return mdui.snackbar(re.msg) + viewBinding.groupsList.empty() + let ls = re.data.groups + for (let index in ls) { + let name = ls[index] + let dick = await NickCache.getNick(name) + $($.parseHTML(`
  • ` + dick + `
  • `)).appendTo(viewBinding.groupsList).click(() => { + ChatMsgAdapter.switchTo(name, "single") + }) + } }) } /** diff --git a/ling_chair_http/index.html b/ling_chair_http/index.html index e96d786..901c054 100644 --- a/ling_chair_http/index.html +++ b/ling_chair_http/index.html @@ -55,6 +55,13 @@
    +
  • +
    group +
    群聊
    keyboard_arrow_down +
    +
    +
    +