PHPackages                             purocean/yii2-template - 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. [Framework](/categories/framework)
4. /
5. purocean/yii2-template

ActiveProject[Framework](/categories/framework)

purocean/yii2-template
======================

Yii 2 Project Template

v0.1.0(9y ago)2327MITPHPPHP &gt;=5.4.0

Since Nov 16Pushed 9y ago5 watchersCompare

[ Source](https://github.com/purocean/yii2-template)[ Packagist](https://packagist.org/packages/purocean/yii2-template)[ Docs](https://github.com/purocean/)[ RSS](/packages/purocean-yii2-template/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (10)Versions (12)Used By (0)

Yii2 应用模板，包含企业号同步联系人，扫码登录，使用蚂蚁金服做前端 UI
======================================

[](#yii2-应用模板包含企业号同步联系人扫码登录使用蚂蚁金服做前端-ui)

[![composer.lock](https://camo.githubusercontent.com/c770bd5e071e59567e2da9de0e42bcdab2656dd832f51bae815f7f579efd72e5/68747470733a2f2f706f7365722e707567782e6f72672f7075726f6365616e2f796969322d74656d706c6174652f636f6d706f7365726c6f636b)](https://packagist.org/packages/purocean/yii2-template)[![Build Status](https://camo.githubusercontent.com/6ceb0bdcb5b4670a3b38745f8e1b0e416dfbbe6764f6d2c624778366317b8fd7/68747470733a2f2f7472617669732d63692e6f72672f7075726f6365616e2f796969322d74656d706c6174652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/purocean/yii2-template)[![Latest Stable Version](https://camo.githubusercontent.com/5e5d7fdad02b01571132684a09a668bad71481b19506061999e8d8ad06e67a9e/68747470733a2f2f706f7365722e707567782e6f72672f7075726f6365616e2f796969322d74656d706c6174652f762f737461626c65)](https://packagist.org/packages/purocean/yii2-template)[![Total Downloads](https://camo.githubusercontent.com/8c54df9ab708cf41ee99c7b8f2c2959f71185e312374543d7b83adca60f5b612/68747470733a2f2f706f7365722e707567782e6f72672f7075726f6365616e2f796969322d74656d706c6174652f646f776e6c6f616473)](https://packagist.org/packages/purocean/yii2-template)[![License](https://camo.githubusercontent.com/3e9b7d8a2cb85edaee8b1c6dfbec969629902348ef276afad26ce78d031ca336/68747470733a2f2f706f7365722e707567782e6f72672f7075726f6365616e2f796969322d74656d706c6174652f6c6963656e7365)](https://packagist.org/packages/purocean/yii2-template)

特性
--

[](#特性)

- 微信企业号同步联系人
- 扫码登录
- [蚂蚁金服](https://ant.design/)前端界面
- 文件上传处理
- 微信 jssdk
- RESTful

若需要使用 jQuery 和 Bootstrap 开发前端，请使用 [传统模板](https://github.com/purocean/yii2-template/tree/classics)

安装
--

[](#安装)

```
# 仅测试 PHP7.0
composer global require "fxp/composer-asset-plugin:^1.2.0"
composer install --prefer-dist
./init
vim ./common/config/main.php
vim ./common/config/main-local.php
vim ./common/config/params-local.php
./yii migrate # 迁移表结构
./yii rbac/reset-password suadmin  # 更改超级管理员密码
./yii serve 192.168.1.108:8080 -t=@application/web # 运行开发服务器，IP 为本机局域网 IP，以便手机访问
cd frontend
npm install # 安装 nodejs 依赖
# 修改本机后台服务器 IP 端口
cp ./frontend/cfg/local.js.example ./frontend/cfg/local.js
vim ./frontend/cfg/local.js
npm run serve # 运行开发服务器
npm run dist # 前端打包
```

测试
--

[](#测试)

```
vim ./common/config/test-local.php
./yii_test migrate
composer exec codecept build
composer exec codecept run
```

注意
--

[](#注意)

默认扫码登录使用 Ajax 轮询方式，使用 WebSocket 方式：

```
vim ./frontend/src/config/base.js # 配置 WebSocket 端口
cd ./frontend/
npm run dist
./yii workerman
```

截图
--

[](#截图)

[![login_1](./screenshots/login_1.png "账号密码登录")](./screenshots/login_1.png)[![login_2](./screenshots/login_2.png "二维码登录")](./screenshots/login_2.png)[![login_3](./screenshots/login_3.png "二维码登录")](./screenshots/login_3.png)[![user](./screenshots/user.png "用户管理")](./screenshots/user.png)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~17 days

Total

10

Last Release

3308d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/788b15496d4992227987785a659ea132c0d4b32b701a767c3820059e70bab73a?d=identicon)[purocean](/maintainers/purocean)

---

Top Contributors

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

---

Tags

frameworkyii2project template

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/purocean-yii2-template/health.svg)

```
[![Health](https://phpackages.com/badges/purocean-yii2-template/health.svg)](https://phpackages.com/packages/purocean-yii2-template)
```

###  Alternatives

[izyue/yii2-app-advanced

Yii 2 Advanced Project Template

1281.9k](/packages/izyue-yii2-app-advanced)[yii2mod/base

Base application template for Yii2

531.3k](/packages/yii2mod-base)

PHPackages © 2026

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