This commit is contained in:
xl
2023-11-14 09:28:25 +08:00
parent 4f2b9367ae
commit dfc59ab88d
2 changed files with 27 additions and 6 deletions
+15 -1
View File
@@ -3,6 +3,9 @@
namespace wchat\common;
use JetBrains\PhpStorm\ArrayShape;
use wchat\common\libs\Aliyun;
use wchat\common\libs\Qq;
use wchat\common\libs\Wx;
class AppConfig
{
@@ -55,6 +58,15 @@ class AppConfig
public array $notice = ['token' => '', 'secret' => '', 'unionId' => ''];
public function __construct()
{
$this->pay = new PayConfig();
$this->pay->wx = new Wx();
$this->pay->qq = new Qq();
$this->pay->ali = new Aliyun();
}
/**
* @param object $app
* @return static
@@ -65,7 +77,9 @@ class AppConfig
$model->appId = $app->appId;
$model->appSecret = $app->appSecret;
$model->type = $app->type;
$model->pay = PayConfig::parse($app->pay);
PayConfig::parse($app->pay, $model->pay);
return $model;
}