|
@@ -172,9 +172,9 @@ class Open extends AuthController
|
|
|
public function getComponentAccessToken()
|
|
public function getComponentAccessToken()
|
|
|
{
|
|
{
|
|
|
try {
|
|
try {
|
|
|
- if (CacheService::redisHandler()->get('component_access_token')) {
|
|
|
|
|
- return CacheService::redisHandler()->get('component_access_token');
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (CacheService::redisHandler()->get('component_access_token')) {
|
|
|
|
|
+// return CacheService::redisHandler()->get('component_access_token');
|
|
|
|
|
+// }
|
|
|
$url = 'https://api.weixin.qq.com/cgi-bin/component/api_component_token';
|
|
$url = 'https://api.weixin.qq.com/cgi-bin/component/api_component_token';
|
|
|
$data = [
|
|
$data = [
|
|
|
'component_appid' => $this->appId,
|
|
'component_appid' => $this->appId,
|
|
@@ -205,9 +205,9 @@ class Open extends AuthController
|
|
|
protected function getPreAuthCode()
|
|
protected function getPreAuthCode()
|
|
|
{
|
|
{
|
|
|
try {
|
|
try {
|
|
|
- if (CacheService::redisHandler()->get('pre_auth_code')) {
|
|
|
|
|
- return CacheService::redisHandler()->get('pre_auth_code');
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (CacheService::redisHandler()->get('pre_auth_code')) {
|
|
|
|
|
+// return CacheService::redisHandler()->get('pre_auth_code');
|
|
|
|
|
+// }
|
|
|
$component_access_token = $this->getComponentAccessToken();
|
|
$component_access_token = $this->getComponentAccessToken();
|
|
|
$url = 'https://api.weixin.qq.com/cgi-bin/component/api_create_preauthcode?component_access_token=' . $component_access_token;
|
|
$url = 'https://api.weixin.qq.com/cgi-bin/component/api_create_preauthcode?component_access_token=' . $component_access_token;
|
|
|
$data = [
|
|
$data = [
|