PHPackages                             zijinghua\_dev/zwechat - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zijinghua\_dev/zwechat

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zijinghua\_dev/zwechat
======================

1.0.3(5y ago)038MITPHP

Since Aug 12Pushed 5y ago2 watchersCompare

[ Source](https://github.com/zijinghua-dev/zwechat)[ Packagist](https://packagist.org/packages/zijinghua_dev/zwechat)[ RSS](/packages/zijinghua-dev-zwechat/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (2)Versions (8)Used By (0)

\#初始化工作

> (1) 使用php artisan vendor:pulish --provider='Zijinghua\\Zwechat\\ServiceProvider'发布包

> (2) 根据实际需要，在.env中增加WECHAT\_APPS配置，格式如下:

> - WECHAT\_APPS='\[{"app\_id":"微信app id","app\_secret":"微信app secret"}\]'

> (3) Zijinghua\\Zwechat\\Jobs\\RefreshAccessToken可用于定时检查、刷新网页授权access\_token

> (4) 异常code
>
> - invalid\_oauth\_code:无效的code
> - invalid\_open\_id:无效的openid
> - miss\_oauth\_code:缺失授权code

\#目前提供如下API接口，在使用以下API接口时，依然要执行上述步骤(1)(2) (1) 接口：获取微信openid，uri：api/zijinghua/wechat/open-id。

> - 请求方式：GET。
> - 请求参数：
> - app\_id：应用的app id；
> - code：微信授权code
> - 正常返回：{"openid":"openid"}
> - 异常返回：{"message":"message", "errors":{"code":"异常code","message":"message"}}

(2) 接口：获取微信unionid，uri：api/zijinghua/wechat/union-id。

> - 请求方式：GET。
> - 请求参数：
> - app\_id：应用的app id；
> - code：微信授权code；
> - open\_id：微信openid，code和open\_id可以二选一
> - 正常返回：

```
{
     "openid": "openid",
     "nickname": "昵称",
     "sex": 1,
     "language": "zh_CN",
     "city": "city",
     "province": "province",
     "country": "country",
     "headimgurl": "微信头像",
     "privilege": [],
     "unionid": "unionid"
 }
```

> - 异常返回：{"message":"message", "errors":{"code":"异常code","message":"message"}}

(3) 接口：获取微信jssdk配置，uri：api/zijinghua/wechat/jssdk-config。

> - 请求方式：GET。
> - 请求参数：
> - > - app\_id：应用的app id；
> - > - url：调用微信jssdk所在页面对应的URL
> - 正常返回：

```
{
    "debug": false,
    "beta": false,
    "jsApiList": [],
    "appId": "appId",
    "nonceStr": "eEoJwxRBFi",
    "timestamp": 1597213070,
    "url": "url",
    "signature": "e094e67b7b37484f1507ab342d969dd1dedce04c"
}
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 74.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

6

Last Release

2131d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dcf7b54c041e7f7250411a4b13baaaae80501a65867fd92a78745859f184fd90?d=identicon)[zijinghua-dev](/maintainers/zijinghua-dev)

---

Top Contributors

[![fengliang2011](https://avatars.githubusercontent.com/u/7171983?v=4)](https://github.com/fengliang2011 "fengliang2011 (26 commits)")[![wuhan-zijinghua](https://avatars.githubusercontent.com/u/68526544?v=4)](https://github.com/wuhan-zijinghua "wuhan-zijinghua (9 commits)")

### Embed Badge

![Health badge](/badges/zijinghua-dev-zwechat/health.svg)

```
[![Health](https://phpackages.com/badges/zijinghua-dev-zwechat/health.svg)](https://phpackages.com/packages/zijinghua-dev-zwechat)
```

###  Alternatives

[illuminate/support

The Illuminate Support package.

630113.0M41.0k](/packages/illuminate-support)[spatie/holidays

Calculate public holidays

402860.1k2](/packages/spatie-holidays)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293952.6k30](/packages/craftcms-feed-me)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k17](/packages/solspace-craft-freeform)[pimcore/data-importer

Adds a comprehensive import functionality to Pimcore Datahub

46855.5k5](/packages/pimcore-data-importer)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
