mirror of
https://github.com/w7corp/easywechat.git
synced 2025-01-22 11:32:08 +00:00
自动检查类型
parent
b189ce040c
commit
7103143c3d
4
二维码.md
4
二维码.md
@ -22,7 +22,7 @@ $qrcode = new QRCode($appId, $secret);
|
||||
## API
|
||||
|
||||
+ `Bag temporary($sceneId, $expireSeconds = null)` 创建临时二维码;
|
||||
+ `Bag forever($sceneValue, $type = self::SCENE_QR_FOREVER)` 创建永久二维码,`$type`: `QR_LIMIT_SCENE` 为永久, `QR_LIMIT_STR_SCENE` 为永久的字符串参数值;
|
||||
+ `Bag forever($sceneValue)` 创建永久二维码
|
||||
+ `Bag card(array $card)` 创建卡券二维码
|
||||
+ `string show($ticket)` 获取二维码网址,用法: `<img src="<?php $qrcode->show($qrTicket); ?>">`;
|
||||
+ `void download($ticket, $filename)` 下载二维码到本地,`$filename` 为带文件名的目标路径;
|
||||
@ -42,7 +42,7 @@ $url = $result->url; // 二维码图片解析后的地址,开发者可根据
|
||||
创建永久二维码:
|
||||
|
||||
```php
|
||||
$result = $qrcode->forever(56);// 或者 $qrcode->forever("56", self::SCENE_QR_FOREVER_STR);
|
||||
$result = $qrcode->forever(56);// 或者 $qrcode->forever("foo");
|
||||
|
||||
$ticket = $result->ticket; // 或者 $result['ticket']
|
||||
$url = $result->url;
|
||||
|
Loading…
Reference in New Issue
Block a user