{"id":20144162,"url":"https://github.com/quansitech/qs-easywechat","last_synced_at":"2026-05-10T08:50:02.857Z","repository":{"id":187595538,"uuid":"677317596","full_name":"quansitech/qs-easywechat","owner":"quansitech","description":"easywechat4.x扩展","archived":false,"fork":false,"pushed_at":"2023-08-24T07:56:37.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T22:41:58.737Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/quansitech.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-11T09:14:49.000Z","updated_at":"2023-08-11T09:18:55.000Z","dependencies_parsed_at":"2025-01-13T10:41:58.320Z","dependency_job_id":"82383ca1-c02e-48bc-a2bc-31d0b218bbb0","html_url":"https://github.com/quansitech/qs-easywechat","commit_stats":null,"previous_names":["quansitech/qs-easywechat"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqs-easywechat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqs-easywechat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqs-easywechat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quansitech%2Fqs-easywechat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quansitech","download_url":"https://codeload.github.com/quansitech/qs-easywechat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587914,"owners_count":19986627,"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":[],"created_at":"2024-11-13T22:09:02.522Z","updated_at":"2026-05-10T08:49:57.815Z","avatar_url":"https://github.com/quansitech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## easywechat4.0扩展\n微信许多新的接口在easywechat4.x版本已经不再支持，该扩展实现了官方没有支持的接口\n\nhttps://easywechat.com/4.x/installation.html 官方文档\n\n### 案装\n```text\ncomposer require quansitech/qs-easywechat\n```\n\n### 用法\n\n微信公众号用OaProgram\n\n微信小程序用MiniProgram\n\n构造用法类似\n\n简略构造方式\n```php\nuse Qs\\EasyWechat\\MiniProgram;\n\n$mp = new MiniProgram();\n\n/*\n * 该方式必须在.env文件定义\n * MINI_APPID\n * MINI_APPSECRET\n * MINI_MSG_TOKEN\n * MINI_MSG_AESKEY\n */\n```\n\n复杂构造方式\n```php\nuse Qs\\EasyWechat\\MiniProgram;\n$config = [\n    'app_id' =\u003e '****',\n    'secret' =\u003e '****',\n    'token' =\u003e '****',\n    'aes_key' =\u003e '****',\n\n    'log' =\u003e [\n        'level' =\u003e 'debug',\n        'file' =\u003e __DIR__.'/wechat.log',\n    ],\n\n    'response_type' =\u003e 'array'\n];\n$mp = new MiniProgram($config);\n```\n\n1. 手机号验证\n\u003e [微信接口文档](https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/user-info/phone-number/getPhoneNumber.html)\n\u003e \n\u003e 用法\n\u003e  ```php\n\u003e use Qs\\EasyWechat\\MiniProgram;\n\u003e \n\u003e $mp = new MiniProgram();\n\u003e $res = $mp-\u003eapp-\u003ephone_number-\u003egetUserPhoneNumber($code);\n\u003e echo $res['phone_info']['purePhoneNumber'];\n\u003e  ```\n\n2. 身份证识别\n\u003e [微信接口文档](https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/img-ocr/ocr/idCardOCR.html)\n\u003e \n\u003e 用法\n\u003e ```php\n\u003e use Qs\\EasyWechat\\MiniProgram;\n\u003e \n\u003e $mp = new MiniProgram();\n\u003e $img_data = file_get_contents(WWW_DIR . '/idcard.png');\n\u003e $res = $mp-\u003eapp-\u003eid_card_ocr-\u003escanByImg(base64_encode($img_data));\n\u003e \n\u003e $mp-\u003eapp-\u003eid_card_ocr-\u003escanByImgUrl(\"http://test.com/idcard.png\");\n\u003e ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquansitech%2Fqs-easywechat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquansitech%2Fqs-easywechat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquansitech%2Fqs-easywechat/lists"}