{"id":16780824,"url":"https://github.com/purocean/yii2-template","last_synced_at":"2025-04-10T21:15:22.086Z","repository":{"id":57045863,"uuid":"73555497","full_name":"purocean/yii2-template","owner":"purocean","description":"Restful 模板，提供企业号微信扫码登录——Yii2 React ant-design","archived":false,"fork":false,"pushed_at":"2017-04-20T04:05:55.000Z","size":1314,"stargazers_count":23,"open_issues_count":0,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-10T21:15:19.388Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/purocean.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-12T13:52:58.000Z","updated_at":"2023-04-07T00:04:18.000Z","dependencies_parsed_at":"2022-08-24T03:40:22.344Z","dependency_job_id":null,"html_url":"https://github.com/purocean/yii2-template","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purocean%2Fyii2-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purocean%2Fyii2-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purocean%2Fyii2-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purocean%2Fyii2-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purocean","download_url":"https://codeload.github.com/purocean/yii2-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248298312,"owners_count":21080320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T07:36:03.632Z","updated_at":"2025-04-10T21:15:22.067Z","avatar_url":"https://github.com/purocean.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Yii2 应用模板，包含企业号同步联系人，扫码登录，使用蚂蚁金服做前端 UI\n===============================\n[![composer.lock](https://poser.pugx.org/purocean/yii2-template/composerlock)](https://packagist.org/packages/purocean/yii2-template)\n[![Build Status](https://travis-ci.org/purocean/yii2-template.svg?branch=master)](https://travis-ci.org/purocean/yii2-template)\n[![Latest Stable Version](https://poser.pugx.org/purocean/yii2-template/v/stable)](https://packagist.org/packages/purocean/yii2-template)\n[![Total Downloads](https://poser.pugx.org/purocean/yii2-template/downloads)](https://packagist.org/packages/purocean/yii2-template)\n[![License](https://poser.pugx.org/purocean/yii2-template/license)](https://packagist.org/packages/purocean/yii2-template)\n\n特性\n-------------------\n+ [x] 微信企业号同步联系人\n+ [x] 扫码登录\n+ [x] [蚂蚁金服](https://ant.design/)前端界面\n+ [x] 文件上传处理\n+ [x] 微信 jssdk\n+ [x] RESTful\n\n若需要使用 jQuery 和 Bootstrap 开发前端，请使用 [传统模板](https://github.com/purocean/yii2-template/tree/classics)\n\n安装\n-------------------\n```bash\n# 仅测试 PHP7.0\ncomposer global require \"fxp/composer-asset-plugin:^1.2.0\"\ncomposer install --prefer-dist\n./init\nvim ./common/config/main.php\nvim ./common/config/main-local.php\nvim ./common/config/params-local.php\n./yii migrate # 迁移表结构\n./yii rbac/reset-password suadmin \u003cpassword\u003e # 更改超级管理员密码\n./yii serve 192.168.1.108:8080 -t=@application/web # 运行开发服务器，IP 为本机局域网 IP，以便手机访问\ncd frontend\nnpm install # 安装 nodejs 依赖\n# 修改本机后台服务器 IP 端口\ncp ./frontend/cfg/local.js.example ./frontend/cfg/local.js\nvim ./frontend/cfg/local.js\nnpm run serve # 运行开发服务器\nnpm run dist # 前端打包\n```\n\n测试\n-------------------\n```bash\nvim ./common/config/test-local.php\n./yii_test migrate\ncomposer exec codecept build\ncomposer exec codecept run\n```\n\n注意\n-------------------\n默认扫码登录使用 Ajax 轮询方式，使用 WebSocket 方式：\n```bash\nvim ./frontend/src/config/base.js # 配置 WebSocket 端口\ncd ./frontend/\nnpm run dist\n./yii workerman\n```\n\n截图\n-------------------\n![login_1](./screenshots/login_1.png \"账号密码登录\")\n![login_2](./screenshots/login_2.png \"二维码登录\")\n![login_3](./screenshots/login_3.png \"二维码登录\")\n![user](./screenshots/user.png \"用户管理\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurocean%2Fyii2-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurocean%2Fyii2-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurocean%2Fyii2-template/lists"}