Skip to content

Commit

Permalink
更新版本到2.3.124 具体更新内容看更新日志
Browse files Browse the repository at this point in the history
  • Loading branch information
jianyan74 committed Sep 19, 2019
1 parent cc5e1ea commit 1ec776b
Show file tree
Hide file tree
Showing 733 changed files with 7,796 additions and 48,149 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ RageFrame创建于2016年4月16日,一个基于Yii2高级框架的快速开发
- 极致的插件机制,系统内的系统,安装和卸载不会对原来的系统产生影响,强大的功能完全满足各阶段的需求,支持用户多端访问(后台、微信、Api、前台等),系统中的系统。
- 极完善的RBAC权限控制管理、无限父子级权限分组、可自由分配子级权限,且按钮/链接/自定义内容/插件等都可加入权限控制。
- 只做基础底层内容,不会在上面开发过多的业务内容,满足绝大多数的系统二次开发。
- 多入口模式,多入口分为 backend(后台)、frontend(PC前端)wechat(微信)api(对内接口)oauth2 server(对外接口),不同的业务,不同的设备,进入不同的入口。
- 多入口模式,多入口分为 backend(后台)、frontend(PC前端)wechat(微信)、console(控制台)、api(对内接口)oauth2 server(对外接口),不同的业务,不同的设备,进入不同的入口。
- 对接微信公众号且支持小程序,使用了一款优秀的微信非官方SDK Easywechat 4.x,开箱即用,预置了绝大部分功能,大幅度的提升了微信开发效率。
- 整合了第三方登录,目前有QQ、微信、微博、GitHub等等。
- 整合了第三方支付,目前有微信支付、支付宝支付、银联支付,二次封装为网关多个支付一个入口一个出口。
- 整合了RESTful API,支持前后端分离接口开发和app接口开发,可直接上手开发业务。
- 一键切换云存储,本地存储、腾讯COS、阿里云OOS、七牛云存储都可一键切换,且增加其他第三方存储也非常方便。
- 全面监控系统报错,报错日志写入数据库,方便定位错误信息。
- 全面监控系统报错,报错日志写入数据库,方便定位错误信息。支持直接钉钉提醒。
- 快速高效的Servises(服务层),遵循Yii2的懒加载方式,只初始化使用到的组件服务。
- 丰富的表单控件(时间、日期、时间日期、日期范围选择、颜色选择器、省市区三级联动、省市区勾选、单图上传、多图上传、单文件上传、多文件上传、百度编辑器、图表、多文本编辑框、地图经纬度选择器、图片裁剪上传、TreeGrid)和组件(二维码生成、Curl、IP地址转地区),快速开发,不必在为基础组件而担忧。
- 丰富的表单控件(时间、日期、时间日期、日期范围选择、颜色选择器、省市区三级联动、省市区勾选、单图上传、多图上传、单文件上传、多文件上传、百度编辑器、百度图表、多文本编辑框、地图经纬度选择器、图片裁剪上传、TreeGrid、JsTree)和组件(二维码生成、Curl、IP地址转地区),快速开发,不必在为基础组件而担忧。
- 完善的文档和辅助类,方便二次开发与集成。

### 思维导图
Expand All @@ -38,14 +38,18 @@ RageFrame创建于2016年4月16日,一个基于Yii2高级框架的快速开发
![image](docs/guide-zh-CN/images/sys-config.png)
【系统 - 角色编辑】
![image](docs/guide-zh-CN/images/rbac-role.png)
【系统 - 日志统计】
![image](docs/guide-zh-CN/images/log-stat.png)
【会员 - 信息】
![image](docs/guide-zh-CN/images/member-info.png)
【微信 - 自定义菜单】
![image](docs/guide-zh-CN/images/wechat-menu.png)
【微信 - 关注统计】
![image](docs/guide-zh-CN/images/wechat-stat.png)
【插件模块 - 列表】
![image](docs/guide-zh-CN/images/addon-list.png)
【插件模块 - 文章模块】
![image](docs/guide-zh-CN/images/addon-activity.png)
【插件模块 - 系统监控】
![image](docs/guide-zh-CN/images/system.png)

### 开始之前

Expand Down
12 changes: 6 additions & 6 deletions addons/RfArticle/Upgrade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle;

use Yii;
Expand All @@ -23,15 +24,14 @@ class Upgrade extends Migration implements AddonWidget
];

/**
* @param $addon
* @return mixed|void
* @throws \yii\db\Exception
*/
* @param $addon
* @return mixed|void
* @throws \yii\db\Exception
*/
public function run($addon)
{
$migration = new Migration();
switch ($addon->version)
{
switch ($addon->version) {
case '1.0.1' :
// 增加测试 - 冗余的字段
// $migration->addColumn('{{%addon_example_curd}}', 'redundancy_field', 'varchar(48)');
Expand Down
1 change: 1 addition & 0 deletions addons/RfArticle/api/controllers/AdvController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\api\controllers;

use Yii;
Expand Down
1 change: 1 addition & 0 deletions addons/RfArticle/api/controllers/ArticleCateController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\api\controllers;

use addons\RfArticle\common\models\ArticleCate;
Expand Down
1 change: 1 addition & 0 deletions addons/RfArticle/api/controllers/ArticleController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\api\controllers;

use yii\data\ActiveDataProvider;
Expand Down
1 change: 1 addition & 0 deletions addons/RfArticle/backend/assets/AppAsset.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\backend\assets;

use yii\web\AssetBundle;
Expand Down
1 change: 1 addition & 0 deletions addons/RfArticle/backend/controllers/AdvController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\backend\controllers;

use Yii;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\backend\controllers;

use Yii;
Expand Down
1 change: 1 addition & 0 deletions addons/RfArticle/backend/controllers/ArticleController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\backend\controllers;

use Yii;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\backend\controllers;

use Yii;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\backend\controllers;

use Yii;
Expand Down
5 changes: 3 additions & 2 deletions addons/RfArticle/backend/controllers/BaseController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\backend\controllers;

use Yii;
Expand All @@ -13,7 +14,7 @@
class BaseController extends AddonsController
{
/**
* @var string
*/
* @var string
*/
// public $layout = "@addons/RfArticle/backend/views/layouts/main";
}
1 change: 1 addition & 0 deletions addons/RfArticle/backend/controllers/SettingController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\backend\controllers;

use addons\RfArticle\common\models\Adv;
Expand Down
16 changes: 13 additions & 3 deletions addons/RfArticle/common/config/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,20 @@

'cover' => [
[
'title' => '首页入口',
'route' => 'index/index',
'title' => '幻灯片管理',
'route' => 'adv/index',
'icon' => ''
]
],
[
'title' => '文章分类管理',
'route' => 'article-cate/index',
'icon' => ''
],
[
'title' => '文章管理',
'route' => 'article/index',
'icon' => ''
],
],

// ----------------------- 菜单配置 ----------------------- //
Expand Down
1 change: 1 addition & 0 deletions addons/RfArticle/common/models/Adv.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\common\models;

use common\behaviors\MerchantBehavior;
Expand Down
5 changes: 3 additions & 2 deletions addons/RfArticle/common/models/Article.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\common\models;

use Yii;
Expand Down Expand Up @@ -106,7 +107,7 @@ public static function getPrev($id)
->where(['<', 'id', $id])
->andWhere(['merchant_id' => Yii::$app->services->merchant->getId()])
->select(['id', 'title'])
->orderBy('id asc')
->orderBy('id desc')
->one();
}

Expand Down Expand Up @@ -180,7 +181,7 @@ protected function getPosition()
*/
public function getCate()
{
return $this->hasOne(ArticleCate::class,['id' => 'cate_id']);
return $this->hasOne(ArticleCate::class, ['id' => 'cate_id']);
}

/**
Expand Down
1 change: 1 addition & 0 deletions addons/RfArticle/common/models/ArticleCate.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\common\models;

use Yii;
Expand Down
1 change: 1 addition & 0 deletions addons/RfArticle/common/models/ArticleSingle.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\common\models;

use common\behaviors\MerchantBehavior;
Expand Down
1 change: 1 addition & 0 deletions addons/RfArticle/common/models/ArticleTag.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\common\models;

use Yii;
Expand Down
1 change: 1 addition & 0 deletions addons/RfArticle/common/models/ArticleTagMap.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\common\models;

use Yii;
Expand Down
1 change: 1 addition & 0 deletions addons/RfArticle/frontend/assets/AppAsset.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\frontend\assets;

use yii\web\AssetBundle;
Expand Down
2 changes: 1 addition & 1 deletion addons/RfArticle/frontend/views/index/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="container">
<div class="row w_main_row">
<div class="col-lg-9 col-md-9 w_main_left">
<?= Hook::to('RfArticle', [], 'adv'); ?>
<?= Hook::to('RfArticle.adv', []); ?>
<div class="panel panel-default contenttop">
<a href="javascript:void (0)">
<strong>置顶</strong>
Expand Down
1 change: 1 addition & 0 deletions addons/RfArticle/wechat/assets/AppAsset.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\wechat\assets;

use yii\web\AssetBundle;
Expand Down
5 changes: 3 additions & 2 deletions addons/RfArticle/wechat/controllers/BaseController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\wechat\controllers;

use Yii;
Expand All @@ -16,7 +17,7 @@ class BaseController extends AddonsController
use WechatLogin;

/**
* @var string
*/
* @var string
*/
public $layout = "@addons/RfArticle/wechat/views/layouts/main";
}
13 changes: 8 additions & 5 deletions addons/RfArticle/wechat/controllers/IndexController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace addons\RfArticle\wechat\controllers;

use Yii;
Expand All @@ -22,22 +23,24 @@ class IndexController extends BaseController
*/
public function actionIndex()
{
if (Yii::$app->request->isAjax)
{
if (Yii::$app->request->isAjax) {
$data = ArticleSingle::find()
->select(['id', 'title', 'cover', 'created_at'])
->where(['status' => StatusEnum::ENABLED])
->andFilterWhere(['merchant_id' => $this->getMerchantId()]);

$pages = new Pagination(['totalCount' => $data->count(), 'pageSize' => $this->pageSize, 'validatePage' => false]);
$pages = new Pagination([
'totalCount' => $data->count(),
'pageSize' => $this->pageSize,
'validatePage' => false
]);
$models = $data->offset($pages->offset)
->orderBy('sort asc, id desc')
->limit($pages->limit)
->asArray()
->all();

foreach ($models as &$model)
{
foreach ($models as &$model) {
$model['link'] = Url::to(['detail', 'id' => $model['id']]);
$model['created_at'] = date('Y-m-d', $model['created_at']);
}
Expand Down
4 changes: 2 additions & 2 deletions addons/RfArticle/wechat/views/index/detail.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

use common\helpers\Html;

$this->title = '文章详情';
Expand All @@ -7,9 +8,8 @@
<div id="wrap" class="article-detail">
<h3 class="title"><?= $model['title']; ?></h3>
<div class="time">时间:<?= Yii::$app->formatter->asDate($model['created_at']); ?></div>

<div class="content">
<img src="<?= $model['cover']; ?>" alt="" />
<img src="<?= $model['cover']; ?>" alt=""/>
<p>
<?= Html::decode($model['content']); ?>
</p>
Expand Down
27 changes: 14 additions & 13 deletions addons/RfArticle/wechat/views/index/index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

use common\helpers\Url;
use common\helpers\AddonHelper;

Expand All @@ -15,7 +16,7 @@
<li>
<a href="{{item.link}}">
<div class="thumb">
<img src="{{item.cover}}" alt="" />
<img src="{{item.cover}}" alt=""/>
</div>
<p class="title">{{item.title}}</p>
<p class="time">{{item.created_at}}</p>
Expand All @@ -25,27 +26,27 @@
</script>

<script>
$(function(){
var loadData = function(page,mescroll){
$(function () {
var loadData = function (page, mescroll) {
$.ajax({
type:"get",
url:"<?= Url::to(['index'])?>",
type: "get",
url: "<?= Url::to(['index'])?>",
dataType: "json",
data: {
page:page.num,
page: page.num,
rows_limit: page.size
},
success: function(res){
if(res.code == 200){
success: function (res) {
if (parseInt(res.code) === 200) {
mescroll.endSuccess(res.data.length);
var html = template('listTpl', res);
$(".list").append(html);
}else{
} else {
mescroll.endSuccess();
}
}
});
}
};

var mescroll = new MeScroll("mescroll", {
up: {
Expand All @@ -58,11 +59,11 @@
callback: loadData,
page: {
num: 0,
size:4
size: 4
},
clearEmptyId: "list",
toTop:{
src : "<?= AddonHelper::file('img/mescroll-totop.png'); ?>"
toTop: {
src: "<?= AddonHelper::file('img/mescroll-totop.png'); ?>"
}
}
});
Expand Down
5 changes: 3 additions & 2 deletions addons/RfArticle/wechat/views/layouts/main.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

use wechat\assets\AppAsset;
use common\helpers\Html;
use common\helpers\AddonHelper;
Expand All @@ -12,8 +13,8 @@
<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="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() ?>
Expand Down
Loading

0 comments on commit 1ec776b

Please sign in to comment.