From 3df9a5e8fdd440dc6d373ca62db0421f0667f9a2 Mon Sep 17 00:00:00 2001 From: wixy Date: Thu, 7 Apr 2022 13:36:34 +0800 Subject: [PATCH] =?UTF-8?q?v0.9.2=20=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wixy --- QuickAuthLogin/Action.php | 15 +++++++++++++++ QuickAuthLogin/Plugin.php | 6 ++++-- QuickAuthLogin/README.md | 15 +++++++-------- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/QuickAuthLogin/Action.php b/QuickAuthLogin/Action.php index 3535d5c..e45bf59 100644 --- a/QuickAuthLogin/Action.php +++ b/QuickAuthLogin/Action.php @@ -6,6 +6,21 @@ if (!defined('__TYPECHO_ROOT_DIR__')) { class QuickAuthLogin_Action extends Typecho_Widget { + + /* 测试插件安装接口 */ + public function ping(){ + $version = Typecho_Cookie::get('__typecho_check_version'); + $data = [ + "code" => 0, + "msg" => "pong", + "data" => [ + "name" => "QuickAuthLogin For Typecho", + "version" => QuickAuthLogin_Plugin::PLUGIN_VERSION + ] + ]; + $res = new Typecho_Response(); + $res->throwJson($data); + } /* 重置当前用户绑定数据 */ public function reset() diff --git a/QuickAuthLogin/Plugin.php b/QuickAuthLogin/Plugin.php index 02843e5..f3f85ce 100644 --- a/QuickAuthLogin/Plugin.php +++ b/QuickAuthLogin/Plugin.php @@ -4,13 +4,14 @@ * * @package QuickAuthLogin * @author wixy - * @version 0.9.1 - * @link https://blog.wixy.cn/archives/quickauthlogin.html + * @version 0.9.2 + * @link https://blog.wixy.cn */ class QuickAuthLogin_Plugin implements Typecho_Plugin_Interface { const PLUGIN_NAME = 'QuickAuthLogin'; + const PLUGIN_VERSION = '0.9.2'; const PLUGIN_PATH = __TYPECHO_ROOT_DIR__.__TYPECHO_PLUGIN_DIR__.'/QuickAuthLogin/'; /** @@ -27,6 +28,7 @@ class QuickAuthLogin_Plugin implements Typecho_Plugin_Interface { Helper::addPanel(1, 'QuickAuthLogin/views/authbind.php', '微信账号绑定', '微信账号绑定', 'subscriber'); Helper::addRoute('wechatlogin',__TYPECHO_ADMIN_DIR__.'QuickAuthLogin/wechatlogin','QuickAuthLogin_Action','wechatlogin'); Helper::addRoute('reset',__TYPECHO_ADMIN_DIR__.'QuickAuthLogin/reset','QuickAuthLogin_Action','reset'); + Helper::addRoute('ping',__TYPECHO_ADMIN_DIR__.'QuickAuthLogin/ping','QuickAuthLogin_Action','ping'); } public static function updateDb() diff --git a/QuickAuthLogin/README.md b/QuickAuthLogin/README.md index 11807b5..14891c3 100644 --- a/QuickAuthLogin/README.md +++ b/QuickAuthLogin/README.md @@ -4,6 +4,11 @@ #### 更新记录 +##### 2022/03/31 v0.9.2 + +1. 支持QuickAuth平台测试功能,可测试插件是否安装成功 +2. 更新接入教程 + ##### 2022/03/07 v0.9.1 1. 取消替换登录界面功能,改为在源登录界面注入微信登录按钮 @@ -33,17 +38,11 @@ Github: [https://github.com/mr-wixy/QuickAuthLogin](https://github.com/mr-wixy/Q 第 4 步:登录QuickAuth网站创建接入应用; -![](https://cdn.wixy.cn/blog-picture/blog-picture20220127160420.png) - -
- -第 5 步:填写应用的基本信息(注意:此时可以获取到AppKey,回调地址请填写自己博客的域名+/index.php/admin/QuickAuthLogin/wechatlogin 此处必须为https) - -![](https://cdn.wixy.cn/blog-picture/blog-picture20220127160707.png) +![建接入应用](https://cdn.wixy.cn/blog-picture/20220407133031.png) 第 6 步:发布应用; -![发布应用](https://cdn.wixy.cn/blog-picture/blog-picture20220127161055.png) +![发布应用](https://cdn.wixy.cn/blog-picture/20220407133237.png) 第 7 步:[获取](https://qauth.cn/config/secret)UserSecretKey;