{"id":19001712,"url":"https://github.com/ledccn/wechat-express-intracity","last_synced_at":"2025-04-22T17:48:14.398Z","repository":{"id":253070504,"uuid":"842366667","full_name":"ledccn/wechat-express-intracity","owner":"ledccn","description":"微信小程序同城配送","archived":false,"fork":false,"pushed_at":"2024-09-29T10:06:35.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T17:23:50.049Z","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/ledccn.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":"2024-08-14T07:52:29.000Z","updated_at":"2024-09-29T10:06:08.000Z","dependencies_parsed_at":"2024-11-08T18:12:28.500Z","dependency_job_id":"3d5fed76-727a-44f9-a225-8f729f787b68","html_url":"https://github.com/ledccn/wechat-express-intracity","commit_stats":null,"previous_names":["ledccn/wechat-express-intracity"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledccn%2Fwechat-express-intracity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledccn%2Fwechat-express-intracity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledccn%2Fwechat-express-intracity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledccn%2Fwechat-express-intracity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ledccn","download_url":"https://codeload.github.com/ledccn/wechat-express-intracity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249283003,"owners_count":21243656,"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-08T18:12:24.398Z","updated_at":"2025-04-16T22:31:22.059Z","avatar_url":"https://github.com/ledccn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 说明\n\n\n## 安装\n\n`composer require ledc/intra-city`\n\n## 使用说明\n\n开箱即用，只需要传入一个配置，初始化一个实例即可：\n\n```php\nuse Ledc\\IntraCity\\Config;\nuse Ledc\\IntraCity\\ExpressApi;\n\n//更多配置项，可以查看 配置管理类的属性 Ledc\\IntraCity\\Config\n$config = [\n    'appid' =\u003e '',\n    'token' =\u003e '',\n    'access_token' =\u003e function (string $appid) use ($miniProgramAccessToken) {\n          return $miniProgramAccessToken-\u003egetToken();\n     },\n    'aes_sn' =\u003e '',\n    'aes_key' =\u003e '',\n    'rsa_sn' =\u003e '',\n    'rsa_public_key' =\u003e '',\n    'rsa_private_key' =\u003e '',\n    'cert_sn' =\u003e '',\n    'cert_key' =\u003e '',\n    'callback_url' =\u003e '',\n    'wx_store_id' =\u003e '',\n    'order_detail_path' =\u003e '',\n    'enable' =\u003e true,\n    'use_sandbox' =\u003e true,\n];\n\n$api = new ExpressApi(new Config($config));\n```\n\n在创建实例后，所有的方法都可以有IDE自动补全；例如：\n\n```php\n//开通门店权限（无加密，可直接调用）\n$api-\u003eapply();\n\n//创建门店\n$api-\u003ecreateStore();\n\n//查询门店\n$api-\u003equeryStore();\n\n//更新门店\n$api-\u003eupdateStore();\n\n//门店运费充值\n$api-\u003estoreCharge();\n\n//门店运费退款\n$api-\u003estoreRefund();\n\n//门店运费流水查询\n$api-\u003equeryFlow();\n\n//门店余额查询\n$api-\u003ebalanceQuery();\n\n//查询运费\n$api-\u003epreviewAddOrder();\n\n//创建配送单\n$api-\u003eaddOrder();\n\n//查询配送单\n$api-\u003equeryOrder();\n\n//取消配送单\n$api-\u003ecancelOrder();\n\n//模拟回调接口\n$api-\u003emockNotify();\n```\n\n\n## 二次开发\n\n配置管理类：`Ledc\\IntraCity\\Config`\n\n同城配送API：`Ledc\\IntraCity\\ExpressApi`\n\n你可以继承`Ledc\\IntraCity\\Config`或`Ledc\\IntraCity\\ExpressApi`，扩展您需要的功能。\n\n\n\n## 捐赠\n\n![reward](reward.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fledccn%2Fwechat-express-intracity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fledccn%2Fwechat-express-intracity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fledccn%2Fwechat-express-intracity/lists"}