mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]调整微信配置参数读取来源为数据库
This commit is contained in:
parent
6e60a13a15
commit
cab819ee41
@ -39,7 +39,17 @@ function & load_wechat($type = '') {
|
|||||||
static $wechat = array();
|
static $wechat = array();
|
||||||
$index = md5(strtolower($type));
|
$index = md5(strtolower($type));
|
||||||
if (!isset($wechat[$index])) {
|
if (!isset($wechat[$index])) {
|
||||||
$config = Config::get('wechat');
|
$config = [
|
||||||
|
'token' => sysconf('wechat_token'),
|
||||||
|
'appid' => sysconf('wechat_appid'),
|
||||||
|
'appsecret' => sysconf('wechat_appsecret'),
|
||||||
|
'encodingaeskey' => sysconf('wechat_encodingaeskey'),
|
||||||
|
'mch_id' => sysconf('wechat_mch_id'),
|
||||||
|
'partnerkey' => sysconf('wechat_partnerkey'),
|
||||||
|
'ssl_cer' => sysconf('wechat_cert_cert'),
|
||||||
|
'ssl_key' => sysconf('wechat_cert_key'),
|
||||||
|
'cachepath' => CACHE_PATH . 'wxpay' . DS,
|
||||||
|
];
|
||||||
$config['cachepath'] = CACHE_PATH . 'wechat' . DS;
|
$config['cachepath'] = CACHE_PATH . 'wechat' . DS;
|
||||||
$wechat[$index] = &Loader::get($type, $config);
|
$wechat[$index] = &Loader::get($type, $config);
|
||||||
}
|
}
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | Think.Admin
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 官方网站: http://think.ctolog.com
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | 开源协议 ( http://www.apache.org/licenses/LICENSE-2.0 )
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
// | github开源项目:https://github.com/zoujingli/Think.Admin
|
|
||||||
// +----------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 公众号配置参数
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
return [
|
|
||||||
'token' => sysconf('wechat_token'),
|
|
||||||
'appid' => sysconf('wechat_appid'),
|
|
||||||
'appsecret' => sysconf('wechat_appsecret'),
|
|
||||||
'encodingaeskey' => sysconf('wechat_encodingaeskey'),
|
|
||||||
'mch_id' => sysconf('wechat_mch_id'),
|
|
||||||
'partnerkey' => sysconf('wechat_partnerkey'),
|
|
||||||
'ssl_cer' => sysconf('wechat_cert_cert'),
|
|
||||||
'ssl_key' => sysconf('wechat_cert_key'),
|
|
||||||
'cachepath' => CACHE_PATH . 'wxpay' . DS,
|
|
||||||
];
|
|
Loading…
x
Reference in New Issue
Block a user