Samien 1 gadu atpakaļ
revīzija
a3f0c992a9
100 mainītis faili ar 2957 papildinājumiem un 0 dzēšanām
  1. 3 0
      .bowerrc
  2. 1 0
      .gitattributes
  3. 58 0
      .gitignore
  4. 54 0
      LICENSE.md
  5. 114 0
      README.md
  6. 0 0
      addons/.gitignore
  7. 119 0
      addons/Authority/AddonConfig.php
  8. 31 0
      addons/Authority/Install.php
  9. 30 0
      addons/Authority/UnInstall.php
  10. 141 0
      addons/Authority/Upgrade.php
  11. 37 0
      addons/Authority/api/controllers/DefaultController.php
  12. 20 0
      addons/Authority/api/modules/v1/Module.php
  13. 42 0
      addons/Authority/api/modules/v1/controllers/AccreditController.php
  14. 37 0
      addons/Authority/api/modules/v1/controllers/DefaultController.php
  15. 20 0
      addons/Authority/api/modules/v2/Module.php
  16. 37 0
      addons/Authority/api/modules/v2/controllers/DefaultController.php
  17. 28 0
      addons/Authority/backend/assets/AppAsset.php
  18. 20 0
      addons/Authority/backend/controllers/BaseController.php
  19. 27 0
      addons/Authority/backend/controllers/DefaultController.php
  20. 1 0
      addons/Authority/backend/resources/.gitkeep
  21. 3 0
      addons/Authority/backend/views/default/index.php
  22. 30 0
      addons/Authority/backend/views/layouts/main.php
  23. 23 0
      addons/Authority/common/components/Bootstrap.php
  24. 34 0
      addons/Authority/common/config/api.php
  25. 32 0
      addons/Authority/common/config/backend.php
  26. 28 0
      addons/Authority/common/config/frontend.php
  27. 28 0
      addons/Authority/common/config/html5.php
  28. 29 0
      addons/Authority/common/config/merchant.php
  29. 34 0
      addons/Authority/common/config/oauth2.php
  30. 21 0
      addons/Authority/common/models/DefaultModel.php
  31. 42 0
      addons/Authority/common/models/SettingForm.php
  32. 1 0
      addons/Authority/console/controllers/.gitkeep
  33. 1 0
      addons/Authority/console/migrations/.gitkeep
  34. 28 0
      addons/Authority/frontend/assets/AppAsset.php
  35. 20 0
      addons/Authority/frontend/controllers/BaseController.php
  36. 27 0
      addons/Authority/frontend/controllers/DefaultController.php
  37. 1 0
      addons/Authority/frontend/resources/.gitkeep
  38. 3 0
      addons/Authority/frontend/views/default/index.php
  39. 30 0
      addons/Authority/frontend/views/layouts/main.php
  40. 28 0
      addons/Authority/html5/assets/AppAsset.php
  41. 20 0
      addons/Authority/html5/controllers/BaseController.php
  42. 27 0
      addons/Authority/html5/controllers/DefaultController.php
  43. 1 0
      addons/Authority/html5/resources/.gitkeep
  44. 3 0
      addons/Authority/html5/views/default/index.php
  45. 30 0
      addons/Authority/html5/views/layouts/main.php
  46. 28 0
      addons/Authority/merchant/assets/AppAsset.php
  47. 20 0
      addons/Authority/merchant/controllers/BaseController.php
  48. 27 0
      addons/Authority/merchant/controllers/DefaultController.php
  49. 34 0
      addons/Authority/merchant/controllers/SettingController.php
  50. 1 0
      addons/Authority/merchant/resources/.gitkeep
  51. 3 0
      addons/Authority/merchant/views/default/index.php
  52. 30 0
      addons/Authority/merchant/views/layouts/main.php
  53. 44 0
      addons/Authority/merchant/views/setting/display.php
  54. 37 0
      addons/Authority/oauth2/controllers/DefaultController.php
  55. 20 0
      addons/Authority/oauth2/modules/v1/Module.php
  56. 37 0
      addons/Authority/oauth2/modules/v1/controllers/DefaultController.php
  57. 20 0
      addons/Authority/oauth2/modules/v2/Module.php
  58. 37 0
      addons/Authority/oauth2/modules/v2/controllers/DefaultController.php
  59. 21 0
      addons/Authority/services/Application.php
  60. 24 0
      addons/Authority/services/ConfigService.php
  61. 119 0
      addons/Member/AddonConfig.php
  62. 30 0
      addons/Member/Install.php
  63. 30 0
      addons/Member/UnInstall.php
  64. 71 0
      addons/Member/Upgrade.php
  65. 37 0
      addons/Member/api/controllers/DefaultController.php
  66. 20 0
      addons/Member/api/modules/v1/Module.php
  67. 37 0
      addons/Member/api/modules/v1/controllers/DefaultController.php
  68. 20 0
      addons/Member/api/modules/v2/Module.php
  69. 37 0
      addons/Member/api/modules/v2/controllers/DefaultController.php
  70. 28 0
      addons/Member/backend/assets/AppAsset.php
  71. 20 0
      addons/Member/backend/controllers/BaseController.php
  72. 27 0
      addons/Member/backend/controllers/DefaultController.php
  73. 1 0
      addons/Member/backend/resources/.gitkeep
  74. 3 0
      addons/Member/backend/views/default/index.php
  75. 30 0
      addons/Member/backend/views/layouts/main.php
  76. 23 0
      addons/Member/common/components/Bootstrap.php
  77. 34 0
      addons/Member/common/config/api.php
  78. 91 0
      addons/Member/common/config/backend.php
  79. 28 0
      addons/Member/common/config/frontend.php
  80. 28 0
      addons/Member/common/config/html5.php
  81. 30 0
      addons/Member/common/config/merchant.php
  82. 34 0
      addons/Member/common/config/oauth2.php
  83. BIN
      addons/Member/common/file/member.xls
  84. 41 0
      addons/Member/common/models/SettingForm.php
  85. 1 0
      addons/Member/console/controllers/.gitkeep
  86. 1 0
      addons/Member/console/migrations/.gitkeep
  87. 28 0
      addons/Member/frontend/assets/AppAsset.php
  88. 20 0
      addons/Member/frontend/controllers/BaseController.php
  89. 27 0
      addons/Member/frontend/controllers/DefaultController.php
  90. 1 0
      addons/Member/frontend/resources/.gitkeep
  91. 3 0
      addons/Member/frontend/views/default/index.php
  92. 30 0
      addons/Member/frontend/views/layouts/main.php
  93. 28 0
      addons/Member/html5/assets/AppAsset.php
  94. 20 0
      addons/Member/html5/controllers/BaseController.php
  95. 27 0
      addons/Member/html5/controllers/DefaultController.php
  96. 1 0
      addons/Member/html5/resources/.gitkeep
  97. 3 0
      addons/Member/html5/views/default/index.php
  98. 30 0
      addons/Member/html5/views/layouts/main.php
  99. 28 0
      addons/Member/merchant/assets/AppAsset.php
  100. 163 0
      addons/Member/merchant/controllers/AddressController.php

+ 3 - 0
.bowerrc

@@ -0,0 +1,3 @@
+{
+    "directory" : "vendor/bower-asset"
+}

+ 1 - 0
.gitattributes

@@ -0,0 +1 @@
+*.js linguist-language=PHP

+ 58 - 0
.gitignore

@@ -0,0 +1,58 @@
+# yii console commands
+/yii
+/yii_test
+/yii_test.bat
+
+# phpstorm project files
+.idea
+
+# vscode project files
+.vscode
+
+# netbeans project files
+nbproject
+
+# zend studio for eclipse project files
+.buildpath
+.project
+.settings
+
+# windows thumbnail cache
+Thumbs.db
+
+# websocket
+start.bat
+
+# composer vendor dir
+/vendor
+
+# composer itself is not needed
+# composer.phar
+
+# Mac DS_Store Files
+.DS_Store
+
+# phpunit itself is not needed
+phpunit.phar
+# local phpunit config
+/phpunit.xml
+
+# vagrant runtime
+/.vagrant
+
+# ignore generated files
+/frontend/web/index.php
+/frontend/web/index-test.php
+/frontend/web/robots.txt
+/backend/web/index.php
+/backend/web/index-test.php
+/backend/web/robots.txt
+/api/web/index.php
+/api/web/index-test.php
+/api/web/robots.txt
+/html5/web/index.php
+/html5/web/index-test.php
+/html5/web/robots.txt
+/merchant/web/index.php
+/merchant/web/index-test.php
+/merchant/web/robots.txt

+ 54 - 0
LICENSE.md

@@ -0,0 +1,54 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+    You must give any other recipients of the Work or Derivative Works a copy of this License; and
+    You must cause any modified files to carry prominent notices stating that You changed the files; and
+    You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+    If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+    You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS

+ 114 - 0
README.md

@@ -0,0 +1,114 @@
+## RageFrame 3.0
+
+重量级全栖框架,为二次开发而生
+
+### 前言
+
+这是一款现代化、快速、高效、便捷、灵活、方便扩展的应用开发骨架。
+
+RageFrame 创建于 2016 年 4 月 16 日,一个基于 Yii2 高级框架的快速开发引擎,目前正在成长中,目的是为了集成更多的基础功能,不再为相同的基础功能重复制造轮子,开箱即用,让开发变得更加简单。  
+2018 年 9 月 10 日 2.0 版本正式上线,经过 1.0 版本一年多的开源反馈磨合,以更加优秀的形态出现。对 1.0 的版本进行了重构优化完善,更好的面向开发者进行二次开发。2.3.x 版本更是优化了底层突出了服务层,分离业务逻辑,支持多商户。  
+2022 年 2 月 28 日 3.0 版本发布。
+
+### 特色
+
+- 极强的可扩展性,应用化,模块化,插件化机制敏捷开发。
+- 极致的插件机制,微核架构,良好的功能延伸性,功能之间是隔离,可定制性高,可以渐进式地开发,逐步增加功能,安装和卸载不会对原来的系统产生影响,强大的功能完全满足各阶段的需求,支持用户多端访问(后台、微信、Api、前台等)。
+- 极完善的 RBAC 权限控制管理、无限父子级权限分组、可自由分配子级权限,且按钮/链接/自定义内容/插件等都可加入权限控制。
+- 只做基础底层内容,不会在上面开发过多的业务内容,满足绝大多数的系统二次开发。
+- 多入口模式,多入口分为 Backend (后台)、Merchant (商户端)、Frontend (PC前端)、Html5 (手机端)、Console (控制台)、Api (对内接口)、OAuth2 Server (对外接口),不同的业务,不同的设备,进入不同的入口。
+- 对接微信公众号且支持小程序,使用了一款优秀的微信非官方 SDK EasyWechat 5.x,开箱即用,预置了绝大部分功能,大幅度的提升了微信开发效率。
+- 整合了第三方登录,目前有 QQ、微信、微博、GitHub 等等。
+- 整合了第三方支付,目前有微信支付、支付宝支付、银联支付,二次封装为网关多个支付一个入口一个出口。
+- 整合了 RESTful API,支持前后端分离接口开发和 App 接口开发,可直接上手开发业务。
+- 一键切换云存储,本地存储、腾讯 COS、阿里云 OSS、七牛云存储都可一键切换,且增加其他第三方存储也非常方便。
+- 全面监控系统报错,报错日志写入数据库,方便定位错误信息。支持直接钉钉提醒。
+- 快速高效的 Servises (服务层),遵循 Yii2 的懒加载方式,只初始化使用到的组件服务。
+- 丰富的表单控件(时间、日期、时间日期、日期范围选择、颜色选择器、省市区三级联动、省市区勾选、单图上传、多图上传、单文件上传、多文件上传、百度编辑器、百度图表、多文本编辑框、地图经纬度选择器、图片裁剪上传、TreeGrid、JsTree、Markdown 编辑器)和组件(二维码生成、Curl、IP地址转地区),快速开发,不必再为基础组件而担忧。
+- 快速生成 CURD ,无需编写代码,只需创建表设置路径就能出现一个完善的 CURD ,其中所需表单控件也是勾选即可直接生成。
+- 正常开发只需要开发商户端
+- 完善的文档和辅助类,方便二次开发与集成。
+
+### 思维导图
+
+![image](https://s1.ax1x.com/2023/07/29/pPSwsJI.png)
+
+### 应用架构流程
+
+![image](https://s1.ax1x.com/2023/07/29/pPSNIxS.png)
+
+### 系统快照
+
+【系统 - 首页】
+![image](https://s1.ax1x.com/2023/07/29/pPSwyWt.png)
+【系统 - 配置管理】
+![image](https://s1.ax1x.com/2023/07/29/pPSNvGV.png)
+【系统 - 角色编辑】
+![image](https://s1.ax1x.com/2023/07/29/pPSNzxU.png)
+【系统 - 日志统计】
+![image](https://s1.ax1x.com/2023/07/29/pPSNO5q.png)
+【会员 - 信息】
+![image](https://s1.ax1x.com/2023/07/29/pPSNjP0.png)
+【插件模块 - 列表】
+![image](https://s1.ax1x.com/2023/07/29/pPSNHbj.png)
+【插件模块 - CURD】
+![image](https://s1.ax1x.com/2023/07/29/pPSNTKg.png)
+【插件模块 - 系统监控】
+![image](https://s1.ax1x.com/2023/07/29/pPSN7rQ.png)
+
+### 开始之前
+
+- 具备 PHP 基础知识
+- 具备 Yii2 基础开发知识
+- 具备 开发环境的搭建
+- 仔细阅读文档,一般常见的报错可以自行先解决,解决不了再来提问
+- 如果要做小程序或微信开发需要明白微信接口的组成,自有服务器、微信服务器、公众号(还有其它各种号)、测试号、以及通信原理(交互过程)
+- 如果需要做接口开发(RESTful API)了解基本的 HTTP 协议,Header 头、请求方式(`GET\POST\PUT\PATCH\DELETE`)等
+- 能查看日志和 Debug 技能
+- 一定要仔细走一遍文档
+
+### 官网
+
+http://www.rageframe.com
+
+### 文档
+
+[安装文档](docs/guide-zh-CN/start-installation.md) · [本地文档](docs/guide-zh-CN/README.md) · [更新历史](docs/guide-zh-CN/start-update-log.md) · [常见问题](docs/guide-zh-CN/start-issue.md)
+
+### 默认插件
+
+[会员](docs/addons/Member) · [微信公众号](docs/addons/Wechat) · [博客](docs/addons/TinyBlog) · [功能案例](docs/addons/RfDemo) · [开发工具](docs/addons/RfDevTool)
+
+### 问题反馈 
+
+在使用中有任何问题,欢迎反馈给我,可以用以下联系方式跟我交流
+
+QQ群1:[655084090](https://jq.qq.com/?_wv=1027&k=4BeVA2r) (2000人快满)  
+QQ群2:[1148015133](https://jq.qq.com/?_wv=1027&k=Wk663e9N) (新群)
+
+GitHub:https://github.com/jianyan74/rageframe3/issues  
+Gitee:https://gitee.com/jianyan94/rageframe3/issues
+
+### 特别鸣谢
+
+感谢以下的项目,排名不分先后
+
+Yii:http://www.yiiframework.com
+
+EasyWechat:https://easywechat.com
+
+Bootstrap:http://getbootstrap.com
+
+AdminLTE:https://adminlte.io
+
+...
+
+### 版权信息
+
+RageFrame 遵循 Apache2 开源协议发布,并提供免费使用。
+
+本项目包含的第三方源码和二进制文件之版权信息另行标注。
+
+版权所有Copyright © 2016-2023 by RageFrame [www.rageframe.com](http://www.rageframe.com)
+
+All rights reserved。

+ 0 - 0
addons/.gitignore


+ 119 - 0
addons/Authority/AddonConfig.php

@@ -0,0 +1,119 @@
+<?php
+
+namespace addons\Authority;
+
+use common\components\BaseAddonConfig;
+use addons\Authority\services\Application;
+use addons\Authority\common\components\Bootstrap;
+
+/**
+ * Class Addon
+ * @package addons\Authority
+ */
+class AddonConfig extends BaseAddonConfig
+{
+    /**
+     * 基础信息
+     *
+     * @var array
+     */
+    public $info = [
+        'name' => 'Authority',
+        'title' => '系统更新',
+        'brief_introduction' => 'RageFrame 官方在线升级工具',
+        'description' => '',
+        'author' => '简言',
+        'version' => '3.1.49',
+    ];
+
+    /**
+    * 应用配置
+    *
+    * 例如:菜单设置/权限设置/快捷入口
+    *
+    * @var array
+    */
+    public $appsConfig = [
+        'backend' => 'common/config/backend.php',
+        'frontend' => 'common/config/frontend.php',
+        'merchant' => 'common/config/merchant.php',
+        'html5' => 'common/config/html5.php',
+        'api' => 'common/config/api.php',
+        'oauth2' => 'common/config/oauth2.php',
+    ];
+
+    /**
+    * 引导文件
+    *
+    * 设置后系统会在执行插件控制器前执行
+    *
+    * @var Bootstrap
+    */
+    public $bootstrap = Bootstrap::class;
+
+    /**
+    * 服务层
+    *
+    * 设置后系统会自动注册
+    *
+    * 调用方式
+    *
+    * Yii::$app->插件名称 + Services
+    *
+    * 例如
+    *
+    * Yii::$app->tinyShopServices;
+    *
+    * @var Application
+    */
+    public $service = Application::class;
+
+    /**
+    * 商户路由映射
+    *
+    * 开启后无需再去后台应用端去开发程序,直接映射商家应用的控制器方法过去,菜单权限还需要单独配置
+    *
+    * @var bool
+    */
+    public $isMerchantRouteMap = false;
+
+    /**
+     * 类别
+     *
+     * @var string
+     * [
+     *      'plug'      => "功能插件",
+     *      'business'  => "主要业务",
+     *      'customer'  => "客户关系",
+     *      'activity'  => "营销及活动",
+     *      'services'  => "常用服务及工具",
+     *      'biz'       => "行业解决方案",
+     *      'h5game'    => "小游戏",
+     *      'other'     => "其他",
+     * ]
+     */
+    public $group = 'business';
+
+    /**
+     * 保存在当前模块的根目录下面
+     *
+     * 例如 $install = 'Install';
+     * 安装类
+     * @var string
+     */
+    public $install = 'Install';
+
+    /**
+     * 卸载SQL类
+     *
+     * @var string
+     */
+    public $uninstall = 'UnInstall';
+
+    /**
+     * 更新SQL类
+     *
+     * @var string
+     */
+    public $upgrade = 'Upgrade';
+}

+ 31 - 0
addons/Authority/Install.php

@@ -0,0 +1,31 @@
+<?php
+
+namespace addons\Authority;
+
+use Yii;
+use yii\db\Migration;
+use common\helpers\MigrateHelper;
+use common\interfaces\AddonWidget;
+
+/**
+ * 安装
+ *
+ * Class Install
+ * @package addons\Authority
+ */
+class Install extends Migration implements AddonWidget
+{
+    /**
+    * @param $addon
+    * @return mixed|void
+    * @throws \yii\base\InvalidConfigException
+    * @throws \yii\web\NotFoundHttpException
+    * @throws \yii\web\UnprocessableEntityHttpException
+    */
+    public function run($addon)
+    {
+        MigrateHelper::upByPath([
+            '@addons/Authority/console/migrations/'
+        ]);
+    }
+}

+ 30 - 0
addons/Authority/UnInstall.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace addons\Authority;
+
+use Yii;
+use yii\db\Migration;
+use common\helpers\MigrateHelper;
+use common\interfaces\AddonWidget;
+
+/**
+ * 卸载
+ *
+ * Class UnInstall
+ * @package addons\Authority
 */
+class UnInstall extends Migration implements AddonWidget
+{
+    /**
+    * @param $addon
+    * @return mixed|void
+    * @throws \yii\base\InvalidConfigException
+    * @throws \yii\web\NotFoundHttpException
+    * @throws \yii\web\UnprocessableEntityHttpException
+    */
+    public function run($addon)
+    {
+        // MigrateHelper::downByPath([
+        //     '@addons/Authority/console/migrations/'
+        // ]);
+    }
+}

+ 141 - 0
addons/Authority/Upgrade.php

@@ -0,0 +1,141 @@
+<?php
+
+namespace addons\Authority;
+
+use Yii;
+use yii\db\Exception;
+use common\enums\AppEnum;
+use common\components\Migration;
+use common\interfaces\AddonWidget;
+use common\helpers\StringHelper;
+use common\models\common\Menu;
+use common\models\common\MenuCate;
+use common\models\common\Provinces;
+use common\models\common\AttachmentCate;
+use common\models\common\ConfigCate;
+use common\models\rbac\AuthRole;
+use common\models\rbac\AuthItem;
+
+/**
+ * 升级数据库
+ *
+ * Class Upgrade
+ * @package addons\Authority
+ */
+class Upgrade extends Migration implements AddonWidget
+{
+    /**
+     * @var array
+     */
+    public $versions = [
+        '3.0.0', '3.0.3', '3.0.10', '3.0.12', '3.0.18', '3.0.25',
+        '3.1.13', '3.1.16', '3.1.20', '3.1.21', '3.1.29', '3.1.30',
+        '3.1.35', '3.1.38', '3.1.39', '3.1.49',
+    ];
+
+    /**
+     * @param $addon
+     * @return mixed|void
+     * @throws Exception
+     */
+    public function run($addon)
+    {
+        switch ($addon->version) {
+            case '3.1.49' :
+                // 替换菜单
+                $menus = Menu::find()->select(['id', 'tree'])->asArray()->all();
+                foreach ($menus as $menu) {
+                    $this->updateTree($menu['id'], $menu['tree'], Menu::class);
+                }
+
+                // 替换菜单分类
+                $menuCates = MenuCate::find()->select(['id', 'tree'])->asArray()->all();
+                foreach ($menuCates as $menuCate) {
+                    $this->updateTree($menuCate['id'], $menuCate['tree'], MenuCate::class);
+                }
+
+                // 替换省市区
+                $provinces = Provinces::find()->select(['id', 'tree'])->asArray()->all();
+                foreach ($provinces as $province) {
+                    $this->updateTree($province['id'], $province['tree'], Provinces::class);
+                }
+
+                // 替换角色
+                $authRoles = AuthRole::find()->select(['id', 'tree'])->asArray()->all();
+                foreach ($authRoles as $role) {
+                    $this->updateTree($role['id'], $role['tree'], AuthRole::class);
+                }
+
+                // 替换权限
+                $authItem = AuthItem::find()->select(['id', 'tree'])->asArray()->all();
+                foreach ($authItem as $item) {
+                    $this->updateTree($item['id'], $item['tree'], AuthItem::class);
+                }
+
+                // 素材分类
+                $attachmentCates = AttachmentCate::find()->select(['id', 'tree'])->asArray()->all();
+                foreach ($attachmentCates as $attachmentCate) {
+                    $this->updateTree($attachmentCate['id'], $attachmentCate['tree'], AttachmentCate::class);
+                }
+
+                // 配置分类
+                $configCates = ConfigCate::find()->select(['id', 'tree'])->asArray()->all();
+                foreach ($configCates as $configCate) {
+                    $this->updateTree($configCate['id'], $configCate['tree'], ConfigCate::class);
+                }
+                break;
+            case '3.0.25' :
+                /* 创建表 */
+                $this->createTable('{{%common_theme}}', [
+                    'id' => "int(10) NOT NULL AUTO_INCREMENT COMMENT '主键'",
+                    'merchant_id' => "int(10) NOT NULL DEFAULT '0' COMMENT '商户ID'",
+                    'member_id' => "int(10) NULL DEFAULT '0' COMMENT '用户ID'",
+                    'member_type' => "int(10) NULL DEFAULT '0' COMMENT '用户类型'",
+                    'app_id' => "varchar(20) NOT NULL DEFAULT '' COMMENT '应用'",
+                    'layout' => "varchar(50) NULL COMMENT '布局类型'",
+                    'color' => "varchar(50) NULL DEFAULT 'black' COMMENT '主题颜色'",
+                    'status' => "tinyint(4) NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]'",
+                    'created_at' => "int(10) unsigned NULL DEFAULT '0' COMMENT '添加时间'",
+                    'updated_at' => "int(10) unsigned NULL DEFAULT '0' COMMENT '修改时间'",
+                    'PRIMARY KEY (`id`)',
+                ], "ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COMMENT='公用_用户主题'");
+
+                /* 索引设置 */
+                $this->createIndex('member_id', '{{%common_theme}}', 'member_id', 0);
+                break;
+            case '3.0.18' :
+                Yii::$app->services->config->findSaveByName('map_amap_code', AppEnum::BACKEND, [
+                    'title' => 'Web端(Js Api)安全秘钥',
+                    'name' => 'map_amap_code',
+                    'app_id' => 'backend',
+                    'type' => 'text',
+                    'cate_id' => '32',
+                    'extra' => '',
+                    'remark' => '地图选择',
+                    'is_hide_remark' => '0',
+                    'default_value' => '',
+                    'sort' => '1',
+                    'status' => '1',
+                ]);
+                break;
+            case '3.0.0' :
+                break;
+        }
+    }
+
+    /**
+     * @param int $id
+     * @param string $tree
+     * @param $model
+     * @return void
+     */
+    protected function updateTree($id, $tree, $model)
+    {
+        $tree = StringHelper::replace(' ', '', $tree);
+        $endTree = substr($tree, strlen($tree) - 1);
+        if ($endTree != '-') {
+            $tree = $tree.'-';
+            $model::updateAll(['tree' => $tree], ['id' => $id]);
+        }
+    }
+}

+ 37 - 0
addons/Authority/api/controllers/DefaultController.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace addons\Authority\api\controllers;
+
+use Yii;
+use api\controllers\OnAuthController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\api\controllers
+ */
+class DefaultController extends OnAuthController
+{
+    public $modelClass = '';
+
+    /**
+    * 不用进行登录验证的方法
+    *
+    * 例如: ['index', 'update', 'create', 'view', 'delete']
+    * 默认全部需要验证
+    *
+    * @var array
+    */
+    protected $authOptional = ['index'];
+
+    /**
+    * 首页
+    *
+    * @return string
+    */
+    public function actionIndex()
+    {
+        return 'Hello world';
+    }
+}

+ 20 - 0
addons/Authority/api/modules/v1/Module.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace addons\Authority\api\modules\v1;
+
+/**
+ * Class Module
+ * @package addons\Authority\api\modules\v1 * @author jianyan74 <751393839@qq.com>
+ */
+class Module extends \yii\base\Module
+{
+    /**
+     * {@inheritdoc}
+     */
+    public $controllerNamespace = 'addons\Authority\api\modules\v1\controllers';
+
+    public function init()
+    {
+        parent::init();
+    }
+}

+ 42 - 0
addons/Authority/api/modules/v1/controllers/AccreditController.php

@@ -0,0 +1,42 @@
+<?php
+
+namespace addons\Authority\api\modules\v1\controllers;
+
+use Yii;
+use api\controllers\OnAuthController;
+use common\helpers\ResultHelper;
+
+/**
+ * Class AccreditController
+ * @package addons\Authority\api\modules\v1\controllers
+ * @author jianyan74 <751393839@qq.com>
+ */
+class AccreditController extends OnAuthController
+{
+    public $modelClass = '';
+
+    /**
+     * 不用进行登录验证的方法
+     *
+     * 例如: ['index', 'update', 'create', 'view', 'delete']
+     * 默认全部需要验证
+     *
+     * @var array
+     */
+    protected $authOptional = ['verify'];
+
+    /**
+     * @return array|mixed|string|\yii\data\ActiveDataProvider
+     */
+    public function actionVerify()
+    {
+        return ResultHelper::json(422, '系统未授权, 请联系管理员');
+
+        $url = Yii::$app->request->post('url');
+        if (empty($url)) {
+            return ResultHelper::json(422, '系统未授权, 请联系管理员');
+        }
+
+        return 'ok';
+    }
+}

+ 37 - 0
addons/Authority/api/modules/v1/controllers/DefaultController.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace addons\Authority\api\modules\v1\controllers;
+
+use Yii;
+use api\controllers\OnAuthController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\api\modules\v1\controllers
+ */
+class DefaultController extends OnAuthController
+{
+    public $modelClass = '';
+
+    /**
+    * 不用进行登录验证的方法
+    *
+    * 例如: ['index', 'update', 'create', 'view', 'delete']
+    * 默认全部需要验证
+    *
+    * @var array
+    */
+    protected $authOptional = ['index'];
+
+    /**
+    * 首页
+    *
+    * @return string
+    */
+    public function actionIndex()
+    {
+        return 'Hello world';
+    }
+}

+ 20 - 0
addons/Authority/api/modules/v2/Module.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace addons\Authority\api\modules\v2;
+
+/**
+ * Class Module
+ * @package addons\Authority\api\modules\v2 * @author jianyan74 <751393839@qq.com>
+ */
+class Module extends \yii\base\Module
+{
+    /**
+     * {@inheritdoc}
+     */
+    public $controllerNamespace = 'addons\Authority\api\modules\v2\controllers';
+
+    public function init()
+    {
+        parent::init();
+    }
+}

+ 37 - 0
addons/Authority/api/modules/v2/controllers/DefaultController.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace addons\Authority\api\modules\v2\controllers;
+
+use Yii;
+use api\controllers\OnAuthController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\api\modules\v2\controllers
+ */
+class DefaultController extends OnAuthController
+{
+    public $modelClass = '';
+
+    /**
+    * 不用进行登录验证的方法
+    *
+    * 例如: ['index', 'update', 'create', 'view', 'delete']
+    * 默认全部需要验证
+    *
+    * @var array
+    */
+    protected $authOptional = ['index'];
+
+    /**
+    * 首页
+    *
+    * @return string
+    */
+    public function actionIndex()
+    {
+        return 'Hello world';
+    }
+}

+ 28 - 0
addons/Authority/backend/assets/AppAsset.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace addons\Authority\backend\assets;
+
+use yii\web\AssetBundle;
+
+/**
+ * 静态资源管理
+ *
+ * Class AppAsset
+ * @package addons\Authority\backend\assets
+ */
+class AppAsset extends AssetBundle
+{
+    /**
+     * @var string
+     */
+    public $sourcePath = '@addons/Authority/backend/resources/';
+
+    public $css = [
+    ];
+
+    public $js = [
+    ];
+
+    public $depends = [
+    ];
+}

+ 20 - 0
addons/Authority/backend/controllers/BaseController.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace addons\Authority\backend\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\backend\controllers
+ */
+class BaseController extends AddonsController
+{
+    /**
+    * @var string
+    */
+    // public $layout = "@addons/Authority/backend/views/layouts/main";
+}

+ 27 - 0
addons/Authority/backend/controllers/DefaultController.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace addons\Authority\backend\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\backend\controllers
+ */
+class DefaultController extends BaseController
+{
+    /**
+    * 首页
+    *
+    * @return string
+    */
+    public function actionIndex()
+    {
+        return $this->render('index',[
+
+        ]);
+    }
+}

+ 1 - 0
addons/Authority/backend/resources/.gitkeep

@@ -0,0 +1 @@
+*

+ 3 - 0
addons/Authority/backend/views/default/index.php

@@ -0,0 +1,3 @@
+<?php
+
+echo '这是' . Yii::$app->params['addon']['name'] . ' backend 页面';

+ 30 - 0
addons/Authority/backend/views/layouts/main.php

@@ -0,0 +1,30 @@
+<?php
+
+use addons\Authority\backend\assets\AppAsset;
+use common\helpers\Html;
+
+AppAsset::register($this);
+
+?>
+<?php $this->beginPage() ?>
+<!DOCTYPE html>
+<html lang="<?= Yii::$app->language ?>">
+<head>
+    <meta charset="<?= Yii::$app->charset ?>">
+    <meta name="keywords" content="">
+    <meta name="description" content="">
+    <meta name="format-detection" content="telephone=no" />
+    <meta name="format-detection" content="address=no" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <?php $this->registerCsrfMetaTags() ?>
+    <title><?= Html::encode($this->title) ?></title>
+    <?php $this->head() ?>
+</head>
+<body>
+<?php $this->beginBody() ?>
+<?= $content ?>
+<?php $this->endBody() ?>
+</body>
+</html>
+<?php $this->endPage() ?>

+ 23 - 0
addons/Authority/common/components/Bootstrap.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace addons\Authority\common\components;
+
+use Yii;
+use common\interfaces\AddonWidget;
+
+/**
+ * Bootstrap
+ *
+ * Class Bootstrap
+ * @package addons\Authority\common\config
 */
+class Bootstrap implements AddonWidget
+{
+    /**
+    * @param $addon
+    * @return mixed|void
+    */
+    public function run($addon)
+    {
+
+    }
+}

+ 34 - 0
addons/Authority/common/config/api.php

@@ -0,0 +1,34 @@
+<?php
+
+return [
+
+    // ----------------------- 菜单配置 ----------------------- //
+    'config' => [
+        // 菜单配置
+        'menu' => [
+            'location' => 'addons', // default:系统顶部菜单;addons:应用中心菜单
+            'icon' => 'fa fa-puzzle-piece',
+            'pattern' => [], // 可见开发模式 b2c、b2b2c、saas 不填默认全部可见, 可设置为 blank 为全部不可见
+        ],
+        // 子模块配置
+        'modules' => [
+            'v1' => [
+                'class' => 'addons\Authority\api\modules\v1\Module',
+            ],
+            'v2' => [
+                'class' => 'addons\Authority\api\modules\v2\Module',
+            ],
+        ],
+    ],
+
+    // ----------------------- 菜单配置 ----------------------- //
+
+    'menu' => [
+
+    ],
+
+    // ----------------------- 权限配置 ----------------------- //
+
+    'authItem' => [
+    ],
+];

+ 32 - 0
addons/Authority/common/config/backend.php

@@ -0,0 +1,32 @@
+<?php
+
+return [
+
+    // ----------------------- 菜单配置 ----------------------- //
+    'config' => [
+        // 菜单配置
+        'menu' => [
+            'location' => 'addons', // default:系统顶部菜单;addons:应用中心菜单
+            'icon' => 'fa fa-puzzle-piece',
+            'pattern' => [], // 可见开发模式 b2c、b2b2c、saas 不填默认全部可见, 可设置为 blank 为全部不可见
+        ],
+        // 子模块配置
+        'modules' => [
+        ],
+    ],
+
+    // ----------------------- 菜单配置 ----------------------- //
+
+    'menu' => [
+
+    ],
+
+    // ----------------------- 权限配置 ----------------------- //
+
+    'authItem' => [
+        [
+            'title' => '所有权限',
+            'name' => '*',
+        ],
+    ],
+];

+ 28 - 0
addons/Authority/common/config/frontend.php

@@ -0,0 +1,28 @@
+<?php
+
+return [
+
+    // ----------------------- 菜单配置 ----------------------- //
+    'config' => [
+        // 菜单配置
+        'menu' => [
+            'location' => 'addons', // default:系统顶部菜单;addons:应用中心菜单
+            'icon' => 'fa fa-puzzle-piece',
+            'pattern' => [], // 可见开发模式 b2c、b2b2c、saas 不填默认全部可见, 可设置为 blank 为全部不可见
+        ],
+        // 子模块配置
+        'modules' => [
+        ],
+    ],
+
+    // ----------------------- 菜单配置 ----------------------- //
+
+    'menu' => [
+
+    ],
+
+    // ----------------------- 权限配置 ----------------------- //
+
+    'authItem' => [
+    ],
+];

+ 28 - 0
addons/Authority/common/config/html5.php

@@ -0,0 +1,28 @@
+<?php
+
+return [
+
+    // ----------------------- 菜单配置 ----------------------- //
+    'config' => [
+        // 菜单配置
+        'menu' => [
+            'location' => 'addons', // default:系统顶部菜单;addons:应用中心菜单
+            'icon' => 'fa fa-puzzle-piece',
+            'pattern' => [], // 可见开发模式 b2c、b2b2c、saas 不填默认全部可见, 可设置为 blank 为全部不可见
+        ],
+        // 子模块配置
+        'modules' => [
+        ],
+    ],
+
+    // ----------------------- 菜单配置 ----------------------- //
+
+    'menu' => [
+
+    ],
+
+    // ----------------------- 权限配置 ----------------------- //
+
+    'authItem' => [
+    ],
+];

+ 29 - 0
addons/Authority/common/config/merchant.php

@@ -0,0 +1,29 @@
+<?php
+
+return [
+
+    // ----------------------- 菜单配置 ----------------------- //
+    'config' => [
+        // 菜单配置
+        'menu' => [
+            'location' => 'addons', // default:系统顶部菜单;addons:应用中心菜单
+            'icon' => 'fa fa-puzzle-piece',
+            'pattern' => ['blank'], // 可见开发模式 b2c、b2b2c、saas 不填默认全部可见, 可设置为 blank 为全部不可见
+        ],
+        // 子模块配置
+        'modules' => [
+        ],
+    ],
+
+    // ----------------------- 菜单配置 ----------------------- //
+
+    'menu' => [
+
+    ],
+
+    // ----------------------- 权限配置 ----------------------- //
+
+    'authItem' => [
+
+    ],
+];

+ 34 - 0
addons/Authority/common/config/oauth2.php

@@ -0,0 +1,34 @@
+<?php
+
+return [
+
+    // ----------------------- 菜单配置 ----------------------- //
+    'config' => [
+        // 菜单配置
+        'menu' => [
+            'location' => 'addons', // default:系统顶部菜单;addons:应用中心菜单
+            'icon' => 'fa fa-puzzle-piece',
+            'pattern' => [], // 可见开发模式 b2c、b2b2c、saas 不填默认全部可见, 可设置为 blank 为全部不可见
+        ],
+        // 子模块配置
+        'modules' => [
+            'v1' => [
+                'class' => 'addons\Authority\oauth2\modules\v1\Module',
+            ],
+            'v2' => [
+                'class' => 'addons\Authority\oauth2\modules\v2\Module',
+            ],
+        ],
+    ],
+
+    // ----------------------- 菜单配置 ----------------------- //
+
+    'menu' => [
+
+    ],
+
+    // ----------------------- 权限配置 ----------------------- //
+
+    'authItem' => [
+    ],
+];

+ 21 - 0
addons/Authority/common/models/DefaultModel.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace addons\Authority\common\models;
+
+use Yii;
+use yii\db\ActiveRecord;
+use yii\behaviors\TimestampBehavior;
+
+/**
+ * This is the model class for table "{{%addon_default}}".
+ */
+class DefaultModel extends ActiveRecord
+{
+    /**
+     * {@inheritdoc}
+     */
+    public static function tableName()
+    {
+        return '{{%addon_default}}';
+    }
+}

+ 42 - 0
addons/Authority/common/models/SettingForm.php

@@ -0,0 +1,42 @@
+<?php
+
+namespace addons\Authority\common\models;
+
+use yii\base\Model;
+
+/**
+ * Class SettingForm
+ * @package addons\Authority\common\models
+ */
+class SettingForm extends Model
+{
+    public $share_title;
+    public $share_cover;
+    public $share_desc;
+    public $share_link;
+
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['share_title', 'share_cover'], 'string', 'max' => 100],
+            [['share_link', 'share_desc'], 'string', 'max' => 255],
+            [['share_link'], 'url'],
+        ];
+    }
+
+    /**
+     * @return array
+     */
+    public function attributeLabels()
+    {
+        return [
+            'share_title' => '分享标题',
+            'share_cover' => '分享封面',
+            'share_desc' => '分享描述',
+            'share_link' => '分享链接',
+        ];
+    }
+}

+ 1 - 0
addons/Authority/console/controllers/.gitkeep

@@ -0,0 +1 @@
+*

+ 1 - 0
addons/Authority/console/migrations/.gitkeep

@@ -0,0 +1 @@
+*

+ 28 - 0
addons/Authority/frontend/assets/AppAsset.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace addons\Authority\frontend\assets;
+
+use yii\web\AssetBundle;
+
+/**
+ * 静态资源管理
+ *
+ * Class AppAsset
+ * @package addons\Authority\frontend\assets
+ */
+class AppAsset extends AssetBundle
+{
+    /**
+     * @var string
+     */
+    public $sourcePath = '@addons/Authority/frontend/resources/';
+
+    public $css = [
+    ];
+
+    public $js = [
+    ];
+
+    public $depends = [
+    ];
+}

+ 20 - 0
addons/Authority/frontend/controllers/BaseController.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace addons\Authority\frontend\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\frontend\controllers
+ */
+class BaseController extends AddonsController
+{
+    /**
+    * @var string
+    */
+    public $layout = "@addons/Authority/frontend/views/layouts/main";
+}

+ 27 - 0
addons/Authority/frontend/controllers/DefaultController.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace addons\Authority\frontend\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\frontend\controllers
+ */
+class DefaultController extends BaseController
+{
+    /**
+    * 首页
+    *
+    * @return string
+    */
+    public function actionIndex()
+    {
+        return $this->render('index',[
+
+        ]);
+    }
+}

+ 1 - 0
addons/Authority/frontend/resources/.gitkeep

@@ -0,0 +1 @@
+*

+ 3 - 0
addons/Authority/frontend/views/default/index.php

@@ -0,0 +1,3 @@
+<?php
+
+echo '这是' . Yii::$app->params['addon']['name'] . ' frontend 页面';

+ 30 - 0
addons/Authority/frontend/views/layouts/main.php

@@ -0,0 +1,30 @@
+<?php
+
+use addons\Authority\frontend\assets\AppAsset;
+use common\helpers\Html;
+
+AppAsset::register($this);
+
+?>
+<?php $this->beginPage() ?>
+<!DOCTYPE html>
+<html lang="<?= Yii::$app->language ?>">
+<head>
+    <meta charset="<?= Yii::$app->charset ?>">
+    <meta name="keywords" content="">
+    <meta name="description" content="">
+    <meta name="format-detection" content="telephone=no" />
+    <meta name="format-detection" content="address=no" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <?php $this->registerCsrfMetaTags() ?>
+    <title><?= Html::encode($this->title) ?></title>
+    <?php $this->head() ?>
+</head>
+<body>
+<?php $this->beginBody() ?>
+<?= $content ?>
+<?php $this->endBody() ?>
+</body>
+</html>
+<?php $this->endPage() ?>

+ 28 - 0
addons/Authority/html5/assets/AppAsset.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace addons\Authority\html5\assets;
+
+use yii\web\AssetBundle;
+
+/**
+ * 静态资源管理
+ *
+ * Class AppAsset
+ * @package addons\Authority\html5\assets
+ */
+class AppAsset extends AssetBundle
+{
+    /**
+     * @var string
+     */
+    public $sourcePath = '@addons/Authority/html5/resources/';
+
+    public $css = [
+    ];
+
+    public $js = [
+    ];
+
+    public $depends = [
+    ];
+}

+ 20 - 0
addons/Authority/html5/controllers/BaseController.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace addons\Authority\html5\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\html5\controllers
+ */
+class BaseController extends AddonsController
+{
+    /**
+    * @var string
+    */
+    public $layout = "@addons/Authority/html5/views/layouts/main";
+}

+ 27 - 0
addons/Authority/html5/controllers/DefaultController.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace addons\Authority\html5\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\html5\controllers
+ */
+class DefaultController extends BaseController
+{
+    /**
+    * 首页
+    *
+    * @return string
+    */
+    public function actionIndex()
+    {
+        return $this->render('index',[
+
+        ]);
+    }
+}

+ 1 - 0
addons/Authority/html5/resources/.gitkeep

@@ -0,0 +1 @@
+*

+ 3 - 0
addons/Authority/html5/views/default/index.php

@@ -0,0 +1,3 @@
+<?php
+
+echo '这是' . Yii::$app->params['addon']['name'] . ' html5 页面';

+ 30 - 0
addons/Authority/html5/views/layouts/main.php

@@ -0,0 +1,30 @@
+<?php
+
+use addons\Authority\html5\assets\AppAsset;
+use common\helpers\Html;
+
+AppAsset::register($this);
+
+?>
+<?php $this->beginPage() ?>
+<!DOCTYPE html>
+<html lang="<?= Yii::$app->language ?>">
+<head>
+    <meta charset="<?= Yii::$app->charset ?>">
+    <meta name="keywords" content="">
+    <meta name="description" content="">
+    <meta name="format-detection" content="telephone=no" />
+    <meta name="format-detection" content="address=no" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <?php $this->registerCsrfMetaTags() ?>
+    <title><?= Html::encode($this->title) ?></title>
+    <?php $this->head() ?>
+</head>
+<body>
+<?php $this->beginBody() ?>
+<?= $content ?>
+<?php $this->endBody() ?>
+</body>
+</html>
+<?php $this->endPage() ?>

+ 28 - 0
addons/Authority/merchant/assets/AppAsset.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace addons\Authority\merchant\assets;
+
+use yii\web\AssetBundle;
+
+/**
+ * 静态资源管理
+ *
+ * Class AppAsset
+ * @package addons\Authority\merchant\assets
+ */
+class AppAsset extends AssetBundle
+{
+    /**
+     * @var string
+     */
+    public $sourcePath = '@addons/Authority/merchant/resources/';
+
+    public $css = [
+    ];
+
+    public $js = [
+    ];
+
+    public $depends = [
+    ];
+}

+ 20 - 0
addons/Authority/merchant/controllers/BaseController.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace addons\Authority\merchant\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\merchant\controllers
+ */
+class BaseController extends AddonsController
+{
+    /**
+    * @var string
+    */
+    // public $layout = "@addons/Authority/merchant/views/layouts/main";
+}

+ 27 - 0
addons/Authority/merchant/controllers/DefaultController.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace addons\Authority\merchant\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\merchant\controllers
+ */
+class DefaultController extends BaseController
+{
+    /**
+    * 首页
+    *
+    * @return string
+    */
+    public function actionIndex()
+    {
+        return $this->render('index',[
+
+        ]);
+    }
+}

+ 34 - 0
addons/Authority/merchant/controllers/SettingController.php

@@ -0,0 +1,34 @@
+<?php
+
+namespace addons\Authority\merchant\controllers;
+
+use Yii;
+use common\helpers\ArrayHelper;
+use addons\Authority\common\models\SettingForm;
+
+/**
+ * 参数设置
+ *
+ * Class SettingController
+ * @package addons\Authority\merchant\controllers
+ */
+class SettingController extends BaseController
+{
+    /**
+     * @return mixed|string
+     */
+    public function actionDisplay()
+    {
+        $request = Yii::$app->request;
+        $model = new SettingForm();
+        $model->attributes = $this->getConfig();
+        if ($model->load($request->post()) && $model->validate()) {
+            $this->setConfig(ArrayHelper::toArray($model));
+            return $this->message('修改成功', $this->redirect(['display']));
+        }
+
+        return $this->render('display',[
+            'model' => $model,
+        ]);
+    }
+}

+ 1 - 0
addons/Authority/merchant/resources/.gitkeep

@@ -0,0 +1 @@
+*

+ 3 - 0
addons/Authority/merchant/views/default/index.php

@@ -0,0 +1,3 @@
+<?php
+
+echo '这是' . Yii::$app->params['addon']['name'] . ' merchant 页面';

+ 30 - 0
addons/Authority/merchant/views/layouts/main.php

@@ -0,0 +1,30 @@
+<?php
+
+use addons\Authority\merchant\assets\AppAsset;
+use common\helpers\Html;
+
+AppAsset::register($this);
+
+?>
+<?php $this->beginPage() ?>
+<!DOCTYPE html>
+<html lang="<?= Yii::$app->language ?>">
+<head>
+    <meta charset="<?= Yii::$app->charset ?>">
+    <meta name="keywords" content="">
+    <meta name="description" content="">
+    <meta name="format-detection" content="telephone=no" />
+    <meta name="format-detection" content="address=no" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <?php $this->registerCsrfMetaTags() ?>
+    <title><?= Html::encode($this->title) ?></title>
+    <?php $this->head() ?>
+</head>
+<body>
+<?php $this->beginBody() ?>
+<?= $content ?>
+<?php $this->endBody() ?>
+</body>
+</html>
+<?php $this->endPage() ?>

+ 44 - 0
addons/Authority/merchant/views/setting/display.php

@@ -0,0 +1,44 @@
+<?php
+
+use yii\widgets\ActiveForm;
+use common\widgets\webuploader\Files;
+use common\helpers\Url;
+
+$this->title = '参数设置';
+$this->params['breadcrumbs'][] = ['label' => $this->title];
+
+?>
+
+
+<div class="row">
+    <div class="col-lg-12">
+        <div class="box">
+            <div class="box-header with-border">
+                <h3 class="box-title">微信分享设置</h3>
+            </div>
+            <?php $form = ActiveForm::begin([]); ?>
+            <div class="box-body">
+                 <div class="col-sm-12">
+                    <?= $form->field($model, 'share_title')->textInput(); ?>
+                    <?= $form->field($model, 'share_cover')->widget(Files::class, [
+                        'type' => 'images',
+                        'theme' => 'default',
+                        'themeConfig' => [],
+                        'config' => [
+                            'pick' => [
+                                'multiple' => false,
+                            ],
+                        ]
+                    ]); ?>
+                    <?= $form->field($model, 'share_desc')->textarea(); ?>
+                    <?= $form->field($model, 'share_link')->textInput(); ?>
+                </div>
+            </div>
+            <div class="box-footer text-center">
+                <button class="btn btn-primary" type="submit">保存</button>
+                <span class="btn btn-white" onclick="history.go(-1)">返回</span>
+            </div>
+            <?php ActiveForm::end(); ?>
+        </div>
+    </div>
+</div>

+ 37 - 0
addons/Authority/oauth2/controllers/DefaultController.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace addons\Authority\oauth2\controllers;
+
+use Yii;
+use oauth2\controllers\OnAuthController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\oauth2\controllers
+ */
+class DefaultController extends OnAuthController
+{
+    public $modelClass = '';
+
+    /**
+    * 不用进行登录验证的方法
+    *
+    * 例如: ['index', 'update', 'create', 'view', 'delete']
+    * 默认全部需要验证
+    *
+    * @var array
+    */
+    protected $authOptional = ['index'];
+
+    /**
+    * 首页
+    *
+    * @return string
+    */
+    public function actionIndex()
+    {
+        return 'Hello world';
+    }
+}

+ 20 - 0
addons/Authority/oauth2/modules/v1/Module.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace addons\Authority\oauth2\modules\v1;
+
+/**
+ * Class Module
+ * @package addons\Authority\oauth2\modules\v1 * @author jianyan74 <751393839@qq.com>
+ */
+class Module extends \yii\base\Module
+{
+    /**
+     * {@inheritdoc}
+     */
+    public $controllerNamespace = 'addons\Authority\oauth2\modules\v1\controllers';
+
+    public function init()
+    {
+        parent::init();
+    }
+}

+ 37 - 0
addons/Authority/oauth2/modules/v1/controllers/DefaultController.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace addons\Authority\oauth2\modules\v1\controllers;
+
+use Yii;
+use oauth2\controllers\OnAuthController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\oauth2\modules\v1\controllers
+ */
+class DefaultController extends OnAuthController
+{
+    public $modelClass = '';
+
+    /**
+    * 不用进行登录验证的方法
+    *
+    * 例如: ['index', 'update', 'create', 'view', 'delete']
+    * 默认全部需要验证
+    *
+    * @var array
+    */
+    protected $authOptional = ['index'];
+
+    /**
+    * 首页
+    *
+    * @return string
+    */
+    public function actionIndex()
+    {
+        return 'Hello world';
+    }
+}

+ 20 - 0
addons/Authority/oauth2/modules/v2/Module.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace addons\Authority\oauth2\modules\v2;
+
+/**
+ * Class Module
+ * @package addons\Authority\oauth2\modules\v2 * @author jianyan74 <751393839@qq.com>
+ */
+class Module extends \yii\base\Module
+{
+    /**
+     * {@inheritdoc}
+     */
+    public $controllerNamespace = 'addons\Authority\oauth2\modules\v2\controllers';
+
+    public function init()
+    {
+        parent::init();
+    }
+}

+ 37 - 0
addons/Authority/oauth2/modules/v2/controllers/DefaultController.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace addons\Authority\oauth2\modules\v2\controllers;
+
+use Yii;
+use oauth2\controllers\OnAuthController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Authority\oauth2\modules\v2\controllers
+ */
+class DefaultController extends OnAuthController
+{
+    public $modelClass = '';
+
+    /**
+    * 不用进行登录验证的方法
+    *
+    * 例如: ['index', 'update', 'create', 'view', 'delete']
+    * 默认全部需要验证
+    *
+    * @var array
+    */
+    protected $authOptional = ['index'];
+
+    /**
+    * 首页
+    *
+    * @return string
+    */
+    public function actionIndex()
+    {
+        return 'Hello world';
+    }
+}

+ 21 - 0
addons/Authority/services/Application.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace addons\Authority\services;
+
+use common\components\Service;
+
+/**
+ * Class Application
+ *
+ * @package addons\Authority\services
+ * @property ConfigService $config 默认配置
+ */
+class Application extends Service
+{
+    /**
+     * @var array
+     */
+    public $childService = [
+        'config' => ConfigService::class
+    ];
+}

+ 24 - 0
addons/Authority/services/ConfigService.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace addons\Authority\services;
+
+use common\components\BaseAddonConfigService;
+use addons\Authority\common\models\SettingForm;
+
+/**
+* Class ConfigService
+*
+* @package addons\Authority\services
+*/
+class ConfigService extends BaseAddonConfigService
+{
+    /**
+    * @var string
+    */
+    public $addonName = "Authority";
+
+    /**
+    * @var SettingForm
+    */
+    public $settingForm = SettingForm::class;
+}

+ 119 - 0
addons/Member/AddonConfig.php

@@ -0,0 +1,119 @@
+<?php
+
+namespace addons\Member;
+
+use common\components\BaseAddonConfig;
+use addons\Member\services\Application;
+use addons\Member\common\components\Bootstrap;
+
+/**
+ * Class Addon
+ * @package addons\Member
+ */
+class AddonConfig extends BaseAddonConfig
+{
+    /**
+     * 基础信息
+     *
+     * @var array
+     */
+    public $info = [
+        'name' => 'Member',
+        'title' => '会员',
+        'brief_introduction' => '会员账号信息管理',
+        'description' => '',
+        'author' => '简言',
+        'version' => '1.0.4',
+    ];
+
+    /**
+     * 应用配置
+     *
+     * 例如:菜单设置/权限设置/快捷入口
+     *
+     * @var array
+     */
+    public $appsConfig = [
+        'backend' => 'common/config/backend.php',
+        'frontend' => 'common/config/frontend.php',
+        'merchant' => 'common/config/merchant.php',
+        'html5' => 'common/config/html5.php',
+        'api' => 'common/config/api.php',
+        'oauth2' => 'common/config/oauth2.php',
+    ];
+
+    /**
+     * 引导文件
+     *
+     * 设置后系统会在执行插件控制器前执行
+     *
+     * @var Bootstrap
+     */
+    // public $bootstrap = Bootstrap::class;
+
+    /**
+     * 服务层
+     *
+     * 设置后系统会自动注册
+     *
+     * 调用方式
+     *
+     * Yii::$app->插件名称 + Services
+     *
+     * 例如
+     *
+     * Yii::$app->tinyShopServices;
+     *
+     * @var Application
+     */
+    // public $service = Application::class;
+
+    /**
+     * 商户路由映射
+     *
+     * 开启后无需再去后台应用端去开发程序,直接映射商家应用的控制器方法过去,菜单权限还需要单独配置
+     *
+     * @var bool
+     */
+    public $isMerchantRouteMap = true;
+
+    /**
+     * 类别
+     *
+     * @var string
+     * [
+     *      'plug'      => "功能插件",
+     *      'business'  => "主要业务",
+     *      'customer'  => "客户关系",
+     *      'activity'  => "营销及活动",
+     *      'services'  => "常用服务及工具",
+     *      'biz'       => "行业解决方案",
+     *      'h5game'    => "小游戏",
+     *      'other'     => "其他",
+     * ]
+     */
+    public $group = 'business';
+
+    /**
+     * 保存在当前模块的根目录下面
+     *
+     * 例如 $install = 'Install';
+     * 安装类
+     * @var string
+     */
+    public $install = 'Install';
+
+    /**
+     * 卸载SQL类
+     *
+     * @var string
+     */
+    public $uninstall = 'UnInstall';
+
+    /**
+     * 更新SQL类
+     *
+     * @var string
+     */
+    public $upgrade = 'Upgrade';
+}

+ 30 - 0
addons/Member/Install.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace addons\Member;
+
+use Yii;
+use yii\db\Migration;
+use common\helpers\MigrateHelper;
+use common\interfaces\AddonWidget;
+
+/**
+ * 安装
+ *
+ * Class Install
+ * @package addons\Member
 */
+class Install extends Migration implements AddonWidget
+{
+    /**
+     * @param $addon
+     * @return mixed|void
+     * @throws \yii\base\InvalidConfigException
+     * @throws \yii\web\NotFoundHttpException
+     * @throws \yii\web\UnprocessableEntityHttpException
+     */
+    public function run($addon)
+    {
+        // MigrateHelper::upByPath([
+        //     '@addons/Member/console/migrations/'
+        // ]);
+    }
+}

+ 30 - 0
addons/Member/UnInstall.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace addons\Member;
+
+use Yii;
+use yii\db\Migration;
+use common\helpers\MigrateHelper;
+use common\interfaces\AddonWidget;
+
+/**
+ * 卸载
+ *
+ * Class UnInstall
+ * @package addons\Member
 */
+class UnInstall extends Migration implements AddonWidget
+{
+    /**
+     * @param $addon
+     * @return mixed|void
+     * @throws \yii\base\InvalidConfigException
+     * @throws \yii\web\NotFoundHttpException
+     * @throws \yii\web\UnprocessableEntityHttpException
+     */
+    public function run($addon)
+    {
+        // MigrateHelper::downByPath([
+        //     '@addons/Member/console/migrations/'
+        // ]);
+    }
+}

+ 71 - 0
addons/Member/Upgrade.php

@@ -0,0 +1,71 @@
+<?php
+
+namespace addons\Member;
+
+use Yii;
+use common\components\Migration;
+use common\interfaces\AddonWidget;
+use common\helpers\StringHelper;
+use common\models\member\Member;
+
+/**
+ * 升级数据库
+ *
+ * Class Upgrade
+ * @package addons\Member
+ */
+class Upgrade extends Migration implements AddonWidget
+{
+    /**
+     * @var array
+     */
+    public $versions = [
+        '1.0.0', // 默认版本
+        '1.0.1', '1.0.2', '1.0.3', '1.0.4'
+    ];
+
+    /**
+     * @param $addon
+     * @return mixed|void
+     * @throws \yii\db\Exception
+     */
+    public function run($addon)
+    {
+        switch ($addon->version) {
+            case '1.0.4' :
+                $members = Member::find()->select(['id', 'tree'])->asArray()->all();
+                foreach ($members as $member) {
+                    $this->updateTree($member['id'], $member['tree'], Member::class);
+                }
+                break;
+            case '1.0.3' :
+                $this->addColumn('{{%member_invoice}}', 'opening_bank_account', "varchar(100) NULL DEFAULT '' COMMENT '公司开户行账号'");
+                $this->addColumn('{{%member_invoice}}', 'phone', "varchar(50) NULL DEFAULT '' COMMENT '公司电话'");
+                $this->addColumn('{{%member_invoice}}', 'remark', "varchar(255) NULL DEFAULT '' COMMENT '备注'");
+                break;
+            case '1.0.2' :
+                $this->addColumn('{{%member}}', 'bg_image', "varchar(200) NULL DEFAULT '' COMMENT '个人背景图'");
+                $this->addColumn('{{%member}}', 'description', "varchar(200) NULL DEFAULT '' COMMENT '个人说明'");
+                break;
+            case '1.0.1' :
+                $this->addColumn('{{%member_withdraw_deposit}}', 'batch_no', "varchar(100) NULL DEFAULT '' COMMENT '批量转账单号'");
+                break;
+        }
+    }
+
+    /**
+     * @param int $id
+     * @param string $tree
+     * @param $model
+     * @return void
+     */
+    protected function updateTree($id, $tree, $model)
+    {
+        $tree = StringHelper::replace(' ', '', $tree);
+        $endTree = substr($tree, strlen($tree) - 1);
+        if ($endTree != '-') {
+            $tree = $tree.'-';
+            $model::updateAll(['tree' => $tree], ['id' => $id]);
+        }
+    }
+}

+ 37 - 0
addons/Member/api/controllers/DefaultController.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace addons\Member\api\controllers;
+
+use Yii;
+use api\controllers\OnAuthController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Member\api\controllers
+ */
+class DefaultController extends OnAuthController
+{
+    public $modelClass = '';
+
+    /**
+     * 不用进行登录验证的方法
+     *
+     * 例如: ['index', 'update', 'create', 'view', 'delete']
+     * 默认全部需要验证
+     *
+     * @var array
+     */
+    protected $authOptional = ['index'];
+
+    /**
+     * 首页
+     *
+     * @return string
+     */
+    public function actionIndex()
+    {
+        return 'Hello world';
+    }
+}

+ 20 - 0
addons/Member/api/modules/v1/Module.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace addons\Member\api\modules\v1;
+
+/**
+ * Class Module
+ * @package addons\Member\api\modules\v1 * @author jianyan74 <751393839@qq.com>
+ */
+class Module extends \yii\base\Module
+{
+    /**
+     * {@inheritdoc}
+     */
+    public $controllerNamespace = 'addons\Member\api\modules\v1\controllers';
+
+    public function init()
+    {
+        parent::init();
+    }
+}

+ 37 - 0
addons/Member/api/modules/v1/controllers/DefaultController.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace addons\Member\api\modules\v1\controllers;
+
+use Yii;
+use api\controllers\OnAuthController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Member\api\modules\v1\controllers
+ */
+class DefaultController extends OnAuthController
+{
+    public $modelClass = '';
+
+    /**
+     * 不用进行登录验证的方法
+     *
+     * 例如: ['index', 'update', 'create', 'view', 'delete']
+     * 默认全部需要验证
+     *
+     * @var array
+     */
+    protected $authOptional = ['index'];
+
+    /**
+     * 首页
+     *
+     * @return string
+     */
+    public function actionIndex()
+    {
+        return 'Hello world';
+    }
+}

+ 20 - 0
addons/Member/api/modules/v2/Module.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace addons\Member\api\modules\v2;
+
+/**
+ * Class Module
+ * @package addons\Member\api\modules\v2 * @author jianyan74 <751393839@qq.com>
+ */
+class Module extends \yii\base\Module
+{
+    /**
+     * {@inheritdoc}
+     */
+    public $controllerNamespace = 'addons\Member\api\modules\v2\controllers';
+
+    public function init()
+    {
+        parent::init();
+    }
+}

+ 37 - 0
addons/Member/api/modules/v2/controllers/DefaultController.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace addons\Member\api\modules\v2\controllers;
+
+use Yii;
+use api\controllers\OnAuthController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Member\api\modules\v2\controllers
+ */
+class DefaultController extends OnAuthController
+{
+    public $modelClass = '';
+
+    /**
+     * 不用进行登录验证的方法
+     *
+     * 例如: ['index', 'update', 'create', 'view', 'delete']
+     * 默认全部需要验证
+     *
+     * @var array
+     */
+    protected $authOptional = ['index'];
+
+    /**
+     * 首页
+     *
+     * @return string
+     */
+    public function actionIndex()
+    {
+        return 'Hello world';
+    }
+}

+ 28 - 0
addons/Member/backend/assets/AppAsset.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace addons\Member\backend\assets;
+
+use yii\web\AssetBundle;
+
+/**
+ * 静态资源管理
+ *
+ * Class AppAsset
+ * @package addons\Member\backend\assets
+ */
+class AppAsset extends AssetBundle
+{
+    /**
+     * @var string
+     */
+    public $sourcePath = '@addons/Member/backend/resources/';
+
+    public $css = [
+    ];
+
+    public $js = [
+    ];
+
+    public $depends = [
+    ];
+}

+ 20 - 0
addons/Member/backend/controllers/BaseController.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace addons\Member\backend\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Member\backend\controllers
+ */
+class BaseController extends AddonsController
+{
+    /**
+     * @var string
+     */
+    // public $layout = "@addons/Member/backend/views/layouts/main";
+}

+ 27 - 0
addons/Member/backend/controllers/DefaultController.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace addons\Member\backend\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Member\backend\controllers
+ */
+class DefaultController extends BaseController
+{
+    /**
+     * 首页
+     *
+     * @return string
+     */
+    public function actionIndex()
+    {
+        return $this->render('index',[
+
+        ]);
+    }
+}

+ 1 - 0
addons/Member/backend/resources/.gitkeep

@@ -0,0 +1 @@
+*

+ 3 - 0
addons/Member/backend/views/default/index.php

@@ -0,0 +1,3 @@
+<?php
+
+echo '这是' . Yii::$app->params['addon']['name'] . ' backend 页面';

+ 30 - 0
addons/Member/backend/views/layouts/main.php

@@ -0,0 +1,30 @@
+<?php
+
+use common\helpers\Html;
+use addons\Member\backend\assets\AppAsset;
+
+AppAsset::register($this);
+
+?>
+<?php $this->beginPage() ?>
+<!DOCTYPE html>
+<html lang="<?= Yii::$app->language ?>">
+<head>
+    <meta charset="<?= Yii::$app->charset ?>">
+    <meta name="keywords" content="">
+    <meta name="description" content="">
+    <meta name="format-detection" content="telephone=no" />
+    <meta name="format-detection" content="address=no" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <?php $this->registerCsrfMetaTags() ?>
+    <title><?= Html::encode($this->title) ?></title>
+    <?php $this->head() ?>
+</head>
+<body>
+<?php $this->beginBody() ?>
+<?= $content ?>
+<?php $this->endBody() ?>
+</body>
+</html>
+<?php $this->endPage() ?>

+ 23 - 0
addons/Member/common/components/Bootstrap.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace addons\Member\common\components;
+
+use Yii;
+use common\interfaces\AddonWidget;
+
+/**
+ * Bootstrap
+ *
+ * Class Bootstrap
+ * @package addons\Member\common\config
 */
+class Bootstrap implements AddonWidget
+{
+    /**
+     * @param $addon
+     * @return mixed|void
+     */
+    public function run($addon)
+    {
+
+    }
+}

+ 34 - 0
addons/Member/common/config/api.php

@@ -0,0 +1,34 @@
+<?php
+
+return [
+
+    // ----------------------- 参数配置 ----------------------- //
+    'config' => [
+        // 菜单配置
+        'menu' => [
+            'location' => 'addons', // default:系统顶部菜单;addons:应用中心菜单
+            'icon' => 'fa fa-puzzle-piece',
+            'pattern' => [], // 可见开发模式 b2c、b2b2c、saas 不填默认全部可见, 可设置为 blank 为全部不可见
+        ],
+        // 子模块配置
+        'modules' => [
+            'v1' => [
+                'class' => 'addons\Member\api\modules\v1\Module',
+            ],
+            'v2' => [
+                'class' => 'addons\Member\api\modules\v2\Module',
+            ],
+        ],
+    ],
+
+    // ----------------------- 菜单配置 ----------------------- //
+
+    'menu' => [
+
+    ],
+
+    // ----------------------- 权限配置 ----------------------- //
+
+    'authItem' => [
+    ],
+];

+ 91 - 0
addons/Member/common/config/backend.php

@@ -0,0 +1,91 @@
+<?php
+
+return [
+
+    // ----------------------- 参数配置 ----------------------- //
+    'config' => [
+        // 菜单配置
+        'menu' => [
+            'location' => 'default', // default:系统顶部菜单;addons:应用中心菜单
+            'icon' => 'fa fa-user',
+            'sort' => 0, // 自定义排序
+            'pattern' => [], // 可见开发模式 b2c、b2b2c、saas 不填默认全部可见, 可设置为 blank 为全部不可见
+        ],
+        // 子模块配置
+        'modules' => [
+        ],
+    ],
+
+    // ----------------------- 菜单配置 ----------------------- //
+
+    'menu' => [
+        [
+            'title' => '会员管理',
+            'name' => 'indexMember',
+            'icon' => 'fa fa-user',
+            'child' => [
+                [
+                    'title' => '会员信息',
+                    'name' => 'member/index',
+                ],
+                [
+                    'title' => '会员等级',
+                    'name' => 'level/index',
+                    'pattern' => ['b2c', 'b2b2c'],
+                ],
+                [
+                    'title' => '会员标签',
+                    'name' => 'tag/index',
+                    'pattern' => ['b2c', 'b2b2c'],
+                ],
+                [
+                    'title' => '第三方授权',
+                    'name' => 'auth/index',
+                    'pattern' => ['b2c', 'b2b2c'],
+                ],
+                [
+                    'title' => '黑名单',
+                    'name' => 'blacklist/index',
+                    'pattern' => ['b2c', 'b2b2c'],
+                ],
+                [
+                    'title' => '会员注销',
+                    'name' => 'cancel/index',
+                    'pattern' => ['b2c', 'b2b2c'],
+                ]
+            ]
+        ],
+        [
+            'title' => '会员日志',
+            'name' => 'memberCreditsLog',
+            'icon' => 'fa fa-file-alt',
+            'child' => [
+                [
+                    'title' => '余额日志',
+                    'name' => 'credits-log/money',
+                ],
+                [
+                    'title' => '消费日志',
+                    'name' => 'credits-log/consume',
+                ],
+                [
+                    'title' => '积分日志',
+                    'name' => 'credits-log/integral',
+                ],
+                [
+                    'title' => '成长值日志',
+                    'name' => 'credits-log/growth',
+                ],
+            ]
+        ]
+    ],
+
+    // ----------------------- 权限配置 ----------------------- //
+
+    'authItem' => [
+        [
+            'title' => '所有权限',
+            'name' => '*',
+        ],
+    ],
+];

+ 28 - 0
addons/Member/common/config/frontend.php

@@ -0,0 +1,28 @@
+<?php
+
+return [
+
+    // ----------------------- 参数配置 ----------------------- //
+    'config' => [
+        // 菜单配置
+        'menu' => [
+            'location' => 'addons', // default:系统顶部菜单;addons:应用中心菜单
+            'icon' => 'fa fa-puzzle-piece',
+            'pattern' => [], // 可见开发模式 b2c、b2b2c、saas 不填默认全部可见, 可设置为 blank 为全部不可见
+        ],
+        // 子模块配置
+        'modules' => [
+        ],
+    ],
+
+    // ----------------------- 菜单配置 ----------------------- //
+
+    'menu' => [
+
+    ],
+
+    // ----------------------- 权限配置 ----------------------- //
+
+    'authItem' => [
+    ],
+];

+ 28 - 0
addons/Member/common/config/html5.php

@@ -0,0 +1,28 @@
+<?php
+
+return [
+
+    // ----------------------- 参数配置 ----------------------- //
+    'config' => [
+        // 菜单配置
+        'menu' => [
+            'location' => 'addons', // default:系统顶部菜单;addons:应用中心菜单
+            'icon' => 'fa fa-puzzle-piece',
+            'pattern' => [], // 可见开发模式 b2c、b2b2c、saas 不填默认全部可见, 可设置为 blank 为全部不可见
+        ],
+        // 子模块配置
+        'modules' => [
+        ],
+    ],
+
+    // ----------------------- 菜单配置 ----------------------- //
+
+    'menu' => [
+
+    ],
+
+    // ----------------------- 权限配置 ----------------------- //
+
+    'authItem' => [
+    ],
+];

+ 30 - 0
addons/Member/common/config/merchant.php

@@ -0,0 +1,30 @@
+<?php
+
+return [
+
+    // ----------------------- 参数配置 ----------------------- //
+    'config' => [
+        // 菜单配置
+        'menu' => [
+            'location' => 'default', // default:系统顶部菜单;addons:应用中心菜单
+            'icon' => 'fa fa-puzzle-piece',
+            'sort' => 0, // 自定义排序
+            'pattern' => ['blank'],
+        ],
+        // 子模块配置
+        'modules' => [
+        ],
+    ],
+
+    // ----------------------- 菜单配置 ----------------------- //
+
+    'menu' => [
+
+    ],
+
+    // ----------------------- 权限配置 ----------------------- //
+
+    'authItem' => [
+
+    ],
+];

+ 34 - 0
addons/Member/common/config/oauth2.php

@@ -0,0 +1,34 @@
+<?php
+
+return [
+
+    // ----------------------- 参数配置 ----------------------- //
+    'config' => [
+        // 菜单配置
+        'menu' => [
+            'location' => 'addons', // default:系统顶部菜单;addons:应用中心菜单
+            'icon' => 'fa fa-puzzle-piece',
+            'pattern' => [], // 可见开发模式 b2c、b2b2c、saas 不填默认全部可见, 可设置为 blank 为全部不可见
+        ],
+        // 子模块配置
+        'modules' => [
+            'v1' => [
+                'class' => 'addons\Member\oauth2\modules\v1\Module',
+            ],
+            'v2' => [
+                'class' => 'addons\Member\oauth2\modules\v2\Module',
+            ],
+        ],
+    ],
+
+    // ----------------------- 菜单配置 ----------------------- //
+
+    'menu' => [
+
+    ],
+
+    // ----------------------- 权限配置 ----------------------- //
+
+    'authItem' => [
+    ],
+];

BIN
addons/Member/common/file/member.xls


+ 41 - 0
addons/Member/common/models/SettingForm.php

@@ -0,0 +1,41 @@
+<?php
+
+namespace addons\Member\common\models;
+
+use yii\base\Model;
+
+/**
+ * Class SettingForm
+ * @package addons\Member\common\models
+ */
+class SettingForm extends Model
+{
+    public $cancel_audit_status = 0;
+    public $cancel_protocol_title = '会员注销协议';
+    public $cancel_protocol = '暂无';
+
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['cancel_audit_status'], 'string', 'max' => 255],
+            [['cancel_protocol_title'], 'string', 'max' => 100],
+            [['cancel_protocol'], 'string'],
+            [['cancel_protocol_title', 'cancel_protocol'], 'required'],
+        ];
+    }
+
+    /**
+     * @return array
+     */
+    public function attributeLabels()
+    {
+        return [
+            'cancel_audit_status' => '注销审核',
+            'cancel_protocol_title' => '注销协议标题',
+            'cancel_protocol' => '注销协议内容',
+        ];
+    }
+}

+ 1 - 0
addons/Member/console/controllers/.gitkeep

@@ -0,0 +1 @@
+*

+ 1 - 0
addons/Member/console/migrations/.gitkeep

@@ -0,0 +1 @@
+*

+ 28 - 0
addons/Member/frontend/assets/AppAsset.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace addons\Member\frontend\assets;
+
+use yii\web\AssetBundle;
+
+/**
+ * 静态资源管理
+ *
+ * Class AppAsset
+ * @package addons\Member\frontend\assets
+ */
+class AppAsset extends AssetBundle
+{
+    /**
+     * @var string
+     */
+    public $sourcePath = '@addons/Member/frontend/resources/';
+
+    public $css = [
+    ];
+
+    public $js = [
+    ];
+
+    public $depends = [
+    ];
+}

+ 20 - 0
addons/Member/frontend/controllers/BaseController.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace addons\Member\frontend\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Member\frontend\controllers
+ */
+class BaseController extends AddonsController
+{
+    /**
+     * @var string
+     */
+    public $layout = "@addons/Member/frontend/views/layouts/main";
+}

+ 27 - 0
addons/Member/frontend/controllers/DefaultController.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace addons\Member\frontend\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Member\frontend\controllers
+ */
+class DefaultController extends BaseController
+{
+    /**
+     * 首页
+     *
+     * @return string
+     */
+    public function actionIndex()
+    {
+        return $this->render('index',[
+
+        ]);
+    }
+}

+ 1 - 0
addons/Member/frontend/resources/.gitkeep

@@ -0,0 +1 @@
+*

+ 3 - 0
addons/Member/frontend/views/default/index.php

@@ -0,0 +1,3 @@
+<?php
+
+echo '这是' . Yii::$app->params['addon']['name'] . ' frontend 页面';

+ 30 - 0
addons/Member/frontend/views/layouts/main.php

@@ -0,0 +1,30 @@
+<?php
+
+use common\helpers\Html;
+use addons\Member\frontend\assets\AppAsset;
+
+AppAsset::register($this);
+
+?>
+<?php $this->beginPage() ?>
+<!DOCTYPE html>
+<html lang="<?= Yii::$app->language ?>">
+<head>
+    <meta charset="<?= Yii::$app->charset ?>">
+    <meta name="keywords" content="">
+    <meta name="description" content="">
+    <meta name="format-detection" content="telephone=no" />
+    <meta name="format-detection" content="address=no" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <?php $this->registerCsrfMetaTags() ?>
+    <title><?= Html::encode($this->title) ?></title>
+    <?php $this->head() ?>
+</head>
+<body>
+<?php $this->beginBody() ?>
+<?= $content ?>
+<?php $this->endBody() ?>
+</body>
+</html>
+<?php $this->endPage() ?>

+ 28 - 0
addons/Member/html5/assets/AppAsset.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace addons\Member\html5\assets;
+
+use yii\web\AssetBundle;
+
+/**
+ * 静态资源管理
+ *
+ * Class AppAsset
+ * @package addons\Member\html5\assets
+ */
+class AppAsset extends AssetBundle
+{
+    /**
+     * @var string
+     */
+    public $sourcePath = '@addons/Member/html5/resources/';
+
+    public $css = [
+    ];
+
+    public $js = [
+    ];
+
+    public $depends = [
+    ];
+}

+ 20 - 0
addons/Member/html5/controllers/BaseController.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace addons\Member\html5\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Member\html5\controllers
+ */
+class BaseController extends AddonsController
+{
+    /**
+     * @var string
+     */
+    public $layout = "@addons/Member/html5/views/layouts/main";
+}

+ 27 - 0
addons/Member/html5/controllers/DefaultController.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace addons\Member\html5\controllers;
+
+use Yii;
+use common\controllers\AddonsController;
+
+/**
+ * 默认控制器
+ *
+ * Class DefaultController
+ * @package addons\Member\html5\controllers
+ */
+class DefaultController extends BaseController
+{
+    /**
+     * 首页
+     *
+     * @return string
+     */
+    public function actionIndex()
+    {
+        return $this->render('index',[
+
+        ]);
+    }
+}

+ 1 - 0
addons/Member/html5/resources/.gitkeep

@@ -0,0 +1 @@
+*

+ 3 - 0
addons/Member/html5/views/default/index.php

@@ -0,0 +1,3 @@
+<?php
+
+echo '这是' . Yii::$app->params['addon']['name'] . ' html5 页面';

+ 30 - 0
addons/Member/html5/views/layouts/main.php

@@ -0,0 +1,30 @@
+<?php
+
+use common\helpers\Html;
+use addons\Member\html5\assets\AppAsset;
+
+AppAsset::register($this);
+
+?>
+<?php $this->beginPage() ?>
+<!DOCTYPE html>
+<html lang="<?= Yii::$app->language ?>">
+<head>
+    <meta charset="<?= Yii::$app->charset ?>">
+    <meta name="keywords" content="">
+    <meta name="description" content="">
+    <meta name="format-detection" content="telephone=no" />
+    <meta name="format-detection" content="address=no" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <?php $this->registerCsrfMetaTags() ?>
+    <title><?= Html::encode($this->title) ?></title>
+    <?php $this->head() ?>
+</head>
+<body>
+<?php $this->beginBody() ?>
+<?= $content ?>
+<?php $this->endBody() ?>
+</body>
+</html>
+<?php $this->endPage() ?>

+ 28 - 0
addons/Member/merchant/assets/AppAsset.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace addons\Member\merchant\assets;
+
+use yii\web\AssetBundle;
+
+/**
+ * 静态资源管理
+ *
+ * Class AppAsset
+ * @package addons\Member\merchant\assets
+ */
+class AppAsset extends AssetBundle
+{
+    /**
+     * @var string
+     */
+    public $sourcePath = '@addons/Member/merchant/resources/';
+
+    public $css = [
+    ];
+
+    public $js = [
+    ];
+
+    public $depends = [
+    ];
+}

+ 163 - 0
addons/Member/merchant/controllers/AddressController.php

@@ -0,0 +1,163 @@
+<?php
+
+namespace addons\Member\merchant\controllers;
+
+use Yii;
+use yii\data\Pagination;
+use yii\helpers\ArrayHelper;
+use common\helpers\ResultHelper;
+use common\enums\StatusEnum;
+use common\models\member\Address;
+use common\models\member\Member;
+
+/**
+ * 收货地址
+ *
+ * Class AddressController
+ * @package addons\Member\merchant\controllers
+ * @author jianyan74 <751393839@qq.com>
+ */
+class AddressController extends BaseController
+{
+    protected $member_id;
+    /**
+     * @var Member
+     */
+    protected $member;
+
+    /**
+     * @throws \yii\base\InvalidConfigException
+     */
+    public function init()
+    {
+        $this->member_id = Yii::$app->request->get('member_id');
+        $this->member = Yii::$app->services->member->findById($this->member_id);
+
+        parent::init();
+    }
+
+    /**
+     * 首页
+     *
+     * @return mixed
+     */
+    public function actionIndex()
+    {
+        $data = Address::find()
+            ->where(['>=', 'status', StatusEnum::DISABLED])
+            ->andWhere(['member_id' => $this->member_id]);
+        $pages = new Pagination(['totalCount' => $data->count(), 'pageSize' => $this->pageSize]);
+        $models = $data->offset($pages->offset)
+            ->orderBy('id desc')
+            ->limit($pages->limit)
+            ->all();
+
+        return $this->render($this->action->id, [
+            'models' => $models,
+            'pages' => $pages,
+            'member_id' => $this->member_id,
+        ]);
+    }
+
+    /**
+     * 编辑/创建
+     *
+     * @return mixed
+     */
+    public function actionEdit()
+    {
+        $request = Yii::$app->request;
+        $id = $request->get('id', null);
+        $model = $this->findModel($id);
+        if ($model->load($request->post()) && $model->save()) {
+            return $this->redirect(['index', 'member_id' => $this->member_id]);
+        }
+
+        return $this->render($this->action->id, [
+            'model' => $model,
+            'member_id' => $this->member_id,
+        ]);
+    }
+
+    /**
+     * 伪删除
+     *
+     * @param $id
+     * @return mixed
+     */
+    public function actionDestroy($id)
+    {
+        if (!($model = Address::findOne($id))) {
+            return $this->message("找不到数据", $this->redirect(['index']), 'error');
+        }
+
+        $model->status = StatusEnum::DELETE;
+        if ($model->save()) {
+            return $this->message("删除成功", $this->redirect(['index', 'member_id' => $model->member_id]));
+        }
+
+        return $this->message("删除失败", $this->redirect(['index', 'member_id' => $model->member_id]), 'error');
+    }
+
+    /**
+     * 更新排序/状态字段
+     *
+     * @param $id
+     * @return array
+     */
+    public function actionAjaxUpdate($id)
+    {
+        if (!($model = Address::findOne($id))) {
+            return ResultHelper::json(404, '找不到数据');
+        }
+
+        $model->attributes = ArrayHelper::filter(Yii::$app->request->get(), ['sort', 'status']);
+        if (!$model->save()) {
+            return ResultHelper::json(422, $this->getError($model));
+        }
+
+        return ResultHelper::json(200, '修改成功');
+    }
+
+    /**
+     * 编辑/创建
+     *
+     * @return mixed|string|\yii\web\Response
+     * @throws \yii\base\ExitException
+     */
+    public function actionAjaxEdit()
+    {
+        $id = Yii::$app->request->get('id');
+        $model = $this->findModel($id);
+        // ajax 校验
+        $this->activeFormValidate($model);
+        if ($model->load(Yii::$app->request->post())) {
+            return $model->save()
+                ? $this->redirect(['index', 'member_id' => $model->member_id])
+                : $this->message($this->getError($model), $this->redirect(['index', 'member_id' => $model->member_id]), 'error');
+        }
+
+        return $this->renderAjax($this->action->id, [
+            'model' => $model,
+        ]);
+    }
+
+    /**
+     * 返回模型
+     *
+     * @param $id
+     * @return mixed
+     */
+    protected function findModel($id)
+    {
+        if (empty($id) || empty(($model = Address::findOne($id)))) {
+            $model = new Address;
+            $model = $model->loadDefaultValues();
+            $model->member_id = $this->member_id;
+            $model->merchant_id = $this->member->merchant_id;
+            return $model;
+        }
+
+        return $model;
+    }
+}

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels

粤ICP备19079148号