Browse Source

公众号、企业号类:
修复getJsTicket 方法bug:强制设置jsapi_ticket时,却返回access_token
(感谢@Treri 发现)

binsee 10 years ago
parent
commit
b3076db0a8
2 changed files with 2 additions and 2 deletions
  1. 1 1
      qywechat.class.php
  2. 1 1
      wechat.class.php

+ 1 - 1
qywechat.class.php

@@ -937,7 +937,7 @@ class Wechat
 		if (!$appid) $appid = $this->appid;
 		if ($jsapi_ticket) { //手动指定token,优先使用
 		    $this->jsapi_ticket = $jsapi_ticket;
-		    return $this->access_token;
+		    return $this->jsapi_ticket;
 		}
 		$authname = 'qywechat_jsapi_ticket'.$appid;
 		if ($rs = $this->getCache($authname))  {

+ 1 - 1
wechat.class.php

@@ -1208,7 +1208,7 @@ class Wechat
 		if (!$appid) $appid = $this->appid;
 		if ($jsapi_ticket) { //手动指定token,优先使用
 		    $this->jsapi_ticket = $jsapi_ticket;
-		    return $this->access_token;
+		    return $this->jsapi_ticket;
 		}
 		$authname = 'wechat_jsapi_ticket'.$appid;
 		if ($rs = $this->getCache($authname))  {