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. zijinghua\_dev/zwechat

ActiveLibrary

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 today

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

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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

2078d 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

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M344](/packages/tymon-jwt-auth)[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[spatie/laravel-sitemap

Create and generate sitemaps with ease

2.6k14.6M107](/packages/spatie-laravel-sitemap)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)

PHPackages © 2026

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