Skip to content

Commit 9959fc3

Browse files
author
jianyan74
committed
更新版本到2.3.130 具体更新内容看版本更新日志
1 parent 2382ad9 commit 9959fc3

29 files changed

+4051
-3996
lines changed

addons/RfDevTool/backend/controllers/MigrateController.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ public function actionIndex()
3030
$addonList = Yii::$app->services->addons->getList();
3131

3232
if ($model->load(Yii::$app->request->post())) {
33-
$path = Yii::getAlias('@addons') . '/' . $model->addon . '/console/migrations/';
34-
FileHelper::mkdirs($path);
33+
if ($model->addon == 0) {
34+
$path = Yii::getAlias('@root') . '/console/migrations/';
35+
} else {
36+
$path = Yii::getAlias('@addons') . '/' . $model->addon . '/console/migrations/';
37+
FileHelper::mkdirs($path);
38+
}
3539

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

4953
return $this->render($this->action->id, [
5054
'tableList' => ArrayHelper::map($tableList, 'name', 'name'),
51-
'addonList' => ArrayHelper::map($addonList, 'name', 'title'),
55+
'addonList' => ArrayHelper::merge(['0' => '默认系统'], ArrayHelper::map($addonList, 'name', 'title')),
5256
'model' => $model
5357
]);
5458
}

addons/RfDevTool/backend/controllers/ProvinceJobController.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ protected function other()
125125
'title' => $datum,
126126
'level' => 1,
127127
'pid' => 0,
128-
'tree' => 'tr_0',
128+
'tree' => 'tr_0 ',
129129
];
130130
} elseif ($key > $Hongkong && $key < $Macao) {
131131
// 香港
@@ -136,15 +136,15 @@ protected function other()
136136
'title' => $datum,
137137
'level' => 2,
138138
'pid' => $Hongkong,
139-
'tree' => 'tr_0 tr_' . $Hongkong,
139+
'tree' => "tr_0 tr_$Hongkong ",
140140
];
141141
} elseif ($key < $i + 100 && $key > $i) {
142142
$data[] = [
143143
'id' => $key,
144144
'title' => $datum,
145145
'level' => 3,
146146
'pid' => $i,
147-
'tree' => 'tr_0 tr_' . $Hongkong . ' tr_' . $i,
147+
'tree' => "tr_0 tr_$Hongkong tr_$i ",
148148
];
149149
}
150150
}
@@ -158,15 +158,15 @@ protected function other()
158158
'title' => $datum,
159159
'level' => 2,
160160
'pid' => $Macao,
161-
'tree' => 'tr_0 tr_' . $Macao,
161+
'tree' => "tr_0 tr_$Macao ",
162162
];
163163
} elseif ($key < $i + 100 && $key > $i) {
164164
$data[] = [
165165
'id' => $key,
166166
'title' => $datum,
167167
'level' => 3,
168168
'pid' => $i,
169-
'tree' => 'tr_0 tr_' . $Macao . ' tr_' . $i,
169+
'tree' => "tr_0 tr_$Macao tr_$i ",
170170
];
171171
}
172172
}
@@ -180,15 +180,15 @@ protected function other()
180180
'title' => $datum,
181181
'level' => 2,
182182
'pid' => $Taiwan,
183-
'tree' => 'tr_0 tr_' . $Taiwan,
183+
'tree' => "tr_0 tr_$Taiwan ",
184184
];
185185
} elseif ($key < $i + 100 && $key > $i) {
186186
$data[] = [
187187
'id' => $key,
188188
'title' => $datum,
189189
'level' => 3,
190190
'pid' => $i,
191-
'tree' => 'tr_0 tr_' . $Taiwan . ' tr_' . $i,
191+
'tree' => "tr_0 tr_$Taiwan tr_$i ",
192192
];
193193
}
194194
}

addons/RfDevTool/backend/views/migrate/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<?php $form = ActiveForm::begin([]); ?>
2424
<div class="box-body">
2525
<div class="col-sm-12">
26-
<?= $form->field($model, 'addon')->dropDownList($addonList)->hint('生成的数据迁移文件在 插件/console/migrations/'); ?>
26+
<?= $form->field($model, 'addon')->dropDownList($addonList)->hint('默认在 根目录/console/migrations/, 选择插件则生成的数据迁移文件在 插件/console/migrations/'); ?>
2727
<?= $form->field($model, 'tables')->checkboxList($tableList); ?>
2828
</div>
2929
</div>

addons/RfDevTool/common/models/MigrateForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function attributeLabels()
3232
{
3333
return [
3434
'tables' => '表名',
35-
'addon' => '插件',
35+
'addon' => '系统/插件',
3636
];
3737
}
3838
}

addons/RfDevTool/common/queues/ProvinceChildJob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function execute($queue)
129129
$datum['id'] = $datum['code'][1] . $codeSuffix;
130130
$datum['level'] = $this->parent['level'] + 1;
131131
$datum['pid'] = $this->parent['id'];
132-
$datum['tree'] = $this->parent['tree'] . ' tr_' . $datum['pid'];
132+
$datum['tree'] = $this->parent['tree'] . 'tr_' . $datum['pid'] . ' ';
133133
$datum['chlidPrefix'] = $datum['code'][0];
134134
$datum['chlidLink'] = $this->baseUrl . $datum['chlidPrefix'] . '/' . $datum['code'][1] . '.html';
135135

addons/RfDevTool/common/queues/ProvinceJob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function execute($queue)
6060
$datum['code'] = explode('/', $code);
6161
$datum['id'] = $datum['code'][0] . '0000';
6262
$datum['pid'] = 0;
63-
$datum['tree'] = 'tr_0';
63+
$datum['tree'] = 'tr_0 ';
6464
$datum['level'] = 1;
6565
$datum['chlidPrefix'] = $datum['code'][0];
6666
$datum['chlidLink'] = $this->baseUrl . $datum['link'];

addons/RfExample/backend/controllers/ElasticSearchController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function init()
3838
['http_address' => '127.0.0.1:9200'],
3939
// ['http_address' => '192.168.0.210:9200'],
4040
],
41-
'autodetectCluster' => false,
41+
'autodetectCluster' => false
4242
]);
4343

4444
// 更新字段,每次修改字段都需执行该方法

api/controllers/ActiveController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function behaviors()
6363
// 进行签名验证
6464
$behaviors['signTokenValidate'] = [
6565
'class' => HttpSignAuth::class,
66-
'switch' => Yii::$app->params['user.httpSignValidity'] // 验证开启状态
66+
'enabled' => Yii::$app->params['user.httpSignValidity'] // 验证开启状态
6767
];
6868

6969
$behaviors['authenticator'] = [

backend/modules/sys/Module.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace backend\modules\sys;
34

45
/**

backend/modules/wechat/Module.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace backend\modules\wechat;
34

45
/**

common/behaviors/HttpSignAuth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class HttpSignAuth extends Behavior
2121
/**
2222
* @var bool
2323
*/
24-
public $switch = false;
24+
public $enabled = false;
2525

2626
/**
2727
* @return array
@@ -38,7 +38,7 @@ public function events()
3838
*/
3939
public function beforeAction($event)
4040
{
41-
if (false === $this->switch) {
41+
if (false === $this->enabled) {
4242
return true;
4343
}
4444

common/components/WechatCache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,6 @@ public function deleteMultiple($keys)
100100
*/
101101
public function has($key)
102102
{
103-
return (Yii::$app->cache->get($key) || $this->setTime > (time() - 1));
103+
return (Yii::$app->cache->get($key) || $this->setTime > 0);
104104
}
105-
}
105+
}

common/components/payment/WechatPay.php

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,17 @@ private function create($type)
6565
$gateway->setCertPath(Yii::getAlias($this->config['cert_client']));
6666
$gateway->setKeyPath(Yii::getAlias($this->config['cert_key']));
6767

68-
/**解决omnipay和easywechat衔接之间缺少配置的问题*/
69-
if($type == 'WechatPay_Js')
70-
{
71-
Yii::$app->params['wechatPaymentConfig'] = [
72-
'app_id' => $this->config['app_id'],
73-
'mch_id' => $this->config['mch_id'],
74-
'key' => $this->config['api_key'],
75-
'cert_path' => Yii::getAlias($this->config['cert_client']),
76-
'key_path' => Yii::getAlias($this->config['cert_key']),
77-
];
68+
// EasyWechat 兼容
69+
if ($type == self::JS) {
70+
Yii::$app->params['wechatPaymentConfig'] = ArrayHelper::merge(Yii::$app->params['wechatPaymentConfig'], [
71+
'app_id' => $this->config['app_id'],
72+
'mch_id' => $this->config['mch_id'],
73+
'key' => $this->config['api_key'],
74+
'cert_path' => Yii::getAlias($this->config['cert_client']),
75+
'key_path' => Yii::getAlias($this->config['cert_key']),
76+
]);
7877
}
79-
80-
78+
8179
return $gateway;
8280
}
8381

common/config/main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
return [
33
'name' => 'RageFrame',
4-
'version' => '2.3.127',
4+
'version' => '2.3.130',
55
'aliases' => [
66
'@bower' => '@vendor/bower-asset',
77
'@npm' => '@vendor/npm-asset',

common/helpers/TreeHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ class TreeHelper
1414
*/
1515
public static function prefixTreeKey($id)
1616
{
17-
return ' tr_' . $id;
17+
return "tr_$id ";
1818
}
1919

2020
/**
2121
* @return string
2222
*/
2323
public static function defaultTreeKey()
2424
{
25-
return 'tr_0';
25+
return 'tr_0 ';
2626
}
2727
}

0 commit comments

Comments
 (0)