https://github.com/yingouqlj/MiniProgram-lite
微信小程序php后端接口轻量版(wechat mini program sdk 项目名称不带wechat是不是不会被人发现的😆)
https://github.com/yingouqlj/MiniProgram-lite
miniprograms wechat wechat-app
Last synced: 5 months ago
JSON representation
微信小程序php后端接口轻量版(wechat mini program sdk 项目名称不带wechat是不是不会被人发现的😆)
- Host: GitHub
- URL: https://github.com/yingouqlj/MiniProgram-lite
- Owner: yingouqlj
- License: mit
- Created: 2017-01-17T09:01:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-05T07:04:44.000Z (over 6 years ago)
- Last Synced: 2024-12-13T19:51:28.442Z (10 months ago)
- Topics: miniprograms, wechat, wechat-app
- Language: PHP
- Homepage:
- Size: 17.6 KB
- Stars: 35
- Watchers: 4
- Forks: 19
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# miniProgram-lite
微信小程序php后端接口轻量版####初衷:
好用的微信SDK一大堆,已经没有自己写了。
但是好用的SDK大而全,依赖也大。对于业务很小的应用着实有点浪费。
当时业务需求,顺势做小程序,但是实际后端的接口用量很小,所以打算用到的接口自己包一下。
再然后,就打算拆出来分享出来。##安装:
```shell
composer require yingouqlj/wechat-mini-program-lite
```##基本使用:
```php
'appid',
'secret' => 'secret'
];
$program=new MiniProgram($config);
//创建Qrcode
$program->createQrCode->create('/page?id=1',120);```
##建议用法:
增加个配置继承Config
在里面实现 token 的读写覆盖原有方法```php
createQrCode->create('/page?id=1',120);```
##接口
+ [获取 access_token](https://github.com/yingouqlj/MiniProgram-lite/wiki/%E8%8E%B7%E5%8F%96-access_token)
+ [js换取登录后的openid](https://github.com/yingouqlj/MiniProgram-lite/wiki/code-%E6%8D%A2%E5%8F%96-session_key)