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']);