Skip to content

Commit

Permalink
Merge pull request #61 from wdjwxh/2.0
Browse files Browse the repository at this point in the history
fix: js getUrl use Url::current()
  • Loading branch information
overtrue committed Jul 19, 2015
2 parents 59d706a + d5e97f8 commit 496ec57
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Wechat/Js.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
namespace Overtrue\Wechat;

use Overtrue\Wechat\Utils\JSON;
use Overtrue\Wechat\Url;

/**
* 微信 JSSDK
Expand Down Expand Up @@ -197,9 +198,7 @@ public function getUrl()
return $this->url;
}

$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] === 443) ? 'https://' : 'http://';

return $protocol.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
return Url::current();
}

/**
Expand Down

0 comments on commit 496ec57

Please sign in to comment.