ConfigService::get('mnp_setting', 'app_id'), 'secret' => ConfigService::get('mnp_setting', 'app_secret'), 'response_type' => 'array', 'log' => [ 'level' => 'debug', 'file' => runtime_path(). '/wechat/' . date('Ym') . '/' . date('d') . '.log' ], ]; } /** * @notes 获取微信公众号配置 * @return array * @author 段誉 * @date 2022/9/6 19:49 */ public static function getOaConfig() { return [ 'app_id' => ConfigService::get('oa_setting', 'app_id'), 'secret' => ConfigService::get('oa_setting', 'app_secret'), 'token' => ConfigService::get('oa_setting', 'token'), 'response_type' => 'array', 'log' => [ 'level' => 'debug', 'file' => runtime_path(). '/wechat/' . date('Ym') . '/' . date('d') . '.log' ], ]; } /** * @notes 获取微信开放平台配置 * @return array * @author 段誉 * @date 2022/10/20 15:51 */ public static function getOpConfig() { return [ 'app_id' => ConfigService::get('open_platform', 'app_id'), 'secret' => ConfigService::get('open_platform', 'app_secret'), 'response_type' => 'array', 'log' => [ 'level' => 'debug', 'file' => runtime_path(). '/wechat/' . date('Ym') . '/' . date('d') . '.log' ], ]; } /** * @notes 临时写入证书 * @param $path * @param $cert * @author 段誉 * @date 2023/2/27 15:48 */ public static function setCert($path, $cert) { $fopenPath = fopen($path, 'w'); fwrite($fopenPath, $cert); fclose($fopenPath); } }