From 39c91975c7c9c0006be937663f6b3863b15b24b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Thu, 16 Feb 2017 10:16:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0composer=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.lock | 8 +-- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 14 +++--- vendor/composer/autoload_static.php | 8 +-- vendor/composer/installed.json | 8 +-- .../wechat-php-sdk/Wechat/WechatDevice.php | 49 +++++++++++++++++++ 6 files changed, 69 insertions(+), 20 deletions(-) diff --git a/composer.lock b/composer.lock index 7cdd8786d..f8b434f8f 100644 --- a/composer.lock +++ b/composer.lock @@ -344,12 +344,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/wechat-php-sdk.git", - "reference": "36ad89c0f7fe1e4b29591cdb5c25079e1e0bd0e0" + "reference": "12759d48867aab14e6b66be81a5b5afe223a0476" }, "dist": { "type": "zip", - "url": "https://packagist.phpcomposer.com/files/zoujingli/wechat-php-sdk/36ad89c0f7fe1e4b29591cdb5c25079e1e0bd0e0.zip", - "reference": "36ad89c0f7fe1e4b29591cdb5c25079e1e0bd0e0", + "url": "https://packagist.phpcomposer.com/files/zoujingli/wechat-php-sdk/12759d48867aab14e6b66be81a5b5afe223a0476.zip", + "reference": "12759d48867aab14e6b66be81a5b5afe223a0476", "shasum": "" }, "require": { @@ -370,7 +370,7 @@ "keywords": [ "wechat-php-sdk" ], - "time": "2017-02-07 02:34:38" + "time": "2017-02-14 08:30:06" } ], "packages-dev": [], diff --git a/vendor/autoload.php b/vendor/autoload.php index 54ecedf96..b74acd59d 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitbe5fdc6ce25a854de4cbf5279dee37ce::getLoader(); +return ComposerAutoloaderInit13ddae34e1afde38f2bf18201da11ec0::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 8d0d33814..513bd912c 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitbe5fdc6ce25a854de4cbf5279dee37ce +class ComposerAutoloaderInit13ddae34e1afde38f2bf18201da11ec0 { private static $loader; @@ -19,15 +19,15 @@ class ComposerAutoloaderInitbe5fdc6ce25a854de4cbf5279dee37ce return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitbe5fdc6ce25a854de4cbf5279dee37ce', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit13ddae34e1afde38f2bf18201da11ec0', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitbe5fdc6ce25a854de4cbf5279dee37ce', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit13ddae34e1afde38f2bf18201da11ec0', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION'); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitbe5fdc6ce25a854de4cbf5279dee37ce::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit13ddae34e1afde38f2bf18201da11ec0::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -48,19 +48,19 @@ class ComposerAutoloaderInitbe5fdc6ce25a854de4cbf5279dee37ce $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInitbe5fdc6ce25a854de4cbf5279dee37ce::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit13ddae34e1afde38f2bf18201da11ec0::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequirebe5fdc6ce25a854de4cbf5279dee37ce($fileIdentifier, $file); + composerRequire13ddae34e1afde38f2bf18201da11ec0($fileIdentifier, $file); } return $loader; } } -function composerRequirebe5fdc6ce25a854de4cbf5279dee37ce($fileIdentifier, $file) +function composerRequire13ddae34e1afde38f2bf18201da11ec0($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index bd8785175..21387a7cc 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitbe5fdc6ce25a854de4cbf5279dee37ce +class ComposerStaticInit13ddae34e1afde38f2bf18201da11ec0 { public static $files = array ( '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', @@ -273,9 +273,9 @@ class ComposerStaticInitbe5fdc6ce25a854de4cbf5279dee37ce public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitbe5fdc6ce25a854de4cbf5279dee37ce::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitbe5fdc6ce25a854de4cbf5279dee37ce::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitbe5fdc6ce25a854de4cbf5279dee37ce::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit13ddae34e1afde38f2bf18201da11ec0::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit13ddae34e1afde38f2bf18201da11ec0::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit13ddae34e1afde38f2bf18201da11ec0::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 0d0403aff..46eca1ff4 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -88,18 +88,18 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/wechat-php-sdk.git", - "reference": "36ad89c0f7fe1e4b29591cdb5c25079e1e0bd0e0" + "reference": "12759d48867aab14e6b66be81a5b5afe223a0476" }, "dist": { "type": "zip", - "url": "https://packagist.phpcomposer.com/files/zoujingli/wechat-php-sdk/36ad89c0f7fe1e4b29591cdb5c25079e1e0bd0e0.zip", - "reference": "36ad89c0f7fe1e4b29591cdb5c25079e1e0bd0e0", + "url": "https://packagist.phpcomposer.com/files/zoujingli/wechat-php-sdk/12759d48867aab14e6b66be81a5b5afe223a0476.zip", + "reference": "12759d48867aab14e6b66be81a5b5afe223a0476", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2017-02-07 02:34:38", + "time": "2017-02-14 08:30:06", "type": "project", "installation-source": "dist", "autoload": { diff --git a/vendor/zoujingli/wechat-php-sdk/Wechat/WechatDevice.php b/vendor/zoujingli/wechat-php-sdk/Wechat/WechatDevice.php index 91d8b6afd..491ceed91 100644 --- a/vendor/zoujingli/wechat-php-sdk/Wechat/WechatDevice.php +++ b/vendor/zoujingli/wechat-php-sdk/Wechat/WechatDevice.php @@ -13,6 +13,7 @@ use Wechat\Lib\Tools; class WechatDevice extends Common { const SHAKEAROUND_DEVICE_APPLYID = '/shakearound/device/applyid?'; //申请设备ID + const SHAKEAROUND_DEVICE_APPLYSTATUS = '/shakearound/device/applystatus?'; //查询设备ID申请审核状态 const SHAKEAROUND_DEVICE_UPDATE = '/shakearound/device/update?'; //编辑设备信息 const SHAKEAROUND_DEVICE_SEARCH = '/shakearound/device/search?'; //查询设备列表 const SHAKEAROUND_DEVICE_BINDLOCATION = '/shakearound/device/bindlocation?'; //配置设备与门店ID的关系 @@ -48,6 +49,29 @@ class WechatDevice extends Common { } return false; } + + /** + * 查询设备ID申请审核状态 + * @param int $apply_id + * @return bool|array + */ + public function applyStatusShakeAroundDevice($apply_id) { + if (!$this->access_token && !$this->getAccessToken()) { + return false; + } + $data = array("apply_id" => $apply_id); + $result = Tools::httpPost(self::API_BASE_URL_PREFIX . self::SHAKEAROUND_DEVICE_APPLYSTATUS . "access_token={$this->access_token}", Tools::json_encode($data)); + if ($result) { + $json = json_decode($result, true); + if (!$json || !empty($json['errcode'])) { + $this->errCode = $json['errcode']; + $this->errMsg = $json['errmsg']; + return $this->checkRetry(__FUNCTION__, func_get_args()); + } + return $json; + } + return false; + } /** * 编辑设备信息 @@ -130,6 +154,31 @@ class WechatDevice extends Common { } return false; } + + /** + * 配置设备与其他公众账号门店的关联关系 + * @param type $device_identifier 设备信息 + * @param type $poi_id 待关联的门店ID + * @param type $poi_appid 目标微信appid + * @return boolean + */ + public function bindLocationOtherShakeAroundDevice($device_identifier,$poi_id,$poi_appid) { + if (!$this->access_token && !$this->getAccessToken()) { + return false; + } + $data = array('device_identifier' => $device_identifier, 'poi_id' => $poi_id,"type"=>2,"poi_appid"=>$poi_appid); + $result = Tools::httpPost(self::API_BASE_URL_PREFIX . self::SHAKEAROUND_DEVICE_BINDLOCATION . "access_token={$this->access_token}", Tools::json_encode($data)); + if ($result) { + $json = json_decode($result, true); + if (!$json || !empty($json['errcode'])) { + $this->errCode = $json['errcode']; + $this->errMsg = $json['errmsg']; + return $this->checkRetry(__FUNCTION__, func_get_args()); + } + return $json; //这个可以更改为返回true + } + return false; + } /** * 配置设备与页面的关联关系