From af58f51603129707c5f72c51867d3b2a1b7c8e6f Mon Sep 17 00:00:00 2001 From: zhaoxiang Date: Fri, 30 Aug 2019 17:05:08 +0800 Subject: [PATCH] =?UTF-8?q?modified=20=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E7=99=BB=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wiki/controller/Api.php | 8 ++++++++ route/wikiRoute.php | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/application/wiki/controller/Api.php b/application/wiki/controller/Api.php index d18da43..7425601 100644 --- a/application/wiki/controller/Api.php +++ b/application/wiki/controller/Api.php @@ -153,4 +153,12 @@ class Api extends Base { ]); } + public function logout() { + $ApiAuth = $this->request->header('ApiAuth'); + cache('WikiLogin:' . $ApiAuth, null); + cache('WikiLogin:' . $this->appInfo['id'], null); + + return $this->buildSuccess([], 'η™»ε‡ΊζˆεŠŸ'); + } + } diff --git a/route/wikiRoute.php b/route/wikiRoute.php index 7a80b0d..5bcc413 100644 --- a/route/wikiRoute.php +++ b/route/wikiRoute.php @@ -20,9 +20,13 @@ Route::group('wiki', function() { 'wiki/Api/groupList', ['method' => 'get'] ], - 'detail' => [ + 'detail' => [ 'wiki/Api/detail', ['method' => 'get'] + ], + 'logout' => [ + 'wiki/Api/logout', + ['method' => 'get'] ] ])->middleware(['WikiAuth']);