dever 6 سال پیش
والد
کامیت
7ae1a24cd6
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      component/src/Auth.php
  2. 2 2
      main/lib/Wechat.php

+ 1 - 1
component/src/Auth.php

@@ -66,7 +66,7 @@ class Auth
      */
 	public function token_api()
 	{
-		return $this->wechat->token();
+		return $this->wechat->token(false, false, 2000, true);
 	}
 
 	/**

+ 2 - 2
main/lib/Wechat.php

@@ -179,9 +179,9 @@ class Wechat
 	 * 
 	 * @return mixed
 	 */
-	public function token($value = false, $expires = false, $interval = 2000)
+	public function token($value = false, $expires = false, $interval = 2000, $state = false)
 	{
-		$result = $this->save('token', $value, $expires, $interval, false, true);
+		$result = $this->save('token', $value, $expires, $interval, false, $state);
 		return $result['value'];
 	}