├── .env.development ├── .env.production ├── .gitignore ├── .vscode └── extensions.json ├── README.md ├── demo.html ├── index.html ├── package.json ├── public └── favicon.ico ├── src ├── App.vue ├── api │ ├── chat │ │ ├── index.ts │ │ └── type.ts │ ├── friend │ │ ├── index.ts │ │ └── type.ts │ ├── group │ │ ├── index.ts │ │ └── type.ts │ ├── http │ │ └── index.ts │ ├── login │ │ ├── index.ts │ │ └── type.ts │ ├── request.ts │ └── session │ │ ├── index.ts │ │ └── type.ts ├── assets │ ├── css │ │ ├── base.css │ │ ├── index.less │ │ └── theme.less │ ├── images │ │ ├── github_login_icon.png │ │ ├── login.png │ │ ├── login1.png │ │ ├── login2.png │ │ ├── logo.png │ │ └── none.png │ └── svg │ │ ├── icons │ │ ├── add.svg │ │ ├── addUser.svg │ │ ├── audio.svg │ │ ├── file.svg │ │ ├── gitee.svg │ │ ├── github.svg │ │ └── smile.svg │ │ └── index.vue ├── components │ ├── AddFriend.vue │ ├── AddGroup.vue │ ├── LogoutDialog.vue │ ├── MyAudio.vue │ ├── UserMsg.vue │ ├── Voice.vue │ └── emoji │ │ ├── Emoji.vue │ │ └── emoji.ts ├── directive │ ├── customMenu │ │ ├── index.ts │ │ └── index.vue │ ├── index.ts │ └── type.ts ├── env.d.ts ├── hooks │ ├── usePoint.ts │ └── useTheme.ts ├── layout │ ├── components │ │ └── UserInfo.vue │ └── index.vue ├── main.ts ├── router │ └── index.ts ├── store │ ├── index.ts │ ├── session.ts │ └── user.ts ├── utils │ ├── index.ts │ ├── session.ts │ ├── socket.ts │ └── storage.ts └── views │ ├── about │ └── index.vue │ ├── address │ └── index.vue │ ├── home │ └── index.vue │ ├── login │ └── index.vue │ └── session │ └── index.vue ├── tsconfig.json ├── tsconfig.node.json ├── vite.config.ts └── yarn.lock /.env.development: -------------------------------------------------------------------------------- 1 | # 环境名称 2 | VITE_APP_NODE_ENV = 'development' 3 | # 后台访问地址 4 | # VITE_APP_BASE_API = 'http://127.0.0.1:8000/api' 5 | # VITE_APP_WS_API = 'ws://127.0.0.1:8000/im/connect?token=' 6 | VITE_APP_BASE_API = 'https://im.pltrue.top/api' 7 | VITE_APP_WS_API = 'wss://im.pltrue.top/im/connect?token=' 8 | VITE_APP_CLIENT_ID= '77fc33d207bafb6006a6' 9 | VITE_APP_REDIRECT_URL = 'https://chat.pltrue.top/login?login_type=github' 10 | VITE_APP_GITEE_CLIENT_ID= '1fcf7fa2c24188b2b63366aa8e9ea0aedd0234cf5685489e2be6572eab39eac9' 11 | VITE_APP_GITEE_REDIRECT_URL = 'https://chat.pltrue.top/login?login_type=gitee' -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | # 环境名称 2 | VITE_APP_NODE_ENV = 'production' 3 | # 后台访问地址 4 | VITE_APP_BASE_API = 'https://im.pltrue.top/api' 5 | VITE_APP_WS_API = 'wss://im.pltrue.top/im/connect?token=' 6 | VITE_APP_CLIENT_ID= '77fc33d207bafb6006a6' 7 | VITE_APP_REDIRECT_URL = 'https://chat.pltrue.top/login?login_type=github' 8 | 9 | VITE_APP_GITEE_CLIENT_ID= '1fcf7fa2c24188b2b63366aa8e9ea0aedd0234cf5685489e2be6572eab39eac9' 10 | VITE_APP_GITEE_REDIRECT_URL = 'https://chat.pltrue.top/login?login_type=gitee' -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | tool.html -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["Vue.volar"] 3 | } 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # im-services web客户端 2 | 3 | [](https://www.oscs1024.com/project/IM-Tools/Im-Services?ref=badge_small) 4 | 5 | 6 | ### 技术栈 :Vue 3 + TypeScript + Vite 7 | 8 | ### 本地环境配置 `.env.development` 9 | ```shell 10 | # 环境名称 11 | VITE_APP_NODE_ENV = 'development' 12 | # 后台访问地址 13 | # VITE_APP_BASE_API = 'http://127.0.0.1:8000/api' 14 | # VITE_APP_WS_API = 'ws://127.0.0.1:8000/im/connect?token=' 15 | VITE_APP_BASE_API = 'http://im.pltrue.top/api' 16 | VITE_APP_WS_API = 'ws://im.pltrue.top/im/connect?token=' 17 | VITE_APP_CLIENT_ID= '77fc33d207bafb6006a6' 18 | VITE_APP_REDIRECT_URL = 'http://chat.pltrue.top/login?login_type=github' 19 | VITE_APP_GITEE_CLIENT_ID= '1fcf7fa2c24188b2b63366aa8e9ea0aedd0234cf5685489e2be6572eab39eac9' 20 | VITE_APP_GITEE_REDIRECT_URL = 'http://chat.pltrue.top/login?login_type=gitee' 21 | ``` 22 | 23 | ### 启动 24 | 25 | ```shell 26 | yarn install 27 | yarn run dev 28 | ``` 29 | 30 | ### 配置 `.env.production` 31 | ```shell 32 | # 环境名称 33 | VITE_APP_NODE_ENV = 'production' 34 | # 后台访问地址 35 | VITE_APP_BASE_API = 'http://im.pltrue.top/api' 36 | VITE_APP_WS_API = 'ws://im.pltrue.top/im/connect?token=' 37 | VITE_APP_CLIENT_ID= '77fc33d207bafb6006a6' 38 | VITE_APP_REDIRECT_URL = 'http://chat.pltrue.top/login?login_type=github' 39 | 40 | VITE_APP_GITEE_CLIENT_ID= '1fcf7fa2c24188b2b63366aa8e9ea0aedd0234cf5685489e2be6572eab39eac9' 41 | VITE_APP_GITEE_REDIRECT_URL = 'http://chat.pltrue.top/login?login_type=gitee' 42 | ``` 43 | 44 | ### 打包 45 | 46 | ```shell 47 | yarn run build 48 | ``` -------------------------------------------------------------------------------- /demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 |好友推荐
74 |204 | {{ 205 | selectUser.length > 0 206 | ? `您已选择${selectUser.length}位用户` 207 | : '请勾选需要添加的用户' 208 | }} 209 |
210 |新的朋友
158 |新的朋友
166 |第三方登录
297 |468 | 查看更多消息 471 | 加载中 472 |
473 |475 | {{ getChatPotinTime(item.created_at) }} 476 |
477 |478 | {{ item.msg }} 479 |
480 |