{"id":16439606,"url":"https://github.com/sevenoutman/codeigniter-weixin_library","last_synced_at":"2025-03-23T08:31:51.579Z","repository":{"id":77177392,"uuid":"59081819","full_name":"SevenOutman/CodeIgniter-Weixin_Library","owner":"SevenOutman","description":"适用于CodeIgniter框架的微信网页授权模块","archived":false,"fork":false,"pushed_at":"2016-06-13T12:27:10.000Z","size":18,"stargazers_count":24,"open_issues_count":0,"forks_count":14,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-01T23:27:03.674Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SevenOutman.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-18T04:25:44.000Z","updated_at":"2022-02-12T10:12:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef575a48-78b5-4693-bae0-4c3d893f0088","html_url":"https://github.com/SevenOutman/CodeIgniter-Weixin_Library","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/SevenOutman%2FCodeIgniter-Weixin_Library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevenOutman%2FCodeIgniter-Weixin_Library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevenOutman%2FCodeIgniter-Weixin_Library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevenOutman%2FCodeIgniter-Weixin_Library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SevenOutman","download_url":"https://codeload.github.com/SevenOutman/CodeIgniter-Weixin_Library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245078067,"owners_count":20557274,"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-10-11T09:09:54.337Z","updated_at":"2025-03-23T08:31:51.563Z","avatar_url":"https://github.com/SevenOutman.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeIgniter-Weixin_Library\n即插即用微信网页授权模块, 适用于[CodeIgniter](https://github.com/bcit-ci/CodeIgniter)框架。\n\n开发测试环境 CI 3.0.6\n\n## 起步\n该模块为即插即用模块, 只需下载`release`即可开始使用\n\n### 目录结构\n```\nCodeIgniter-Weixin_Library/\n├── config/\n│   └── wx_library.php\n├── libraries/\n│   └── Wx_library.php\n└── third_party/\n    └── weixin/\n        └── ...\n```\n\n### 安装\n将项目中的:\n- `config/wx_library.php`文件放入你的项目中`application/config/`目录\n- `libraries/Wx_library.php`文件放入你的项目中`application/libraries/`目录\n- `third_party/weixin/`目录放入你的项目中`application/third_party/`目录\n\n\n## 加载和使用\n\n### 配置\n修改`wx_library.php`配置文件, 填入所开发公众号的信息:\n```\n\u003c?php\n/*\n|--------------------------------------------------------------------------\n| 微信公众号配置\n|--------------------------------------------------------------------------\n|\n| 参数须与微信公众平台一致\n|\n*/\n$config['appid']  = ''; // 必填\n$config['secret'] = ''; // 必填\n$config['token']  = '';\n```\n\n### 加载\n在你的`controller`中, 使用`$this-\u003eload-\u003elibrary()`来加载该库\n```\n// controller\n// (建议将别名设为`wx`)\n$this-\u003eload-\u003elibrary('Wx_library', null, 'wx')\n```\n\n### API\n`Wx_library`提供2个API:\n```\n// 获取当前微信用户\n$this-\u003ewx-\u003egetWxUser();\n\n// 返回微信 js sdk 配置选项 signPackage\n$this-wx-\u003esignPackage();\n```\n\n## Note\n你的项目根目录需要有读写权限, `Wx_library`才能更好地工作。因为它需要在文件中缓存`access_token`和`jsapi_ticket`。\n\n## License\nMIT License. Check the `LICENSE` file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsevenoutman%2Fcodeigniter-weixin_library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsevenoutman%2Fcodeigniter-weixin_library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsevenoutman%2Fcodeigniter-weixin_library/lists"}