{"id":28364452,"url":"https://github.com/wildfirechat/wx-chat","last_synced_at":"2025-06-23T15:31:45.053Z","repository":{"id":38434398,"uuid":"217808804","full_name":"wildfirechat/wx-chat","owner":"wildfirechat","description":"野火IM微信小程序版","archived":false,"fork":false,"pushed_at":"2025-03-11T06:04:45.000Z","size":15718,"stargazers_count":75,"open_issues_count":1,"forks_count":77,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-04T23:10:18.804Z","etag":null,"topics":["im","websocket","wechat"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wildfirechat.png","metadata":{"files":{"readme":"README-org.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-27T05:20:25.000Z","updated_at":"2025-05-25T16:56:46.000Z","dependencies_parsed_at":"2024-05-28T09:45:18.334Z","dependency_job_id":"d34e9cba-772c-45ec-b6bc-5ce882fc75a0","html_url":"https://github.com/wildfirechat/wx-chat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wildfirechat/wx-chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wildfirechat%2Fwx-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wildfirechat%2Fwx-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wildfirechat%2Fwx-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wildfirechat%2Fwx-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wildfirechat","download_url":"https://codeload.github.com/wildfirechat/wx-chat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wildfirechat%2Fwx-chat/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261504205,"owners_count":23168775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["im","websocket","wechat"],"created_at":"2025-05-28T20:44:28.826Z","updated_at":"2025-06-23T15:31:45.040Z","avatar_url":"https://github.com/wildfirechat.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wechat-im\n\n[![Build Status](https://travis-ci.org/unmagic/wechat-im.svg?branch=master)](https://travis-ci.org/unmagic/wechat-im)\n[![Version status](https://img.shields.io/badge/release-2.0.0-brightgreen.svg)](https://github.com/unmagic/wechat-im)\n[![Code Size](https://img.shields.io/badge/code%20size-180kb-brightgreen.svg)](https://github.com/unmagic/wechat-im)\n[![Dependency status](https://img.shields.io/badge/dependencies-none-brightgreen.svg)](https://img.shields.io/badge/dependencies-none-brightgreen.svg)\n[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/unmagic/wechat-im/blob/master/LICENSE)\n\n### 微信小程序即时通讯\n\n开发这个项目付出了我很多心血，如果对你有帮助和启发的话，希望在`GitHub`上给个`star`！也是对我工作的支持和肯定！\n\n也非常感谢[kulovecc](https://github.com/kulovecc)对项目中文本超长溢出布局的问题的修正和提交！\n\n## 介绍：\nwechat-im是一个可以让你在小程序平台快速实现即时通讯功能的完整模板。\n\n# 现已更新2.0.0版本\n\n## 相对1.0.x及之前的版本，2.x.x新增的特性\n- [x] 全面使用ES6语法，异步操作使用Promise和async语法糖，让代码更符合语义！（\u003cfont color=\"red\"\u003e需要较新的微信开发工具，并开启\"增强编译\"\u003c/font\u003e）\n- [x] 文本输入功能已使用Component组件化，比之前的版本性能更好！\n- [x] 最低支持微信基础库版本为2.6.1（之前的最低支持是1.4.0）\n- [x] 修复了一些场景下的问题。比如播放语音消息时，退出聊天界面，依旧会播放语音的问题。\n- [ ] 2.0.0文档，过些日子再更新吧。有能力的同学可以更新啦，大部分是语法的更新和组件化。我近期比较忙，很抱歉各位同学。\n\n## 特性：\n- [x] 目前项目中已使用webSocket，实现了IM的通信功能！目前包括会话列表页面、会话页面及好友页面。支持使用nodejs开启本地WebSocket服务。\n- [x] 支持发送文本、图片、语音，支持输入法的emoji表情\n- [x] 支持拍照，图库选择图片、图片预览\n- [x] 支持切换到文本输入时，显示发送按钮。\n- [x] 支持语音播放及播放动画。\n- [x] 支持配置录制语音的最短及最长时间。\n- [x] 支持配置自定义事件。\n- [x] 支持聊天消息按时间排序。\n- [x] 支持发送消息后，页面回弹到最底部。\n- [x] 使用了最新的语音播放接口，同时兼容了低版本的语音播放接口。\n- [x] 消息发送中、发送成功、发送失败的状态更新\n- [x] 支持消息发送失败情况下，点击重发按钮重新发送\n- [x] 优化时间气泡显示逻辑，相邻信息大于5分钟显示后者信息的时间\n- [x] 在页面最上方增加了会话状态的UI展示\n- [x] 自定义功能，显示自定义气泡。\n- [x] 通过解析语音或图片消息信息，优先读取本地文件。\n- [x] 实现了文件存储算法，保证10M存储空间内的语音和图片文件均为最新。\n- [x] 各消息类型和各功能均已模块化，让你在浏览代码时愉悦轻松。（其实这算不上组件特性。。。）\n\n## 目前不支持的功能：\n- 如果要使用群聊，目前的UI中，头像旁并没有展示成员昵称。\n- 本地没有存储历史聊天消息。原因请看[文档](https://blog.csdn.net/sinat_27612147/article/details/78456363)结尾。\n- 目前WebSocket所有功能仅供学习和参考，若想商用，请自行开发。\n- 目前还不支持以插件方式使用。\n\n## 学习或使用该项目，需要你具备哪些条件\n- 需要你熟悉ES6的语法规范，以及设计模式，否则该项目对你来说门槛很高。\n- websocket不必深入掌握，但需要你知晓WebSocket的常见API及其用法，详见[小程序WebSocket](https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/wx.sendSocketMessage.html)\n- 了解npm依赖的安装，命令的执行（这块主要用于启动本地的WebSocket服务）\n\n## 如何安装使用\n\n#### 1. 开发者工具导入项目\n```\n修改app.js文件中下面配置的url为你本地网络ip及固定的端口号8001，即ws://xx.xx.xx.xx:8001\nthis.imWebSocket.createSocket({url: 'ws://10.4.97.87:8001'});\n```\n\n#### 2. 搭建本地WebSocket服务\n```\n安装依赖 npm install\nTerminal运行 gulp 即可开启WebSocket服务\n```\n#### 3. 使用开发者工具运行项目\n\n如果你的项目使用这个框架并且正式投入运营，方便的话可以提供下你们的小程序二维码，我可以在这里为大家推广。\n\n\n### LINK\n\n[Document](https://blog.csdn.net/sinat_27612147/article/details/78456363)\n\n[Questions](https://github.com/unmagic/wechat-im/blob/master/log/QA.md)\n\n[ChangeLog](https://github.com/unmagic/wechat-im/blob/master/log/ChangeLog.md)\n\n[LICENSE](https://github.com/unmagic/wechat-im/blob/master/LICENSE)\n\n### 合作\n\n技术交流请加QQ群：821711186 \n\n如有合作意向或是想要推广您的产品，可加QQ：1178545208\n\n### 欢迎打赏\n\n\u003cimg src=\"https://github.com/unmagic/.gif/blob/master/admire/weixin.png\" /\u003e\u003cimg src=\"https://github.com/unmagic/.gif/blob/master/admire/zhifubao.png\" /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwildfirechat%2Fwx-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwildfirechat%2Fwx-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwildfirechat%2Fwx-chat/lists"}