{"id":19993618,"url":"https://github.com/yingouqlj/MiniProgram-lite","last_synced_at":"2025-05-04T12:32:06.951Z","repository":{"id":57087310,"uuid":"79208538","full_name":"yingouqlj/MiniProgram-lite","owner":"yingouqlj","description":"微信小程序php后端接口轻量版（wechat mini program sdk 项目名称不带wechat是不是不会被人发现的😆）","archived":false,"fork":false,"pushed_at":"2019-07-05T07:04:44.000Z","size":18,"stargazers_count":35,"open_issues_count":2,"forks_count":19,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-13T19:51:28.442Z","etag":null,"topics":["miniprograms","wechat","wechat-app"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yingouqlj.png","metadata":{"files":{"readme":"README.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}},"created_at":"2017-01-17T09:01:45.000Z","updated_at":"2024-10-17T00:33:42.000Z","dependencies_parsed_at":"2022-08-24T14:59:13.146Z","dependency_job_id":null,"html_url":"https://github.com/yingouqlj/MiniProgram-lite","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/yingouqlj%2FMiniProgram-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yingouqlj%2FMiniProgram-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yingouqlj%2FMiniProgram-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yingouqlj%2FMiniProgram-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yingouqlj","download_url":"https://codeload.github.com/yingouqlj/MiniProgram-lite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252334817,"owners_count":21731470,"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":["miniprograms","wechat","wechat-app"],"created_at":"2024-11-13T04:52:51.338Z","updated_at":"2025-05-04T12:32:06.602Z","avatar_url":"https://github.com/yingouqlj.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# miniProgram-lite\n微信小程序php后端接口轻量版\n\n\n####初衷：\n好用的微信SDK一大堆，已经没有自己写了。  \n但是好用的SDK大而全，依赖也大。对于业务很小的应用着实有点浪费。  \n当时业务需求，顺势做小程序，但是实际后端的接口用量很小，所以打算用到的接口自己包一下。  \n再然后，就打算拆出来分享出来。  \n\n##安装：\n```shell\ncomposer require yingouqlj/wechat-mini-program-lite\n```\n\n\n##基本使用:\n\n```php\n\u003c?php\n\nuse Yingou\\MiniProgram\\MiniProgram;\n$config=[\n    'appId' =\u003e 'appid',\n    'secret' =\u003e 'secret'\n    ];\n$program=new MiniProgram($config);\n//创建Qrcode\n$program-\u003ecreateQrCode-\u003ecreate('/page?id=1',120);\n\n```\n\n\n##建议用法:\n增加个配置继承Config  \n在里面实现 token 的读写覆盖原有方法  \n\n```php\n\u003c?php\n\nclass ProgramConfig extends \\Yingou\\MiniProgram\\Config{\n    public function getAccessToken()\n    {\n        //覆盖掉原来的方法在这里 读取token\n    }\n     public function setAccessToken($token, $expires = 0)\n     {\n          //覆盖写入 如 redis      \n     }   \n}\n\nuse Yingou\\MiniProgram\\MiniProgram;\n$program=new MiniProgram(new ProgramConfig());\n$program-\u003ecreateQrCode-\u003ecreate('/page?id=1',120);\n\n```\n\n\n##接口\n\n+ [获取 access_token](https://github.com/yingouqlj/MiniProgram-lite/wiki/%E8%8E%B7%E5%8F%96-access_token)\n+ [js换取登录后的openid](https://github.com/yingouqlj/MiniProgram-lite/wiki/code-%E6%8D%A2%E5%8F%96-session_key)\n\n\n####进度\n先立项，慢慢完善。后面也会考虑引入其他依赖包。第一版是轻巧。\n\u003ca href=\"https://yingou.net\"\u003e\n\u003cimg src='https://hit.yingou.net/image/s.jpg' /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyingouqlj%2FMiniProgram-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyingouqlj%2FMiniProgram-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyingouqlj%2FMiniProgram-lite/lists"}