{"id":25812316,"url":"https://github.com/han1396735592/wechat-stomp","last_synced_at":"2025-10-24T20:15:52.663Z","repository":{"id":57690342,"uuid":"480311226","full_name":"han1396735592/wechat-stomp","owner":"han1396735592","description":"微信小程序stomp客户端","archived":false,"fork":false,"pushed_at":"2022-04-12T01:27:26.000Z","size":11,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T19:02:29.196Z","etag":null,"topics":["stomp","stomp-client","websocket","wechat"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/han1396735592.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-11T09:26:11.000Z","updated_at":"2025-01-27T14:14:35.000Z","dependencies_parsed_at":"2022-09-26T22:30:24.040Z","dependency_job_id":null,"html_url":"https://github.com/han1396735592/wechat-stomp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/han1396735592%2Fwechat-stomp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/han1396735592%2Fwechat-stomp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/han1396735592%2Fwechat-stomp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/han1396735592%2Fwechat-stomp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/han1396735592","download_url":"https://codeload.github.com/han1396735592/wechat-stomp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241086957,"owners_count":19907363,"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":["stomp","stomp-client","websocket","wechat"],"created_at":"2025-02-28T01:53:30.342Z","updated_at":"2025-10-24T20:15:47.624Z","avatar_url":"https://github.com/han1396735592.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 小程序如何使用 stomp\n\n## 安装 `npm i wechat-stomp`\n\n## 1. 初始化连接 建议在 app.js\n\n\u003e ### `wxStompClient` 是全局的一个 stompClient\n\u003e ### `wxStompClient.connect(socketConfig, stompConnectConfig)`\n\u003e\n\n```js\nimport {wxStompClient} from 'wechat-stomp'\n\nwxStompClient.connect({\n    url: 'ws://localhost:8080/stomp/websocket',\n    header: {\n        'content-type': 'application/json',\n    },\n}, {})\n```\n\n### 2.使用 behavior 的方式\n\n\u003e ### 订阅消息 this._stompSubscribe(destination, callback)\n\u003e ### 解除订阅 this._stompUnsubscribe(destination)\n\u003e ### 发送消息 this._stompSend()\n\u003e\n\n```js\nimport {StompBehavior, wxStompClient} from 'wechat-stomp'\n\nPage({\n    behaviors: [StompBehavior]\n})\n```\n\n### 系统主要功能\n\n- 支持使用`behaviors`方式使用stomp的API\n- 支持`web socket`连接断开自动重连\n- 支持主题订阅后断开重新连接后自动恢复订阅功能\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhan1396735592%2Fwechat-stomp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhan1396735592%2Fwechat-stomp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhan1396735592%2Fwechat-stomp/lists"}