作者 何书鹏
1 个管道 的构建 通过 耗费 2 秒

1

... ... @@ -12,7 +12,7 @@ use EasyWeChat\Factory;
*/
class Index extends Api
{
protected $noNeedLogin = ['index','info','jssdk'];
protected $noNeedLogin = ['index','info','jssdk','jssdk1'];
protected $noNeedRight = ['*'];
/**
... ... @@ -96,12 +96,19 @@ class Index extends Api
public function jssdk()
{
$params = $this->request->post();
$apis = [
'checkJsApi',
'getLocation', //获取位置
'openLocation', //打开位置
];
$res = Factory::officialAccount(config('wechat'))->jssdk->setUrl('http://parking.h.brofirst.cn')->buildConfig($apis, $debug = true, $beta = false, $json = false);
$uri = urldecode($params['uri']);
$res = Factory::officialAccount(config('wechat'))->jssdk->setUrl($uri)->buildConfig($apis, $debug = true, $beta = false, $json = false);
$this->success('sdk', $res);
}
public function jssdk1()
{
halt(Factory::officialAccount(config('wechat'))->jssdk->getTicket());
}
}
... ...