diff --git a/网页授权.md b/网页授权.md new file mode 100644 index 0000000..53a4bc5 --- /dev/null +++ b/网页授权.md @@ -0,0 +1,24 @@ + ```php + $wechat->auth; + ``` + ++ 生成授权链接 + + ```php + // 生成并返回 + $wechat->auth->url($to, $state, $scope); + // 直接跳转 + $wechat->auth->redirect($to, $state, $scope); 直接跳转 + ``` + ++ 判断是否已经授权 + + ```php + $wechat->auth->authorized(); + ``` + ++ 获取授权用户 + + ```php + $wechat->auth->user(); + ``` \ No newline at end of file