Skip to content

Commit

Permalink
更新版本到2.3.130 具体更新内容看版本更新日志
Browse files Browse the repository at this point in the history
  • Loading branch information
jianyan74 committed Sep 25, 2019
1 parent 2382ad9 commit 9959fc3
Show file tree
Hide file tree
Showing 29 changed files with 4,051 additions and 3,996 deletions.
10 changes: 7 additions & 3 deletions addons/RfDevTool/backend/controllers/MigrateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ public function actionIndex()
$addonList = Yii::$app->services->addons->getList();

if ($model->load(Yii::$app->request->post())) {
$path = Yii::getAlias('@addons') . '/' . $model->addon . '/console/migrations/';
FileHelper::mkdirs($path);
if ($model->addon == 0) {
$path = Yii::getAlias('@root') . '/console/migrations/';
} else {
$path = Yii::getAlias('@addons') . '/' . $model->addon . '/console/migrations/';
FileHelper::mkdirs($path);
}

/** @var MigrateCreate $migrate */
$migrate = Yii::createObject([
Expand All @@ -48,7 +52,7 @@ public function actionIndex()

return $this->render($this->action->id, [
'tableList' => ArrayHelper::map($tableList, 'name', 'name'),
'addonList' => ArrayHelper::map($addonList, 'name', 'title'),
'addonList' => ArrayHelper::merge(['0' => '默认系统'], ArrayHelper::map($addonList, 'name', 'title')),
'model' => $model
]);
}
Expand Down
14 changes: 7 additions & 7 deletions addons/RfDevTool/backend/controllers/ProvinceJobController.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ protected function other()
'title' => $datum,
'level' => 1,
'pid' => 0,
'tree' => 'tr_0',
'tree' => 'tr_0 ',
];
} elseif ($key > $Hongkong && $key < $Macao) {
// 香港
Expand All @@ -136,15 +136,15 @@ protected function other()
'title' => $datum,
'level' => 2,
'pid' => $Hongkong,
'tree' => 'tr_0 tr_' . $Hongkong,
'tree' => "tr_0 tr_$Hongkong ",
];
} elseif ($key < $i + 100 && $key > $i) {
$data[] = [
'id' => $key,
'title' => $datum,
'level' => 3,
'pid' => $i,
'tree' => 'tr_0 tr_' . $Hongkong . ' tr_' . $i,
'tree' => "tr_0 tr_$Hongkong tr_$i ",
];
}
}
Expand All @@ -158,15 +158,15 @@ protected function other()
'title' => $datum,
'level' => 2,
'pid' => $Macao,
'tree' => 'tr_0 tr_' . $Macao,
'tree' => "tr_0 tr_$Macao ",
];
} elseif ($key < $i + 100 && $key > $i) {
$data[] = [
'id' => $key,
'title' => $datum,
'level' => 3,
'pid' => $i,
'tree' => 'tr_0 tr_' . $Macao . ' tr_' . $i,
'tree' => "tr_0 tr_$Macao tr_$i ",
];
}
}
Expand All @@ -180,15 +180,15 @@ protected function other()
'title' => $datum,
'level' => 2,
'pid' => $Taiwan,
'tree' => 'tr_0 tr_' . $Taiwan,
'tree' => "tr_0 tr_$Taiwan ",
];
} elseif ($key < $i + 100 && $key > $i) {
$data[] = [
'id' => $key,
'title' => $datum,
'level' => 3,
'pid' => $i,
'tree' => 'tr_0 tr_' . $Taiwan . ' tr_' . $i,
'tree' => "tr_0 tr_$Taiwan tr_$i ",
];
}
}
Expand Down
2 changes: 1 addition & 1 deletion addons/RfDevTool/backend/views/migrate/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<?php $form = ActiveForm::begin([]); ?>
<div class="box-body">
<div class="col-sm-12">
<?= $form->field($model, 'addon')->dropDownList($addonList)->hint('生成的数据迁移文件在 插件/console/migrations/'); ?>
<?= $form->field($model, 'addon')->dropDownList($addonList)->hint('默认在 根目录/console/migrations/, 选择插件则生成的数据迁移文件在 插件/console/migrations/'); ?>
<?= $form->field($model, 'tables')->checkboxList($tableList); ?>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion addons/RfDevTool/common/models/MigrateForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function attributeLabels()
{
return [
'tables' => '表名',
'addon' => '插件',
'addon' => '系统/插件',
];
}
}
2 changes: 1 addition & 1 deletion addons/RfDevTool/common/queues/ProvinceChildJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function execute($queue)
$datum['id'] = $datum['code'][1] . $codeSuffix;
$datum['level'] = $this->parent['level'] + 1;
$datum['pid'] = $this->parent['id'];
$datum['tree'] = $this->parent['tree'] . ' tr_' . $datum['pid'];
$datum['tree'] = $this->parent['tree'] . 'tr_' . $datum['pid'] . ' ';
$datum['chlidPrefix'] = $datum['code'][0];
$datum['chlidLink'] = $this->baseUrl . $datum['chlidPrefix'] . '/' . $datum['code'][1] . '.html';

Expand Down
2 changes: 1 addition & 1 deletion addons/RfDevTool/common/queues/ProvinceJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function execute($queue)
$datum['code'] = explode('/', $code);
$datum['id'] = $datum['code'][0] . '0000';
$datum['pid'] = 0;
$datum['tree'] = 'tr_0';
$datum['tree'] = 'tr_0 ';
$datum['level'] = 1;
$datum['chlidPrefix'] = $datum['code'][0];
$datum['chlidLink'] = $this->baseUrl . $datum['link'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function init()
['http_address' => '127.0.0.1:9200'],
// ['http_address' => '192.168.0.210:9200'],
],
'autodetectCluster' => false,
'autodetectCluster' => false
]);

// 更新字段,每次修改字段都需执行该方法
Expand Down
2 changes: 1 addition & 1 deletion api/controllers/ActiveController.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function behaviors()
// 进行签名验证
$behaviors['signTokenValidate'] = [
'class' => HttpSignAuth::class,
'switch' => Yii::$app->params['user.httpSignValidity'] // 验证开启状态
'enabled' => Yii::$app->params['user.httpSignValidity'] // 验证开启状态
];

$behaviors['authenticator'] = [
Expand Down
1 change: 1 addition & 0 deletions backend/modules/sys/Module.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace backend\modules\sys;

/**
Expand Down
1 change: 1 addition & 0 deletions backend/modules/wechat/Module.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace backend\modules\wechat;

/**
Expand Down
4 changes: 2 additions & 2 deletions common/behaviors/HttpSignAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class HttpSignAuth extends Behavior
/**
* @var bool
*/
public $switch = false;
public $enabled = false;

/**
* @return array
Expand All @@ -38,7 +38,7 @@ public function events()
*/
public function beforeAction($event)
{
if (false === $this->switch) {
if (false === $this->enabled) {
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions common/components/WechatCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,6 @@ public function deleteMultiple($keys)
*/
public function has($key)
{
return (Yii::$app->cache->get($key) || $this->setTime > (time() - 1));
return (Yii::$app->cache->get($key) || $this->setTime > 0);
}
}
}
22 changes: 10 additions & 12 deletions common/components/payment/WechatPay.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,17 @@ private function create($type)
$gateway->setCertPath(Yii::getAlias($this->config['cert_client']));
$gateway->setKeyPath(Yii::getAlias($this->config['cert_key']));

/**解决omnipay和easywechat衔接之间缺少配置的问题*/
if($type == 'WechatPay_Js')
{
Yii::$app->params['wechatPaymentConfig'] = [
'app_id' => $this->config['app_id'],
'mch_id' => $this->config['mch_id'],
'key' => $this->config['api_key'],
'cert_path' => Yii::getAlias($this->config['cert_client']),
'key_path' => Yii::getAlias($this->config['cert_key']),
];
// EasyWechat 兼容
if ($type == self::JS) {
Yii::$app->params['wechatPaymentConfig'] = ArrayHelper::merge(Yii::$app->params['wechatPaymentConfig'], [
'app_id' => $this->config['app_id'],
'mch_id' => $this->config['mch_id'],
'key' => $this->config['api_key'],
'cert_path' => Yii::getAlias($this->config['cert_client']),
'key_path' => Yii::getAlias($this->config['cert_key']),
]);
}



return $gateway;
}

Expand Down
2 changes: 1 addition & 1 deletion common/config/main.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
return [
'name' => 'RageFrame',
'version' => '2.3.127',
'version' => '2.3.130',
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
Expand Down
4 changes: 2 additions & 2 deletions common/helpers/TreeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ class TreeHelper
*/
public static function prefixTreeKey($id)
{
return ' tr_' . $id;
return "tr_$id ";
}

/**
* @return string
*/
public static function defaultTreeKey()
{
return 'tr_0';
return 'tr_0 ';
}
}
Loading

0 comments on commit 9959fc3

Please sign in to comment.