mirror of
https://github.com/w7corp/easywechat.git
synced 2025-01-22 11:32:08 +00:00
Updated 网页授权 (markdown)
parent
fd226d33e1
commit
dd44c88f99
4
网页授权.md
4
网页授权.md
@ -26,8 +26,8 @@
|
|||||||
## 示例:
|
## 示例:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
// 如果已经授权
|
// 如果已经授权或者 SESSION 未过期
|
||||||
if ($wechat->auth->authorized()) {
|
if ($wechat->auth->authorized() || Session::get('logged_open_id')) {
|
||||||
$user = $wechat->auth->user();// 获取已经登录后用户信息
|
$user = $wechat->auth->user();// 获取已经登录后用户信息
|
||||||
Session::set('logged_open_id', $user['open_id']);
|
Session::set('logged_open_id', $user['open_id']);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user