mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update WechatService.php
This commit is contained in:
parent
c2ad6826a7
commit
487ad85b38
@ -130,17 +130,18 @@ class WechatService extends \We
|
||||
} else {
|
||||
throw new \think\Exception("Class {$class} not found");
|
||||
}
|
||||
}
|
||||
set_time_limit(3600);
|
||||
list($appid, $appkey) = [sysconf('wechat_thr_appid'), sysconf('wechat_thr_appkey')];
|
||||
$token = strtolower("{$name}-{$appid}-{$appkey}-{$type}");
|
||||
if (class_exists('Yar_Client')) {
|
||||
return new \Yar_Client(config('wechat.service_url') . "/service/api.client/yar/{$token}");
|
||||
} elseif (class_exists('SoapClient')) {
|
||||
$location = config('wechat.service_url') . "/service/api.client/soap/{$token}";
|
||||
return new \SoapClient(null, ['uri' => strtolower($name), 'location' => $location]);
|
||||
} else {
|
||||
throw new \think\Exception("Yar or Soap extensions are not installed.");
|
||||
set_time_limit(3600);
|
||||
list($appid, $appkey) = [sysconf('wechat_thr_appid'), sysconf('wechat_thr_appkey')];
|
||||
$token = strtolower("{$name}-{$appid}-{$appkey}-{$type}");
|
||||
if (class_exists('Yar_Client')) {
|
||||
return new \Yar_Client(config('wechat.service_url') . "/service/api.client/yar/{$token}");
|
||||
} elseif (class_exists('SoapClient')) {
|
||||
$location = config('wechat.service_url') . "/service/api.client/soap/{$token}";
|
||||
return new \SoapClient(null, ['uri' => strtolower($name), 'location' => $location]);
|
||||
} else {
|
||||
throw new \think\Exception("Yar or Soap extensions are not installed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user