作者 竞泽

合并分支 'master' 到 'v1.0.3'

fix



查看合并请求 !4
@@ -55,7 +55,7 @@ class TiktokShop @@ -55,7 +55,7 @@ class TiktokShop
55 55
56 $app = $options ?: 'default'; 56 $app = $options ?: 'default';
57 57
58 - $config = \config(TiktokShopProvider::$name.'.'.$app); 58 + $config = \config(TiktokShopProvider::$name . '.' . $app);
59 59
60 if (!is_array($config)) { 60 if (!is_array($config)) {
61 throw new \InvalidArgumentException('config file not found'); 61 throw new \InvalidArgumentException('config file not found');
@@ -79,7 +79,7 @@ class TiktokShop @@ -79,7 +79,7 @@ class TiktokShop
79 Arr::get($options, 'app_key'), 79 Arr::get($options, 'app_key'),
80 Arr::get($options, 'app_secret'), 80 Arr::get($options, 'app_secret'),
81 Arr::get($options, 'base_uri'), 81 Arr::get($options, 'base_uri'),
82 - (float) Arr::get($options, 'timeout'), 82 + (float)Arr::get($options, 'timeout'),
83 Arr::get($options, 'enable_mock') 83 Arr::get($options, 'enable_mock')
84 ); 84 );
85 } 85 }
@@ -119,7 +119,9 @@ class TiktokShop @@ -119,7 +119,9 @@ class TiktokShop
119 try { 119 try {
120 return PassageProxy::proxy($passage, $this->config); 120 return PassageProxy::proxy($passage, $this->config);
121 } finally { 121 } finally {
  122 + register_shutdown_function(function () {
122 $this->config->setAccessToken(''); 123 $this->config->setAccessToken('');
  124 + });
123 } 125 }
124 } 126 }
125 } 127 }