This commit is contained in:
2022-09-20 13:35:12 +08:00
parent 10a3bcea47
commit 7c8ac24fec

View File

@@ -29,6 +29,24 @@ class Wechat
$this->app = Factory::officialAccount(Config::get('wechat')); $this->app = Factory::officialAccount(Config::get('wechat'));
} }
/**
* Notes : 获取jssdk配置
*
* @Date : 2022/9/20 13:32
* @Author : <Jason.C>
*/
public function jsSdk(): Json
{
$this->initWechat();
$APIs = [];
$url = $GLOBALS['data']['data']['url'];
$this->app->jssdk->setUrl($url);
$config = $this->app->jssdk->buildConfig($APIs);
return show(SUCCESS_MESSAGE, SUCCESS_CODE, $config);
}
/** /**
* Notes : 获取微信授权的地址并跳转 * Notes : 获取微信授权的地址并跳转
* *