|
|
@@ -17,6 +17,7 @@ use Lcobucci\JWT\Signer\Hmac\Sha256;
|
|
|
use Lcobucci\JWT\Parser;
|
|
|
use Lcobucci\JWT\ValidationData;
|
|
|
use linslin\yii2\curl;
|
|
|
+use yii\helpers\Json;
|
|
|
|
|
|
/**
|
|
|
* 微信 oauth 授权相关
|
|
|
@@ -144,7 +145,7 @@ class AuthController extends PublicController
|
|
|
$appId = $merchant['miniAppId'];
|
|
|
$appSecret = $merchant['miniAppSecret'];
|
|
|
$url = "https://api.weixin.qq.com/sns/jscode2session?appid={$appId}&secret={$appSecret}&js_code={$code}&grant_type=authorization_code";
|
|
|
-
|
|
|
+
|
|
|
$curl = new curl\Curl();
|
|
|
$result = $curl->get($url);
|
|
|
$arr = Json::decode($result);
|