mirror of
https://gitee.com/zoujingli/WeChatDeveloper.git
synced 2025-04-05 09:52:47 +08:00
[更新]修改小程序二维码生成参数
This commit is contained in:
parent
103488a1cd
commit
f68a378fc9
@ -32,16 +32,17 @@ class Qrcode extends BasicWeChat
|
||||
* @param integer $width 二维码的宽度
|
||||
* @param bool $auto_color 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调
|
||||
* @param array $line_color auto_color 为 false 时生效
|
||||
* @param boolean $is_hyaline 是否需要透明底色
|
||||
* @param null|string $outType 输出类型
|
||||
* @return array|string
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function createMiniPath($path, $width = 430, $auto_color = false, $line_color = ["r" => "0", "g" => "0", "b" => "0"], $outType = null)
|
||||
public function createMiniPath($path, $width = 430, $auto_color = false, $line_color = ["r" => "0", "g" => "0", "b" => "0"], $is_hyaline = true, $outType = null)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/wxa/getwxacode?access_token=ACCESS_TOKEN';
|
||||
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||
$data = ['path' => $path, 'width' => $width, 'auto_color' => $auto_color, 'line_color' => $line_color];
|
||||
$data = ['path' => $path, 'width' => $width, 'auto_color' => $auto_color, 'line_color' => $line_color, 'is_hyaline' => $is_hyaline];
|
||||
$result = Tools::post($url, Tools::arr2json($data));
|
||||
if (json_decode($result)) {
|
||||
return Tools::json2arr($result);
|
||||
@ -57,15 +58,16 @@ class Qrcode extends BasicWeChat
|
||||
* @param integer $width 二维码的宽度
|
||||
* @param bool $auto_color 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调
|
||||
* @param array $line_color auto_color 为 false 时生效
|
||||
* @param boolean $is_hyaline 是否需要透明底色
|
||||
* @param null|string $outType 输出类型
|
||||
* @return array|string
|
||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||
* @throws \WeChat\Exceptions\LocalCacheException
|
||||
*/
|
||||
public function createMiniScene($scene, $page, $width = 430, $auto_color = false, $line_color = ["r" => "0", "g" => "0", "b" => "0"], $outType = null)
|
||||
public function createMiniScene($scene, $page, $width = 430, $auto_color = false, $line_color = ["r" => "0", "g" => "0", "b" => "0"], $is_hyaline = true, $outType = null)
|
||||
{
|
||||
$url = 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=ACCESS_TOKEN';
|
||||
$data = ['scene' => $scene, 'width' => $width, 'auto_color' => $auto_color, 'page' => $page, 'line_color' => $line_color];
|
||||
$data = ['scene' => $scene, 'width' => $width, 'auto_color' => $auto_color, 'page' => $page, 'line_color' => $line_color, 'is_hyaline' => $is_hyaline];
|
||||
$this->registerApi($url, __FUNCTION__, func_get_args());
|
||||
$result = Tools::post($url, Tools::arr2json($data));
|
||||
if (json_decode($result)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user