Skip to content

Commit

Permalink
1. 完善README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shinn-lancelot committed Nov 1, 2018
1 parent 5eafb98 commit 4b70fef
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ composer require hillpy/mini-program-sdk
### 使用方法

* 实例化开发包、accessToken获取及缓存

```
/**
* 使用案例
Expand Down Expand Up @@ -66,7 +65,6 @@ if ($accessToken == '') {
```

* 解密登录用户数据

```
// 解密登录用户数据
$paramArr['code'] = '';
Expand All @@ -83,6 +81,30 @@ if ($res['code'] == 100) {
}
```

* 获取无数量限制的小程序码
```
// 小程序码图片的保存路径
$path = '';
// 小程序码图片的保存名称
$filename = '';
// 小程序码接口所需参数
$paramArr['scene'] = '';
$paramArr['page'] = '';
$paramArr['width'] = '';
$paramArr['auto_color'] = '';
$paramArr['line_color'] = '';
$paramArr['is_hyaline'] = '';
// 请求小程序码接口
$res = $miniProgram->getWxacodeUnlimit($paramArr);
// 打开文件并写入二进制流,生成图片
$file = fopen($path . $filename, 'w');
fwrite($file, $res);
fclose($file);
```


### 仓库地址

Expand Down

0 comments on commit 4b70fef

Please sign in to comment.