From 0d2dc60c73d1df2384fb4acd55531efcc1e31403 Mon Sep 17 00:00:00 2001
From: Anyon <zoujingli@qq.com>
Date: Mon, 19 Mar 2018 15:20:08 +0800
Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E5=A2=9E=E5=8A=A0=E5=8F=88?=
 =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E7=BD=91=E9=A1=B5=E6=8E=88=E6=9D=83=E5=85=BC?=
 =?UTF-8?q?=E5=AE=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 application/index/controller/Index.php  |  5 ++--
 application/index/controller/Wechat.php | 39 +++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 3 deletions(-)
 create mode 100644 application/index/controller/Wechat.php

diff --git a/application/index/controller/Index.php b/application/index/controller/Index.php
index e9653a2c4..9398d3aa4 100644
--- a/application/index/controller/Index.php
+++ b/application/index/controller/Index.php
@@ -14,13 +14,13 @@
 
 namespace app\index\controller;
 
-use controller\BasicAdmin;
+use think\Controller;
 
 /**
  * 应用入口控制器
  * @author Anyon <zoujingli@qq.com>
  */
-class Index extends BasicAdmin
+class Index extends Controller
 {
 
     public function index()
@@ -28,5 +28,4 @@ class Index extends BasicAdmin
         $this->redirect('@admin/login');
     }
 
-
 }
diff --git a/application/index/controller/Wechat.php b/application/index/controller/Wechat.php
new file mode 100644
index 000000000..6ed974b6e
--- /dev/null
+++ b/application/index/controller/Wechat.php
@@ -0,0 +1,39 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | ThinkAdmin
+// +----------------------------------------------------------------------
+// | 版权所有 2014~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
+// +----------------------------------------------------------------------
+// | 官方网站: http://think.ctolog.com
+// +----------------------------------------------------------------------
+// | 开源协议 ( https://mit-license.org )
+// +----------------------------------------------------------------------
+// | github开源项目:https://github.com/zoujingli/ThinkAdmin
+// +----------------------------------------------------------------------
+
+namespace app\index\controller;
+
+use service\WechatService;
+use think\Controller;
+
+/**
+ * 公众号测试
+ * Class Wechat
+ * @package app\index\controller
+ */
+class Wechat extends Controller
+{
+    /**
+     * 网页授权测试
+     * @return mixed
+     * @throws \think\Exception
+     * @throws \think\exception\PDOException
+     */
+    public function oauth()
+    {
+        $fans = WechatService::webOauth(1);
+        return $this->fetch('wechat@api/tools/oauth', ['fans' => $fans]);
+    }
+
+}
\ No newline at end of file