Skip to content
Restful 模板,提供企业号微信扫码登录——Yii2 React ant-design
PHP JavaScript CSS Shell HTML Batchfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
application
common
console
environments
frontend
screenshots
storage
vagrant
.bowerrc
.editorconfig
.gitignore
.travis.yml
LICENSE
LICENSE.md
README.md
Vagrantfile
codeception.yml
composer.json
composer.lock
deploy.sh
init
init.bat
requirements.php
yii.bat

README.md

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

composer.lock Build Status Latest Stable Version Total Downloads License

特性

  • 微信企业号同步联系人
  • 扫码登录
  • 蚂蚁金服前端界面
  • 文件上传处理
  • 微信 jssdk
  • RESTful

若需要使用 jQuery 和 Bootstrap 开发前端,请使用 传统模板

安装

# 仅测试 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 <password> # 更改超级管理员密码
./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 login_2 login_3 user

You can’t perform that action at this time.