更新composer组件

This commit is contained in:
邹景立 2017-02-16 10:16:00 +08:00
parent ae49b216c7
commit 39c91975c7
6 changed files with 69 additions and 20 deletions

8
composer.lock generated
View File

@ -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": [],

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitbe5fdc6ce25a854de4cbf5279dee37ce::getLoader();
return ComposerAutoloaderInit13ddae34e1afde38f2bf18201da11ec0::getLoader();

View File

@ -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;

View File

@ -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);
}

View File

@ -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": {

View File

@ -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的关系
@ -49,6 +50,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;
}
/**
* 编辑设备信息
* @param array $data
@ -131,6 +155,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;
}
/**
* 配置设备与页面的关联关系
* @param string $device_id 设备编号若填了UUID、major、minor则可不填设备编号若二者都填则以设备编号为优先