mirror of
https://gitee.com/zoujingli/WeChatDeveloper.git
synced 2025-04-23 18:00:23 +08:00
修改小程序支持
This commit is contained in:
parent
59dc89244e
commit
7eb7f6a2d8
2
We.php
2
We.php
@ -86,7 +86,7 @@ class We
|
|||||||
* 定义当前版本
|
* 定义当前版本
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const VERSION = '1.2.21';
|
const VERSION = '1.2.22';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 静态配置
|
* 静态配置
|
||||||
|
129
WeMini/Live.php
129
WeMini/Live.php
@ -23,6 +23,19 @@ use WeChat\Contracts\BasicWeChat;
|
|||||||
*/
|
*/
|
||||||
class Live extends BasicWeChat
|
class Live extends BasicWeChat
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* 创建直播间
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function create($data)
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/wxaapi/broadcast/room/create?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取直播房间列表
|
* 获取直播房间列表
|
||||||
@ -34,7 +47,7 @@ class Live extends BasicWeChat
|
|||||||
*/
|
*/
|
||||||
public function getLiveList($start = 0, $limit = 10)
|
public function getLiveList($start = 0, $limit = 10)
|
||||||
{
|
{
|
||||||
$url = 'http://api.weixin.qq.com/wxa/business/getliveinfo?access_token=ACCESS_TOKEN';
|
$url = 'https://api.weixin.qq.com/wxa/business/getliveinfo?access_token=ACCESS_TOKEN';
|
||||||
$this->registerApi($url, __FUNCTION__, func_get_args());
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
return $this->callPostApi($url, ['start' => $start, 'limit' => $limit], true);
|
return $this->callPostApi($url, ['start' => $start, 'limit' => $limit], true);
|
||||||
}
|
}
|
||||||
@ -48,7 +61,119 @@ class Live extends BasicWeChat
|
|||||||
*/
|
*/
|
||||||
public function getLiveInfo($data = [])
|
public function getLiveInfo($data = [])
|
||||||
{
|
{
|
||||||
$url = 'http://api.weixin.qq.com/wxa/business/getliveinfo?access_token=ACCESS_TOKEN';
|
$url = 'https://api.weixin.qq.com/wxa/business/getliveinfo?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直播间导入商品
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function addLiveGoods($data = [])
|
||||||
|
{
|
||||||
|
$url = 'https://api.weixin.qq.com/wxaapi/broadcast/room/addgoods?access_token=ACCESS_TOKEN';
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品添加并提审
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function addGoods($data)
|
||||||
|
{
|
||||||
|
$url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/add?access_token=ACCESS_TOKEN";
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品撤回审核
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function resetAuditGoods($data)
|
||||||
|
{
|
||||||
|
$url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/resetaudit?access_token=ACCESS_TOKEN";
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新提交审核
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function auditGoods($data)
|
||||||
|
{
|
||||||
|
$url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/audit?access_token=ACCESS_TOKEN";
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function deleteGoods($data)
|
||||||
|
{
|
||||||
|
$url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/delete?access_token=ACCESS_TOKEN";
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新商品
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function updateGoods($data)
|
||||||
|
{
|
||||||
|
$url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/update?access_token=ACCESS_TOKEN";
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取商品状态
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function stateGoods($data)
|
||||||
|
{
|
||||||
|
$url = "https://api.weixin.qq.com/wxa/business/getgoodswarehouse?access_token=ACCESS_TOKEN";
|
||||||
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
|
return $this->callPostApi($url, $data, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取商品列表
|
||||||
|
* @param array $data
|
||||||
|
* @return array
|
||||||
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
|
* @throws \WeChat\Exceptions\LocalCacheException
|
||||||
|
*/
|
||||||
|
public function getGoods($data)
|
||||||
|
{
|
||||||
|
$url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/getapproved?access_token=ACCESS_TOKEN";
|
||||||
$this->registerApi($url, __FUNCTION__, func_get_args());
|
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||||
return $this->callPostApi($url, $data, true);
|
return $this->callPostApi($url, $data, true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user