From 155b1374b53f3bfb238a813e4a99ed557a33bb69 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Tue, 7 Jan 2020 12:11:00 +0800 Subject: [PATCH] add clear --- common/Miniprogarampage.php | 4 ++++ qq/Account.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common/Miniprogarampage.php b/common/Miniprogarampage.php index 600955a..76f89c6 100644 --- a/common/Miniprogarampage.php +++ b/common/Miniprogarampage.php @@ -105,6 +105,10 @@ abstract class Miniprogarampage implements Progaram public function initConfig($config) { $this->config = $config; + $this->request->setUseSwoole($config->isUsrSwoole()); + $this->request->setAgent($config->getAgent()); + $this->request->addHeader('ssl_cert_file', $config->getSslCert()); + $this->request->addHeader('ssl_key_file', $config->getSslKey()); return $this; } diff --git a/qq/Account.php b/qq/Account.php index 09a2cad..9eedb3d 100644 --- a/qq/Account.php +++ b/qq/Account.php @@ -32,7 +32,7 @@ class Account extends SmallProgram $this->request->setHost('api.q.qq.com'); $this->request->setMethod(HttpClient::GET); $this->request->addHeader('Content-Type', 'text/xml'); -// $this->request->setUseSwoole($this->config->isUsrSwoole()); + $this->request->setUseSwoole($this->config->isUsrSwoole()); return $this->request->get('sns/jscode2session', $param); }