v0.9.2 版本更新

Signed-off-by: wixy <wixy@wixy.cn>
This commit is contained in:
wixy 2022-04-07 13:36:34 +08:00
parent 134da411c7
commit 3df9a5e8fd
3 changed files with 26 additions and 10 deletions

View File

@ -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()

View File

@ -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()

View File

@ -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)
<br/>
第 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