You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
namespace tencent\wechat\mpweixin;
class Base
{
// EasyWeChat配置--微信小程序配置文件
protected $mpWeixinConfig;
/**
* 构造函数
* @date 2022-02-09
*/
public function __construct(array $data = [])
{
$this->mpWeixinConfig = [
'app_id' => $data['app_id'],
'secret' => $data['app_secret'],
// 指定 API 调用返回结果的类型array(default)/collection/object/raw/自定义类名
'response_type' => 'array',
//日志 配置
'log' => [
'default' => 'dev', // 默认使用的 channel生产环境可以改为下面的 prod
'channels' => [
// 测试环境
'dev' => [
'driver' => 'daily',
'path' => root_path() . 'runtime/easywechat/easywechat.log'
]
],
]
];
}
/**
* 获取EasyWeChat配置--微信公众号配置文件
* @date 2022-02-09
*/
public function getMpWeixinConfig(){
return $this->mpWeixinConfig;
}
}