- 修复获取配置问题

v6 v6.0.89
Chaim 4 years ago
parent ac60be73d6
commit 52a3dbc7f7

@ -1,3 +1,6 @@
## v6.0.89 / 2020-07-18
- 修复获取配置问题
## v6.0.88 / 2020-07-18 ## v6.0.88 / 2020-07-18
- 优化代码 - 优化代码
- 优化Api控制器的加密相关参数 - 优化Api控制器的加密相关参数

@ -111,7 +111,7 @@ class ApiController extends stdClass
*/ */
public function setAesMd5($name = 'sniff_h5') public function setAesMd5($name = 'sniff_h5')
{ {
$value = $this->app->config->get("dtapp.md5.{$name}"); $value = config("dtapp.md5.{$name}");
$this->aes_md5 = $value; $this->aes_md5 = $value;
return $this; return $this;
} }
@ -122,7 +122,7 @@ class ApiController extends stdClass
*/ */
private function setAesMd5Iv() private function setAesMd5Iv()
{ {
$value = $this->app->config->get("dtapp.md5.bcw"); $value = config("dtapp.md5.bcw");
$this->aes_md5_iv = $value; $this->aes_md5_iv = $value;
return $this; return $this;
} }

@ -28,7 +28,7 @@ use think\db\exception\ModelNotFoundException;
/** /**
* 定义当前版本 * 定义当前版本
*/ */
const VERSION = '6.0.88'; const VERSION = '6.0.89';
if (!function_exists('get_ip_info')) { if (!function_exists('get_ip_info')) {
/** /**

@ -46,7 +46,7 @@ class IpIpService extends Service
*/ */
public function __construct(App $app) public function __construct(App $app)
{ {
$this->ipPath = $this->app->config->get('dtapp.ip_path', ''); $this->ipPath = config('dtapp.ip_path', '');
if (empty($this->ipPath)) { if (empty($this->ipPath)) {
throw new DtaException('请检查配置文件是否配置了IP数据库文件存放位置'); throw new DtaException('请检查配置文件是否配置了IP数据库文件存放位置');
} }

@ -74,7 +74,7 @@ class QqWryService extends Service
*/ */
public function __construct(App $app) public function __construct(App $app)
{ {
$this->ipPath = $this->app->config->get('dtapp.ip_path', ''); $this->ipPath = config('dtapp.ip_path', '');
if (empty($this->ipPath)) { if (empty($this->ipPath)) {
throw new DtaException('请检查配置文件是否配置了IP数据库文件存放位置'); throw new DtaException('请检查配置文件是否配置了IP数据库文件存放位置');
} }

Loading…
Cancel
Save