PHPackages                             lom/wx-reward - 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. lom/wx-reward

ActiveLibrary

lom/wx-reward
=============

wx-reward

06PHP

Since Nov 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/AccountOfLom/WeChatReward)[ Packagist](https://packagist.org/packages/lom/wx-reward)[ RSS](/packages/lom-wx-reward/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

### 拼手气红包算法

[](#拼手气红包算法)

#### 参考文章：

[](#参考文章)

- [知乎：微信红包的随机算法是怎样实现的？](https://www.zhihu.com/question/22625187/answer/85530416)

#### 算法规则：

[](#算法规则)

- 红包依次分配
- 每一个红包的额度为（`红包总额` - `已分配额`）/ `剩余应发数` \* `1~20%`
- 最后一个红包为（`总金额` - `已分配所有金额`）
- 每个红包至少`0.01`元

#### FAQ

[](#faq)

- 红包数量巨大时需把`正态分布数组循环部分代码`注释，否则程序`执行时间`会过长

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6883eee7ef17c911777ce61fbda120675daac1318584fe10eccc59d2991e4937?d=identicon)[xlom](/maintainers/xlom)

---

Top Contributors

[![AccountOfLom](https://avatars.githubusercontent.com/u/22764176?v=4)](https://github.com/AccountOfLom "AccountOfLom (39 commits)")

### Embed Badge

![Health badge](/badges/lom-wx-reward/health.svg)

```
[![Health](https://phpackages.com/badges/lom-wx-reward/health.svg)](https://phpackages.com/packages/lom-wx-reward)
```

PHPackages © 2026

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