|
@@ -82,9 +82,11 @@ class Wechat
|
|
|
*/
|
|
|
private function save($type = 'ticket', $value, $expires = false, $interval = 2000, $data = false, $state = false)
|
|
|
{
|
|
|
+ $refresh = false;
|
|
|
if (strpos($type, '.')) {
|
|
|
$temp = explode('.', $type);
|
|
|
if ($temp[1] == 'refresh') {
|
|
|
+ $refresh = true;
|
|
|
$temp[1] = 'oauth';
|
|
|
}
|
|
|
$table = 'main/' . $temp[1];
|
|
@@ -126,7 +128,12 @@ class Wechat
|
|
|
}
|
|
|
|
|
|
if (is_array($value) || (is_string($value) && strstr($value, 'http://'))) {
|
|
|
- $result = $this->curl(false, $value);
|
|
|
+ if ($refresh) {
|
|
|
+ $result = $this->curl(false, $value, false);
|
|
|
+ } else {
|
|
|
+ $result = $this->curl(false, $value);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
$key = $type;
|
|
|
if ($result && isset($result[$key])) {
|