w7corp / easywechat

📦 一个 PHP 微信 SDK

Home Page:https://easywechat.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

在企业微信网页授权设置state遇到的问题

ideaviewes opened this issue · comments

我用的环境

  • PHP 版本:7.4
  • overtrue/wechat 版本:4.7.0
  • 是否使用了框架?框架名称:thinkphp5.1

问题及现象

$callback="https://xxxx.com/wx/change/group";
$config = config("wechat.work.{$account}");
$app = Factory::work($config);
$url = $app->oauth->with(['state' => 123])->redirect($callback)->getTargetUrl();

我设置了state是123,但是打印生成的url,url中state是0,这个问题要如何解决呢?