[更新]增加又模式网页授权兼容

This commit is contained in:
Anyon 2018-03-19 15:43:42 +08:00
parent c07f237eca
commit a63b2993ca

View File

@ -41,11 +41,11 @@ class Wechat extends Controller
* @return mixed * @return mixed
* @throws \WeChat\Exceptions\InvalidResponseException * @throws \WeChat\Exceptions\InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException * @throws \WeChat\Exceptions\LocalCacheException
* @throws \think\Exception
* @throws \think\exception\PDOException
*/ */
public function jssdk() public function jssdk()
{ {
$wechat = WechatService::script(); return $this->fetch('wechat@api/tools/jssdk', ['options' => WechatService::webJsSDK()]);
$options = $wechat->getJsSign($this->request->url(true));
return $this->fetch('wechat@api/tools/jssdk', ['options' => $options]);
} }
} }