diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a25755..5d14993 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v6.0.89 / 2020-07-18 +- 修复获取配置问题 + ## v6.0.88 / 2020-07-18 - 优化代码 - 优化Api控制器的加密相关参数 diff --git a/src/ApiController.php b/src/ApiController.php index 6d81031..44910e9 100644 --- a/src/ApiController.php +++ b/src/ApiController.php @@ -111,7 +111,7 @@ class ApiController extends stdClass */ public function setAesMd5($name = 'sniff_h5') { - $value = $this->app->config->get("dtapp.md5.{$name}"); + $value = config("dtapp.md5.{$name}"); $this->aes_md5 = $value; return $this; } @@ -122,7 +122,7 @@ class ApiController extends stdClass */ private function setAesMd5Iv() { - $value = $this->app->config->get("dtapp.md5.bcw"); + $value = config("dtapp.md5.bcw"); $this->aes_md5_iv = $value; return $this; } diff --git a/src/common.php b/src/common.php index 5f3c8f0..22f09b3 100644 --- a/src/common.php +++ b/src/common.php @@ -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')) { /** diff --git a/src/service/Ip/IpIpService.php b/src/service/Ip/IpIpService.php index 82a033a..db4f44a 100644 --- a/src/service/Ip/IpIpService.php +++ b/src/service/Ip/IpIpService.php @@ -46,7 +46,7 @@ class IpIpService extends Service */ public function __construct(App $app) { - $this->ipPath = $this->app->config->get('dtapp.ip_path', ''); + $this->ipPath = config('dtapp.ip_path', ''); if (empty($this->ipPath)) { throw new DtaException('请检查配置文件是否配置了IP数据库文件存放位置'); } diff --git a/src/service/QqWryService.php b/src/service/QqWryService.php index 8b62975..d696b85 100644 --- a/src/service/QqWryService.php +++ b/src/service/QqWryService.php @@ -74,7 +74,7 @@ class QqWryService extends Service */ public function __construct(App $app) { - $this->ipPath = $this->app->config->get('dtapp.ip_path', ''); + $this->ipPath = config('dtapp.ip_path', ''); if (empty($this->ipPath)) { throw new DtaException('请检查配置文件是否配置了IP数据库文件存放位置'); }